feat: 登录逻辑问题调整

This commit is contained in:
duanshuwen
2025-12-25 23:04:51 +08:00
parent f027685072
commit dfadb06934
2 changed files with 33 additions and 27 deletions

View File

@@ -61,9 +61,17 @@ export const checkToken = () => {
};
// 刷新token
export const refreshToken = async () => {
return new Promise((resolve) => {
checkPhone().then(async (checkRes) => {
export const refreshToken = () => {
return new Promise(async (resolve) => {
const token = getStorageSyncToken();
if (!token) {
resolve(true);
return;
}
const checkRes = await checkPhone();
if (!checkRes.data) {
resolve(true);
return;
@@ -90,5 +98,4 @@ export const refreshToken = async () => {
},
});
});
});
};

View File

@@ -11,7 +11,6 @@ import { removeStorageSyncToken, setStorageSyncToken } from "../constant/token";
const loginAuth = (e) => {
removeStorageSyncToken();
const appStore = useAppStore();
return new Promise(async (resolve, reject) => {
const openIdCode = await getWeChatAuthCode(e);