fix: 打手端登录 wdlyhdl 返回商家客服身份字段
This commit is contained in:
1 parent
c9d39aac3c
commit
527e83eeb2
1 file changed
+18
-2
+18
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user