Commit e65d60e1 by 魏强

添加其他权限的用户;

parent 67fd977f
......@@ -92,6 +92,7 @@ def add_user():
json_data = request.get_json()
user_name = json_data['name'] if 'name' in json_data else 'SSW'
phone = json_data['phone'] if 'phone' in json_data else None
level = int(json_data['level']) if 'level' in json_data else 2
password = json_data['password'] if 'password' in json_data else None
comment = json_data['comment'] if 'comment' in json_data else ''
......@@ -111,7 +112,7 @@ def add_user():
user_info.agent_no = agent_no
user_info.user_name = user_name
user_info.phone = phone
user_info.level = 2
user_info.level = level
user_info.status = ACCOUNT_STATUS['on_use']
user_info.comment = comment
user_info.created_at = datetime.datetime.now()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment