保留code参数
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 45s

This commit is contained in:
kk
2026-07-02 19:32:07 +08:00
parent 2560d9d529
commit 5bb31516a0
2 changed files with 12 additions and 7 deletions
+5 -4
View File
@@ -25,10 +25,11 @@
const code = urlParams.get('code');
if (code) {
// 有 code → 进入授权 Loading 页处理
const loadingUrl = deviceId
? `/pages/auth/loading?device_id=${deviceId}`
: '/pages/auth/loading';
// 有 code → 进入授权 Loading 页处理,保留 code 参数
let loadingUrl = '/pages/auth/loading?code=' + encodeURIComponent(code);
if (deviceId) {
loadingUrl += '&device_id=' + deviceId;
}
uni.redirectTo({ url: loadingUrl });
return;
}