diff --git a/src/main.ts b/src/main.ts index ecb9ac65..c435d0c4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,8 +17,6 @@ import { Https } from "@/tool/https"; flexible() import { getCookie, setCookie } from "@/tool/cookie"; - -import { useI18n } from 'vue-i18n'; // console.log(process.env) let token = getCookie("token"); let routerName:any = router.currentRoute @@ -58,6 +56,7 @@ async function isMurmur() { let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000; sessionStorage.setItem('sessionId', randomNum); router.push("/home"); + localStorage.setItem('murmurStr',murmurStr) }) .catch((res) => { }); diff --git a/src/router/index.ts b/src/router/index.ts index c3fef601..7a727107 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -97,6 +97,8 @@ router.beforeEach((to, from, next) => { let isMurmur = JSON.parse(getIsMurmur) if(isMurmur&& murmurStr){ const toName = to.name === 'login'; + console.log(to); + if (toName) { next({ name: 'home' }); } else {