fix: bug修改

This commit is contained in:
kenny
2025-11-14 10:31:07 +08:00
parent bc74352cd5
commit b7928cdda0
5 changed files with 67 additions and 20 deletions
+18 -4
View File
@@ -25,11 +25,25 @@
const token = ref('');
onLoad(async (e) => {
if (!e.token) {
const options = e
const queryObj = Object.assign({}, options);
if (options.token) {
// queryObj.open = queryObj.open || 0;
if(!queryObj.open) {
queryObj.open = 0;
const queryStr= Object.entries(queryObj).map(([k,v]) => `${k}=${v}`).join('&')
window.location.href = `${window.location.href.replace(/\?.*$/g, '')}?${queryStr}`
return
}
} else {
const res = await getToken();
window.location.href =
window.location.href.replace(/\?.*$/g, '') + '?token=' + res.data.accessToken;
return;
queryObj.open = queryObj.open || 1;
queryObj.token = res.data.accessToken;
const queryStr= Object.entries(queryObj).map(([k,v]) => `${k}=${v}`).join('&')
window.location.href = `${window.location.href.replace(/\?.*$/g, '')}?${queryStr}`
return
}
token.value = e.token;