fix: 小程序扫码二维码路径改为 fighter 页,修复打手/管事邀请注册
This commit is contained in:
@@ -2842,7 +2842,8 @@ class GuanshiQRCodeView(APIView):
|
|||||||
logger.info(f"获取到 access_token (前10位): {access_token[:10]}... club={club_id}")
|
logger.info(f"获取到 access_token (前10位): {access_token[:10]}... club={club_id}")
|
||||||
|
|
||||||
encoded_invite = urllib.parse.quote(invite_code, safe='')
|
encoded_invite = urllib.parse.quote(invite_code, safe='')
|
||||||
page_path = f'pages/dashouduan/dashouduan?inviteCode={encoded_invite}'
|
# 打手端已合并至 fighter(TabBar);与旧版 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}'
|
wx_url = f'https://api.weixin.qq.com/wxa/getwxacode?access_token={access_token}'
|
||||||
post_data = {
|
post_data = {
|
||||||
'path': page_path,
|
'path': page_path,
|
||||||
@@ -3077,7 +3078,8 @@ class ZuzhangHaibaoView(APIView):
|
|||||||
|
|
||||||
# ===== 修改点:使用 A 接口(getwxacode) =====
|
# ===== 修改点:使用 A 接口(getwxacode) =====
|
||||||
encoded_invite = urllib.parse.quote(invite_code, safe='')
|
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)
|
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', '')):
|
if wx_error and is_weixin_token_invalid(wx_error.get('errcode'), wx_error.get('errmsg', '')):
|
||||||
|
|||||||
Reference in New Issue
Block a user