用户模块修改
This commit is contained in:
parent
303804caf2
commit
5959bd840a
|
@ -133,14 +133,10 @@ def login_impl(email, pwd, vcode):
|
||||||
|
|
||||||
def make_menus():
|
def make_menus():
|
||||||
role = user_info[0]['role']
|
role = user_info[0]['role']
|
||||||
duty = user_info[0]['duty']
|
|
||||||
|
|
||||||
with open(os.path.abspath(os.path.dirname(__file__)+'/static/menus.json'), "r", encoding='utf-8') as f:
|
with open(os.path.abspath(os.path.dirname(__file__)+'/static/menus.json'), "r", encoding='utf-8') as f:
|
||||||
duties = json.load(f)
|
duties = json.load(f)
|
||||||
|
|
||||||
if role == 'member':
|
|
||||||
return duties[role][duty]
|
|
||||||
else:
|
|
||||||
return duties[role]
|
return duties[role]
|
||||||
|
|
||||||
def make_session_id():
|
def make_session_id():
|
||||||
|
|
Loading…
Reference in New Issue