Compare commits

...

3 Commits

Author SHA1 Message Date
kk 85d5193071 修改app_no_map值
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 45s
2026-07-15 17:57:23 +08:00
kk 9551d9d8b2 传入对应环境的scope参数
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 49s
2026-07-15 17:37:23 +08:00
kk 81bec5ba3b 开门增加来源
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 45s
2026-07-15 17:02:07 +08:00
3 changed files with 12 additions and 7 deletions
+3 -1
View File
@@ -131,6 +131,7 @@
<script>
import { get, post } from '@/utils/request.js';
import { detectPlatform } from '@/utils/env.js';
export default {
props: {
@@ -163,7 +164,8 @@ export default {
const res = await post('/device-scan/open', {
device_id: this.deviceId,
door_index: 0,
user_id: uid
user_id: uid,
platform: detectPlatform()
});
const ret = res.data || {};
+6 -3
View File
@@ -97,10 +97,11 @@ export default {
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', {
app_no: appNo,
scopes: 'snsapi_base',
scopes: scopes,
redirect_uri: redirectUri,
});
@@ -256,9 +257,11 @@ export default {
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', {
app_no: appNo,
scopes: 'snsapi_userinfo',
scopes: scopes,
redirect_uri: redirectUri,
});
+3 -3
View File
@@ -6,9 +6,9 @@
// app_no 编码表:platform + terminalType → app_no
const APP_NO_MAP = {
'wechat_h5': '60000001102001',
'wechat_mp': '600102101',
'alipay_h5': '600112001',
'alipay_mp': '600112101',
'wechat_mp': '60000001102101',
'alipay_h5': '60000001112001',
'alipay_mp': '60000001112101',
};
/**