Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
5d148272
Commit
5d148272
authored
Dec 04, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户ID生成规则
parent
9c5964d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
user.py
api/user.py
+1
-3
PickDetail.vue
vu/src/views/pick/components/PickDetail.vue
+5
-5
No files found.
api/user.py
View file @
5d148272
...
...
@@ -6,7 +6,6 @@
import
json
from
django.conf
import
settings
from
utils.base
import
APIView
from
utils.time_utils
import
generate_id
from
django.contrib.auth.hashers
import
make_password
...
...
@@ -39,8 +38,7 @@ class UserUpdateOrCreate(APIView):
user_id
=
request
.
POST
.
get
(
'user_id'
,
''
)
tag_ids
=
list
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'tags'
,
'[]'
))))
password
=
make_password
(
settings
.
PUPPET_PASSWORD
,
None
,
'pbkdf2_sha256'
)
if
not
user_id
:
user_id
=
generate_id
()
data
=
{
'user_id'
:
user_id
,
'password'
:
password
,
...
...
vu/src/views/pick/components/PickDetail.vue
View file @
5d148272
...
...
@@ -126,7 +126,7 @@
placeholder=
"请输入内容"
/>
<span
v-show=
"contentShortLength"
class=
"word-counter"
>
{{
contentShortLength
}}
字
</span>
</el-form-item>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"
4
5px"
label=
"是否在线:"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"
7
5px"
label=
"是否在线:"
>
<el-radio-group
v-model=
"postForm.is_online"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
...
...
@@ -152,8 +152,8 @@
<!--
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"append"
>
添加-->
<!--
</el-button>
-->
<
el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-delete"
@
click=
"del"
>
移除
<
/el-button
>
<
!--
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-delete"
@
click=
"del"
>
移除-->
<
!--
</el-button>
--
>
</div>
<el-table
:data=
"data"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
...
...
@@ -224,8 +224,8 @@
<!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加-->
<!--</el-button>-->
<
el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-delete"
@
click=
"del"
>
移除
<
/el-button
>
<
!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除-->
<
!--</el-button>--
>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment