Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tour_business
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏强
tour_business
Commits
ec7f590e
Commit
ec7f590e
authored
Sep 11, 2020
by
魏强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑用户接口,新增可以编辑用户权限;
parent
b379f2d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Controller/AccountController.py
+4
-0
No files found.
Controller/AccountController.py
View file @
ec7f590e
...
@@ -35,6 +35,7 @@ def edit_user():
...
@@ -35,6 +35,7 @@ def edit_user():
user_name
=
json_data
[
'name'
]
if
'name'
in
json_data
else
'SSW'
user_name
=
json_data
[
'name'
]
if
'name'
in
json_data
else
'SSW'
password
=
json_data
[
'password'
]
if
'password'
in
json_data
else
''
password
=
json_data
[
'password'
]
if
'password'
in
json_data
else
''
comment
=
json_data
[
'comment'
]
if
'comment'
in
json_data
else
''
comment
=
json_data
[
'comment'
]
if
'comment'
in
json_data
else
''
level
=
json_data
[
'level'
]
if
'level'
in
json_data
else
''
spot_list
=
json_data
[
'spot_list'
]
if
'spot_list'
in
json_data
else
[]
spot_list
=
json_data
[
'spot_list'
]
if
'spot_list'
in
json_data
else
[]
if
not
old_phone
:
if
not
old_phone
:
return
jsonify
(
BASE_RESPONSE
(
error_code
=-
1
,
error_message
=
'old phone is null'
)
.
to_dict
())
return
jsonify
(
BASE_RESPONSE
(
error_code
=-
1
,
error_message
=
'old phone is null'
)
.
to_dict
())
...
@@ -57,6 +58,9 @@ def edit_user():
...
@@ -57,6 +58,9 @@ def edit_user():
agent_info
.
phone
=
new_phone
agent_info
.
phone
=
new_phone
agent_info
.
comment
=
comment
agent_info
.
comment
=
comment
if
level
:
agent_info
.
level
=
int
(
level
)
if
password
:
if
password
:
salt
=
AgentService
.
gene_salt
()
salt
=
AgentService
.
gene_salt
()
agent_info
.
salt_pwd
=
salt
agent_info
.
salt_pwd
=
salt
...
...
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