|
@@ -22,7 +22,7 @@ const routes = [
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
const router = new VueRouter({
|
|
|
- mode: 'history',
|
|
|
|
|
|
|
+ mode: 'hash',
|
|
|
base: process.env.BASE_URL,
|
|
base: process.env.BASE_URL,
|
|
|
routes
|
|
routes
|
|
|
})
|
|
})
|
|
@@ -32,7 +32,6 @@ router.beforeEach((to, from, next) => {
|
|
|
const token = localStorage.getItem('token')
|
|
const token = localStorage.getItem('token')
|
|
|
if (to.meta.requiresAuth && !token) {
|
|
if (to.meta.requiresAuth && !token) {
|
|
|
if (to.path !== '/login') {
|
|
if (to.path !== '/login') {
|
|
|
- next('/login')
|
|
|
|
|
} else {
|
|
} else {
|
|
|
next()
|
|
next()
|
|
|
}
|
|
}
|