wangyi
2026-04-02 74feb99b1b4e2eb3706bbb503d07fb087ca39d4a
src/permission.js
@@ -7,10 +7,12 @@
import { isPathMatch } from "@/utils/validate";
import { isRelogin } from "@/utils/request";
NProgress.configure({ showSpinner: false });
const whiteList = [
  "/login",
  "/loginTMS",
  "/register",
  "/printList",
  "/hBarPlanPrint",
@@ -20,10 +22,12 @@
  "/gyEmployee",
  "/GyCustomer",
  "/gyMaterial",
  "/hBarPlanPrintWeb",
  "/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) => {
@@ -50,6 +54,7 @@
        // 判断当前用户是否已拉取完user_info信息
        store .dispatch("GetInfo").then(() => {
            isRelogin.show = false;
            store.dispatch("GenerateRoutes").then((accessRoutes) => {
              // 根据roles权限生成可访问的路由表
              router.addRoutes(accessRoutes); // 动态添加可访问路由表