This commit is contained in:
parent
5888ee3946
commit
8570c0c0c1
|
|
@ -5,5 +5,6 @@ VITE_BUILD_MODE = 'dev'
|
||||||
# 开发环境接口地址
|
# 开发环境接口地址
|
||||||
VITE_API_URL = '/proxyApi'
|
VITE_API_URL = '/proxyApi'
|
||||||
|
|
||||||
VITE_proxyTarget = 'http://10.40.92.16:9502'
|
# VITE_proxyTarget = 'http://10.40.92.16:8080'
|
||||||
|
VITE_proxyTarget = 'http://10.40.92.186:8080'
|
||||||
# 9502 9206
|
# 9502 9206
|
||||||
|
|
@ -279,13 +279,11 @@ const router = createRouter({
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
if (store.token || to.path == '/Login') {
|
||||||
/* if (store.token || to.path == '/login') {
|
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
next('/login')
|
next('/Login')
|
||||||
} */
|
}
|
||||||
next()
|
|
||||||
// chrome
|
// chrome
|
||||||
document.body.scrollTop = 0;
|
document.body.scrollTop = 0;
|
||||||
// firefox 兼容火狐
|
// firefox 兼容火狐
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
}
|
}
|
||||||
userStore.setToken(res.data.access_token)
|
userStore.setToken(res.data.access_token)
|
||||||
// 跳转登录页面
|
// 跳转登录页面
|
||||||
router.push('/home')
|
router.push('/')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue