diff --git a/users/views/auth.py b/users/views/auth.py index d9ae151..b9ec0c6 100644 --- a/users/views/auth.py +++ b/users/views/auth.py @@ -1165,6 +1165,13 @@ class WechatLoginAndDashouRegisterView(APIView): # 准备打手信息 dashou_data = self.zhuangbeiDashouFanhuiShuju(dashou_profile) + staff_fields = {} + try: + from merchant_ops.services.authz import staff_fields_for_login + staff_fields = staff_fields_for_login(user_main) or {} + except Exception: + logger.exception('wdlyhdl staff_fields_for_login 失败 uid=%s', getattr(user_main, 'UserUID', '')) + # 合并所有数据 response_data = { 'token': token, @@ -1180,7 +1187,8 @@ class WechatLoginAndDashouRegisterView(APIView): 'guanshiqun': group_info.get('guanshiqun', ''), 'guanshiqunid': group_info.get('guanshiqunid', ''), # 合并打手信息 - **dashou_data + **dashou_data, + **staff_fields, } return Response({ @@ -1213,6 +1221,13 @@ class WechatLoginAndDashouRegisterView(APIView): # 准备打手信息 dashou_data = self.zhuangbeiDashouFanhuiShuju(dashou_profile) + staff_fields = {} + try: + from merchant_ops.services.authz import staff_fields_for_login + staff_fields = staff_fields_for_login(user_main) or {} + except Exception: + logger.exception('wdlyhdl staff_fields_for_login 失败 uid=%s', getattr(user_main, 'UserUID', '')) + # 合并所有数据 response_data = { 'token': token, @@ -1228,7 +1243,8 @@ class WechatLoginAndDashouRegisterView(APIView): 'guanshiqun': group_info.get('guanshiqun', ''), 'guanshiqunid': group_info.get('guanshiqunid', ''), # 合并打手信息 - **dashou_data + **dashou_data, + **staff_fields, } return response_data