This commit is contained in:
2025-12-09 10:34:24 +08:00
parent bc2298ff83
commit 78927afd7a
6 changed files with 44 additions and 12 deletions

View File

@@ -93,11 +93,13 @@ const loginByWeChatMp = async (data: { wechatMpCode: string }) => {
console.log('使用微信公众号登录:', data)
}
const clearCode = () => {
export const clearCode = () => {
const url = new URL(window.location.href);
// 清理 URL 中的 code 参数
url.searchParams.delete('code');
url.searchParams.delete('state');
url.searchParams.delete('user-check');
url.searchParams.delete('redirect');
window.history.replaceState({}, document.title, url.toString());
}
export const checkWechat = async () => {