fix: 封禁打手禁止 wdlyhdl 登录并返回明确提示

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-27 05:56:30 +08:00
parent 5b0db2c8fd
commit bf4fd468e8

View File

@@ -896,6 +896,15 @@ class WechatLoginAndDashouRegisterView(APIView):
if dashou_exists:
# 用户已是打手,直接返回信息
dashou_profile = UserDashou.query.get(user=user_main)
# 账号封禁:禁止登录发 token前端进入登录页提示
if int(getattr(dashou_profile, 'zhanghaozhuangtai', 1) or 0) != 1:
reason = (getattr(dashou_profile, 'fengjin_yuanyin', '') or '').strip()
msg = '账号状态异常,您的账号已被封禁'
if reason:
msg = f'{msg}。原因:{reason}'
else:
msg = f'{msg},请联系客服'
return legacy_miniapp_error(4031, msg)
return self.fanhuiDengluZhuceshuju(user_main, dashou_profile)
# 4.4 核心:为用户创建所有身份(打手、商家、管事)