From bf4fd468e822cb1783f00beb73508786975db84c Mon Sep 17 00:00:00 2001 From: XingQue Date: Mon, 27 Jul 2026 05:56:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=81=E7=A6=81=E6=89=93=E6=89=8B?= =?UTF-8?q?=E7=A6=81=E6=AD=A2=20wdlyhdl=20=E7=99=BB=E5=BD=95=E5=B9=B6?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=98=8E=E7=A1=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- users/views/auth.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/users/views/auth.py b/users/views/auth.py index f2b7e36..abab8cd 100644 --- a/users/views/auth.py +++ b/users/views/auth.py @@ -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 核心:为用户创建所有身份(打手、商家、管事)