fix: 修复微信手机号一键绑定重复调用微信API导致code二次使用失败的bug
This commit is contained in:
@@ -480,9 +480,6 @@ async def wx_phone(req: Request, authorization: str = Header(default="")):
|
||||
if not token:
|
||||
raise HTTPException(400, "微信 access_token 获取失败,请检查 AppID/Secret 配置")
|
||||
url = f"https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token={token}"
|
||||
async with httpx.AsyncClient(timeout=10) as client:
|
||||
r = await client.post(url, json={"code": pcode})
|
||||
data = r.json()
|
||||
async with httpx.AsyncClient(timeout=10) as client:
|
||||
r = await client.post(url, json={"code": pcode})
|
||||
data = r.json()
|
||||
|
||||
Reference in New Issue
Block a user