feat: 加入白名单不验证是否登录

This commit is contained in:
RubyLiu 2023-09-11 17:40:56 +08:00 committed by rubylliu
parent 530a869241
commit b6d43a7846
1 changed files with 7 additions and 2 deletions

View File

@ -23,7 +23,7 @@
import { getLocalStorage, setLocalStorage } from '@/utils/local-storage';
import { watchStyle, watchTheme, setFavicon } from '@/utils/theme';
import { WorkbenchRouteEnum } from './enums/routeEnum';
import MsEmpty from '@/components/pure/ms-empty/index.vue';
// import MsEmpty from '@/components/pure/ms-empty/index.vue';
const appStore = useAppStore();
const userStore = useUserStore();
@ -76,7 +76,12 @@
router.push(WorkbenchRouteEnum.WORKBENCH);
}
};
//
const whiteList = ['#/invite'];
onMounted(async () => {
await checkIsLogin();
if (!whiteList.includes(window.location.hash)) {
await checkIsLogin();
}
});
</script>