Compare commits

...

2 Commits

Author SHA1 Message Date
kk a071f760d3 授权回调code支持auth_code
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 48s
2026-07-20 10:30:59 +08:00
kk 445d428d8b 授权获取用户信息scope是auth_user
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 1m12s
2026-07-17 17:45:24 +08:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -42,8 +42,8 @@
}
}
// 3. 检查 URL 中是否有授权回调的 code
const code = urlParams.get('code');
// 3. 检查 URL 中是否有授权回调的 code(支付宝用 auth_code,微信用 code
const code = urlParams.get('code') || urlParams.get('auth_code');
if (code) {
// 有 code → 进入授权 Loading 页处理
+2 -2
View File
@@ -350,9 +350,9 @@ export default {
stateObj.device_id = this.deviceId;
}
// 用户信息授权:微信用 snsapi_userinfo,支付宝用 auth_userinfo
// 用户信息授权:微信用 snsapi_userinfo,支付宝用 auth_user
const platform = uni.getStorageSync('platform') || 'wechat';
const scopes = platform === 'alipay' ? 'auth_userinfo' : 'snsapi_userinfo';
const scopes = platform === 'alipay' ? 'auth_user' : 'snsapi_userinfo';
const res = await gatewayGet('/api/v1/user/auth/url', {
app_no: appNo,