Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9551d9d8b2 |
@@ -97,10 +97,11 @@ export default {
|
|||||||
window.location.origin.replace(/^http:/, 'https:') + window.location.pathname
|
window.location.origin.replace(/^http:/, 'https:') + window.location.pathname
|
||||||
);
|
);
|
||||||
|
|
||||||
// 使用 snsapi_base 静默授权,不弹窗
|
// 静默授权:微信用 snsapi_base,支付宝用 auth_base
|
||||||
|
const scopes = platform === 'alipay' ? 'auth_base' : 'snsapi_base';
|
||||||
const res = await gatewayGet('/api/v1/user/auth/url', {
|
const res = await gatewayGet('/api/v1/user/auth/url', {
|
||||||
app_no: appNo,
|
app_no: appNo,
|
||||||
scopes: 'snsapi_base',
|
scopes: scopes,
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -256,9 +257,11 @@ export default {
|
|||||||
window.location.origin.replace(/^http:/, 'https:') + window.location.pathname
|
window.location.origin.replace(/^http:/, 'https:') + window.location.pathname
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 用户信息授权:微信用 snsapi_userinfo,支付宝用 auth_user
|
||||||
|
const scopes = platform === 'alipay' ? 'auth_user' : 'snsapi_userinfo';
|
||||||
const res = await gatewayGet('/api/v1/user/auth/url', {
|
const res = await gatewayGet('/api/v1/user/auth/url', {
|
||||||
app_no: appNo,
|
app_no: appNo,
|
||||||
scopes: 'snsapi_userinfo',
|
scopes: scopes,
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user