|
@@ -46,16 +46,16 @@ const web = [
|
|
|
];
|
|
|
const routes = [...web];
|
|
|
const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes });
|
|
|
-router.beforeEach((to, from, next) => {
|
|
|
- document.title = `${to.meta.title} `;
|
|
|
- const token = sessionStorage.getItem('token');
|
|
|
- if (token) {
|
|
|
- let user = jwt.decode(token);
|
|
|
- store.commit('setUser', user, { root: true });
|
|
|
- next();
|
|
|
- } else {
|
|
|
- if (to.meta.is_filter) next('/login');
|
|
|
- else next();
|
|
|
- }
|
|
|
-});
|
|
|
+// router.beforeEach((to, from, next) => {
|
|
|
+// document.title = `${to.meta.title} `;
|
|
|
+// const token = sessionStorage.getItem('token');
|
|
|
+// if (token) {
|
|
|
+// let user = jwt.decode(token);
|
|
|
+// store.commit('setUser', user, { root: true });
|
|
|
+// next();
|
|
|
+// } else {
|
|
|
+// if (to.meta.is_filter) next('/login');
|
|
|
+// else next();
|
|
|
+// }
|
|
|
+// });
|
|
|
export default router;
|