fix: 静态路由角色拦截限制

This commit is contained in:
TsMask committed 2024-12-02 16:20:03 +08:00
1 parent 5e54aaf24d
commit 3f01adb2ad
7 files changed
+78 -118

No files matched your search

-8
View File
@@ -31,13 +31,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
}
);
/** is super role in static route */
const isStaticSuper = computed(() => {
const { VITE_AUTH_ROUTE_MODE, VITE_STATIC_SUPER_ROLE } = import.meta.env;
return VITE_AUTH_ROUTE_MODE === 'static' && userInfo.roles?.includes(VITE_STATIC_SUPER_ROLE);
});
/** Is login */
const isLogin = computed(() => Boolean(token.value));
@@ -160,7 +153,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
return {
token,
userInfo,
isStaticSuper,
isLogin,
loginLoading,
resetStore,