|
|
@@ -81,11 +81,11 @@ const router = createRouter({
|
|
|
routes
|
|
|
})
|
|
|
|
|
|
-router.beforeEach((to, from) => {
|
|
|
- // 生产环境下强制每次都从首页进入
|
|
|
- if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'HomeView') {
|
|
|
- return '/'
|
|
|
- }
|
|
|
-})
|
|
|
+// router.beforeEach((to, from) => {
|
|
|
+// // 生产环境下强制每次都从首页进入
|
|
|
+// if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'HomeView') {
|
|
|
+// return '/'
|
|
|
+// }
|
|
|
+// })
|
|
|
|
|
|
export default router
|