1234567891011121314151617181920212223242526272829 |
- import Vue from "vue";
- import Router from "vue-router";
- import PortalRoutes from "./modules/portal/routes/routes";
- import MarklRoutes from "./modules/marking/routes/routes";
- Vue.use(Router);
- let router = new Router({
- mode: "history",
- routes: [...PortalRoutes,...MarklRoutes]
- });
- // router.beforeEach((to, from, next) => {
- // const loginPath = "/login/" + localStorage.getItem("domain");
- // if (to.path.match(/^\/login\/.+$/)) {
- // next();
- // } else {
- // if (!window.sessionStorage.getItem("token")) {
- // if (!localStorage.getItem("domain")) {
- // alert("地址出错,找不到机构!");
- // }
- // next({ path: loginPath });
- // } else {
- // next();
- // }
- // }
- // });
- export default router;
|