增加token校验

This commit is contained in:
2025-12-01 16:08:09 +08:00
parent 9415af337c
commit 0c80c0dc48
3 changed files with 126 additions and 8 deletions

View File

@@ -736,7 +736,7 @@
const t = Date.now();
document.body.classList.add('fadeout');
window.location.replace(`https://ai.satabot.com?userId=${encodedUserId}&headingimg=${userInfo.headimgurl}&nickname=${userInfo.nickname}&t=${t}`)
window.location.replace(`https://ai.satabot.com?userId=${encodedUserId}&headingimg=${userInfo.headimgurl}&nickname=${userInfo.nickname}&localtoken=${res.token}&t=${t}`)
}
})
.catch(err => {
@@ -932,7 +932,7 @@
const t = Date.now();
document.body.classList.add('fadeout');
window.location.replace(`https://ai.satabot.com?userId=${encodedUserId}&headingimg=${userInfo.headimgurl}&nickname=${userInfo.nickname}&t=${t}`)
window.location.replace(`https://ai.satabot.com?userId=${encodedUserId}&headingimg=${userInfo.headimgurl}&nickname=${userInfo.nickname}&localtoken=${res.token}&t=${t}`)
} else {
showToast(res.msg); // 给用户友好提示
}