Commit 5faa05e1 authored by lvshibao's avatar lvshibao

将用户名加入到req

parent 916e7ea8
...@@ -38,7 +38,7 @@ def get_account_info(func): ...@@ -38,7 +38,7 @@ def get_account_info(func):
# logger.info('req中的query_params为: ', req.query_params) # logger.info('req中的query_params为: ', req.query_params)
if info.json()['code'] != 200: if info.json()['code'] != 200:
return Response({'code': -1, 'msg': '未能获取用户信息'}) return Response({'code': -1, 'msg': '未能获取用户信息'})
req.data.set('username', info.json()['data']['userInfo']['name']) req.data['username'] = info.json()['data']['userInfo']['name']
return func(obj, req, *args, **kw) return func(obj, req, *args, **kw)
return account_info return account_info
......
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