fix #216 with cookie mgmt.
This commit is contained in:
@@ -20,6 +20,7 @@ import Loading from '@/components/Loading.vue';
|
||||
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||
import PageAdminStore from '@/stores/pageAdmin.js';
|
||||
import LoginStore from "@/stores/login.js";
|
||||
import { getCookie } from "../utils/cookieUtil.js";
|
||||
|
||||
export default {
|
||||
name: 'MainContainer',
|
||||
@@ -67,7 +68,7 @@ export default {
|
||||
beforeRouteEnter(to, from, next) {
|
||||
// 重新整理畫面以及第一次進入網頁時,beforeRouteEnter這個hook會被執行,然而beforeRouteUpdate不會被執行
|
||||
const loginStore = LoginStore();
|
||||
if (!loginStore.isLoggedIn) {
|
||||
if (!getCookie("isLuciaLoggedIn")) {
|
||||
next({
|
||||
path: '/login',
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user