陈婷婷
2026-01-26 ce24f31ca213fd677b02a6e08235bbddf269f4f7
src/store/modules/permission.js
@@ -4,7 +4,7 @@
import Layout from "@/layout/index";
import ParentView from "@/components/ParentView";
import InnerLink from "@/layout/components/InnerLink";
import { getLoginPageSource } from "@/utils/loginSource"; // 导入登录来源判断工具
const permission = {
  state: {
    routes: [],
@@ -31,6 +31,10 @@
  actions: {
    // 生成路由
    GenerateRoutes({ commit }) {
      // 示例:根据登录来源执行不同的逻辑
      const loginSource = getLoginPageSource();
      console.log(`用户从 ${loginSource} 页面登录`);
      return new Promise((resolve) => {
        // 向后端请求路由数据
        let data = [
@@ -88,21 +92,24 @@
                path: "WayBillPaymentBill",
                redirect: "noRedirect",
                component: "Layout",
                children: [{
                  meta: {
                    icon: "build",
                    link: null,
                    noCache: false,
                    title: "运单费用结算单",
                children: [
                  {
                    meta: {
                      icon: "build",
                      link: null,
                      noCache: false,
                      title: "运单费用结算单",
                    },
                    component: () =>
                      import(
                        "@/views/logistics/WayBillPaymentBill/Pay_WayBillPaymentBillList.vue"
                      ),
                    hidden: false,
                    name: "payWayBillPaymentBillList",
                    path: "PayWayBillPaymentBillList",
                  },
                  component: () =>
                    import("@/views/logistics/WayBillPaymentBill/Pay_WayBillPaymentBillList.vue"),
                  hidden: false,
                  name: "payWayBillPaymentBillList",
                  path: "PayWayBillPaymentBillList",
                }
                ]
              }
                ],
              },
            ],
          },
          {