From ce9bfb2845774eb7c01a51eb65822c00007b4fe7 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 18 Jan 2024 09:40:38 +0800 Subject: [PATCH] fix --- src/main.ts | 23 ++++++----------------- vue.config.js | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/main.ts b/src/main.ts index cd28db0a..2b664fdf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,10 +17,7 @@ import { Https } from "@/tool/https"; flexible() import { getCookie, setCookie } from "@/tool/cookie"; -// console.log(process.env) let token = getCookie("token"); -console.log(window.location.search.substring(1)); - // Https.axiosGet(Https.httpUrls.endpoint) // .then((rv) => { // console.log(rv); @@ -29,18 +26,7 @@ console.log(window.location.search.substring(1)); // .catch((res) => { // }); -nextTick().then(()=>{ -console.log(router.currentRoute.value); - -}) -let routerName:any = '' -function getRouter (){ - routerName = (router.currentRoute as any)._value.name -} router.beforeEach((to, from, next) => { - console.log(`即将从 ${from.path} 跳转到 ${to.path}`); - // if(to.path) - console.log(to); if(to.name != "setIdentification"){ isMurmur() } @@ -49,7 +35,7 @@ router.beforeEach((to, from, next) => { async function isMurmur() { let murmurStr: any = localStorage.getItem('murmurStr') let id: any = localStorage.getItem('id') - let isSxis = false + // let isSxis = false let data = { browserIdentifiers: murmurStr, id:id?id:window.location.search.substring(1) @@ -60,7 +46,8 @@ async function isMurmur() { // }) // .catch((res) => { // }); - Https.axiosPost(Https.httpUrls.noLoginRequired, data) + if(data.id){ + Https.axiosPost(Https.httpUrls.noLoginRequired, data) .then((rv) => { let isTest = rv.isTrial == 1 ? true : false let isBeginner = rv.isBeginner == 1 ? true : false @@ -73,11 +60,13 @@ async function isMurmur() { sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗 let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000; sessionStorage.setItem('sessionId', randomNum); - // router.push("/home"); + router.push("/home"); // localStorage.setItem('murmurStr',murmurStr) }) .catch((res) => { }); + } + } diff --git a/vue.config.js b/vue.config.js index 228dc125..06e35a5a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -37,7 +37,7 @@ module.exports = defineConfig({ } } }, - // https:true, + https:true, }, pluginOptions: { "style-resources-loader": {