| | |
| | | import { isPathMatch } from "@/utils/validate"; |
| | | import { isRelogin } from "@/utils/request"; |
| | | |
| | | |
| | | NProgress.configure({ showSpinner: false }); |
| | | |
| | | const whiteList = [ |
| | | "/login", |
| | | "/loginTMS", |
| | | "/register", |
| | | "/printList", |
| | | "/hBarPlanPrint", |
| | |
| | | "/gyMaterial", |
| | | "/FbStepFoldinBillList", |
| | | "/FbStepFoldOutBillList", |
| | | "/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong", |
| | | "/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin", |
| | | "/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin" |
| | | ]; // no redirect whitelist |
| | | |
| | | const isWhiteList = (path) => { |
| | |
| | | // 判断当前用户是否已拉取完user_info信息 |
| | | store .dispatch("GetInfo").then(() => { |
| | | isRelogin.show = false; |
| | | |
| | | store.dispatch("GenerateRoutes").then((accessRoutes) => { |
| | | // 根据roles权限生成可访问的路由表 |
| | | router.addRoutes(accessRoutes); // 动态添加可访问路由表 |