|
@@ -147,14 +147,14 @@ const router = new VueRouter({
|
|
|
routes
|
|
|
})
|
|
|
|
|
|
-router.beforeEach((to, from, next) => {
|
|
|
- console.log('beforeEach: ', to, from, next)
|
|
|
- // 强制每次都从首页进入
|
|
|
- if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'HomeView' && !location.href.endsWith('autoReload=true')) {
|
|
|
- next('/')
|
|
|
- } else {
|
|
|
- next()
|
|
|
- }
|
|
|
-})
|
|
|
+// router.beforeEach((to, from, next) => {
|
|
|
+// console.log('beforeEach: ', to, from, next)
|
|
|
+// // 强制每次都从首页进入
|
|
|
+// if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'HomeView') {
|
|
|
+// next('/')
|
|
|
+// } else {
|
|
|
+// next()
|
|
|
+// }
|
|
|
+// })
|
|
|
|
|
|
export default router
|