fix: 小程序扫码二维码路径改为 fighter 页,修复打手/管事邀请注册

This commit is contained in:
XingQue
2026-06-30 13:53:43 +08:00
parent 94fd40618e
commit 3452b0fb69

View File

@@ -2842,7 +2842,8 @@ class GuanshiQRCodeView(APIView):
logger.info(f"获取到 access_token (前10位): {access_token[:10]}... club={club_id}")
encoded_invite = urllib.parse.quote(invite_code, safe='')
page_path = f'pages/dashouduan/dashouduan?inviteCode={encoded_invite}'
# 打手端已合并至 fighterTabBar与旧版 dashouduan 同为扫码入口fighter.js 已处理 inviteCode 自动注册
page_path = f'pages/fighter/fighter?inviteCode={encoded_invite}'
wx_url = f'https://api.weixin.qq.com/wxa/getwxacode?access_token={access_token}'
post_data = {
'path': page_path,
@@ -3077,7 +3078,8 @@ class ZuzhangHaibaoView(APIView):
# ===== 修改点:使用 A 接口getwxacode =====
encoded_invite = urllib.parse.quote(invite_code, safe='')
page_path = f'pages/guanshiduan/guanshiduan?inviteCode={encoded_invite}'
# 管事注册:打手中心 fighter.js 已支持 registerType=guanshi + inviteCode 自动注册
page_path = f'pages/fighter/fighter?registerType=guanshi&inviteCode={encoded_invite}'
wx_resp, wx_error = self._request_wx_qrcode(page_path, access_token)
if wx_error and is_weixin_token_invalid(wx_error.get('errcode'), wx_error.get('errmsg', '')):