fix: 静态路由角色拦截限制
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user