perf(struct): perf

This commit is contained in:
2026-03-10 15:41:48 +08:00
parent 4635de6a53
commit 77542cd49e
170 changed files with 34 additions and 38354 deletions

View File

@@ -17,7 +17,6 @@ fetch 参数:
"use client"
import { useUserStore } from "@/app/store/user"
import { usePermissionStore } from "@/components/label/store/auth"
import { deleteCookie, refreshKey } from "@/components/login/api"
import { isNumber } from "@/libs/util"
@@ -41,7 +40,6 @@ interface OptionsProps {
async function httpfetch<T>(options: OptionsProps): Promise<T> {
const { removeUserInfo, refreshToken } = useUserStore.getState()
const { logout } = usePermissionStore.getState()
const access_token = useUserStore.getState().access_token
const refresh_token = useUserStore.getState().refresh_token
@@ -198,7 +196,6 @@ async function httpfetch<T>(options: OptionsProps): Promise<T> {
} finally {
// 清空身份信息并跳转至登录页面
removeUserInfo()
logout()
window.location.href = "/login"
}
}
@@ -276,7 +273,6 @@ async function httpfetch<T>(options: OptionsProps): Promise<T> {
} finally {
// 清空身份信息并跳转至登录页面
removeUserInfo()
logout()
window.location.href = "/login"
}
} else {