From 527e83eeb2d1388a64693e8592e98ea5c78e95e8 Mon Sep 17 00:00:00 2001 From: XingQue Date: Tue, 4 Aug 2026 07:49:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=93=E6=89=8B=E7=AB=AF=E7=99=BB?= =?UTF-8?q?=E5=BD=95=20wdlyhdl=20=E8=BF=94=E5=9B=9E=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E8=BA=AB=E4=BB=BD=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/views/auth.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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