to resovle warnings in the console.

This commit is contained in:
simple321vip
2023-01-30 20:00:30 +08:00
parent 5886e3feac
commit 8cca267578
2 changed files with 3 additions and 9 deletions
+2 -6
View File
@@ -7,9 +7,7 @@ import { tenantStore } from './store/modules/tenant'
const whiteList = ['/login', '/register', '/sorryPage'] const whiteList = ['/login', '/register', '/sorryPage']
let url = window.location.href let url = window.location.href
router.beforeEach(async (to, from, next) => { router.beforeEach((to, from, next) => {
console.log(url)
console.log(from.path, to.path)
const token = getToken() const token = getToken()
@@ -51,7 +49,6 @@ router.beforeEach(async (to, from, next) => {
path: '/register', path: '/register',
query: query_data query: query_data
}) })
return
} }
if (url.search("/home/") != -1) { if (url.search("/home/") != -1) {
let arr = url.split('?') let arr = url.split('?')
@@ -66,7 +63,7 @@ router.beforeEach(async (to, from, next) => {
account: query_data.account account: query_data.account
} }
const tenant_store = tenantStore() const tenant_store = tenantStore()
await tenant_store.login(tenant, query_data.token).then(() => { tenant_store.login(tenant, query_data.token).then(() => {
const { href } = router.resolve({ const { href } = router.resolve({
path: '/' path: '/'
}); });
@@ -82,7 +79,6 @@ router.beforeEach(async (to, from, next) => {
router.push({ router.push({
path: '/sorryPage', path: '/sorryPage',
}) })
return
} }
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
next() next()
+1 -3
View File
@@ -70,9 +70,7 @@ const setOptions = () => {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
textStyle: { color: '#999',
color: '#999',
},
}, },
}, },
dataZoom: [ dataZoom: [