fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||||
VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||||
|
|||||||
25
src/main.ts
25
src/main.ts
@@ -1,4 +1,4 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp,nextTick } from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
@@ -19,8 +19,6 @@ flexible()
|
|||||||
import { getCookie, setCookie } from "@/tool/cookie";
|
import { getCookie, setCookie } from "@/tool/cookie";
|
||||||
// console.log(process.env)
|
// console.log(process.env)
|
||||||
let token = getCookie("token");
|
let token = getCookie("token");
|
||||||
let routerName:any = router.currentRoute
|
|
||||||
let isLogin = routerName._value.name
|
|
||||||
console.log(window.location.search.substring(1));
|
console.log(window.location.search.substring(1));
|
||||||
|
|
||||||
// Https.axiosGet(Https.httpUrls.endpoint)
|
// Https.axiosGet(Https.httpUrls.endpoint)
|
||||||
@@ -31,6 +29,23 @@ console.log(window.location.search.substring(1));
|
|||||||
// .catch((res) => {
|
// .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()
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
async function isMurmur() {
|
async function isMurmur() {
|
||||||
let murmurStr: any = localStorage.getItem('murmurStr')
|
let murmurStr: any = localStorage.getItem('murmurStr')
|
||||||
let id: any = localStorage.getItem('id')
|
let id: any = localStorage.getItem('id')
|
||||||
@@ -45,7 +60,6 @@ async function isMurmur() {
|
|||||||
// })
|
// })
|
||||||
// .catch((res) => {
|
// .catch((res) => {
|
||||||
// });
|
// });
|
||||||
if ((router.currentRoute as any)._rawValue.name != 'setIdentification') {
|
|
||||||
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
|
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
|
||||||
.then((rv) => {
|
.then((rv) => {
|
||||||
let isTest = rv.isTrial == 1 ? true : false
|
let isTest = rv.isTrial == 1 ? true : false
|
||||||
@@ -64,9 +78,8 @@ async function isMurmur() {
|
|||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
isMurmur()
|
|
||||||
|
|
||||||
let loadingParam = {
|
let loadingParam = {
|
||||||
loading: require('./assets/images/homePage/loading.gif'),
|
loading: require('./assets/images/homePage/loading.gif'),
|
||||||
|
|||||||
Reference in New Issue
Block a user