feat: 修改小程序跳转链接
This commit is contained in:
4
app.py
4
app.py
@@ -3490,11 +3490,11 @@ def get_wechat_h5_auth_url():
|
||||
# 编码回调地址
|
||||
redirect_uri = urllib.parse.quote_plus(WECHAT_REDIRECT_URI)
|
||||
|
||||
# 构建授权 URL(使用 snsapi_login 获取用户信息)
|
||||
# 构建授权 URL(使用 snsapi_userinfo 获取用户信息,仅限微信内 H5 使用)
|
||||
auth_url = (
|
||||
f"https://open.weixin.qq.com/connect/oauth2/authorize?"
|
||||
f"appid={WECHAT_APPID}&redirect_uri={redirect_uri}"
|
||||
f"&response_type=code&scope=snsapi_login&state={state}"
|
||||
f"&response_type=code&scope=snsapi_userinfo&state={state}"
|
||||
"#wechat_redirect"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user