|
@ -17,9 +17,9 @@ export async function autoLoginByToken() { |
|
|
// 可选:将 token 存入 localStorage
|
|
|
// 可选:将 token 存入 localStorage
|
|
|
localStorage.setItem('token', res.data.data) |
|
|
localStorage.setItem('token', res.data.data) |
|
|
|
|
|
|
|
|
// const url = new URL(window.location.href);
|
|
|
const url = new URL(window.location.href); |
|
|
// url.searchParams.delete('token');
|
|
|
url.searchParams.delete('token'); |
|
|
// window.location.replace(url.toString());
|
|
|
window.location.replace(url.toString()); |
|
|
return true |
|
|
return true |
|
|
} else { |
|
|
} else { |
|
|
return false |
|
|
return false |
|
|