feat: 登录失效之后再次跳转到登录的页面

This commit is contained in:
2026-04-07 18:16:48 +08:00
parent 7ced6a0850
commit 350ce56767

View File

@@ -2,6 +2,7 @@ import { getCurrentConfig } from "@/constant/base";
import { useAppStore } from "@/store";
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";
import { getAccessToken } from "@/constant/token";
import { goLogin } from "../../hooks/useGoLogin";
const clientId = getCurrentConfig().clientId;
const defaultConfig = {
@@ -60,6 +61,10 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
console.log("424错误重新登录");
removeAccessToken();
uni.$emit(NOTICE_EVENT_LOGOUT);
setTimeout(() => {
/// 去登录页面
goLogin();
}, 500);
}
},
fail: (err) => {