From 67a2b2362c8e3fe53dd37843cfa8cad3b5f1391c Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Thu, 24 Feb 2022 16:41:34 +0800 Subject: [PATCH] =?UTF-8?q?404=E9=A1=B5=E9=9D=A2=E9=97=AA=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 256 ++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 153 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 3555a8e9..809fe6a4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -161,174 +161,124 @@ router.beforeEach((to, from, next) => { const customerId = localStorage.getItem("customerId"); console.log("customerId:", customerId); - // if(customerId==='1e68188b8f7e9ab15658c164bd5b3676'){ - // // if(customerId==='45687aa479955f9d06204d415238f7cc'){ - // const menuList=[ - // { - // children: [], - // createdBy: "a76fc711807ac9827d7611b0f94ec220", - // createdTime: "2020-08-26 16:38", - // delFlag: null, - // icon: "icon-database", - // id: "abe812eb350f6b5eda575e268e50ac1c", - // name: "定制功能配置", - // parentName: null, - // permissions: "", - // pid: "0", - // resourceList: null, - // revision: 0, - // showFlag: 1, - // sort: 2, - // type: 0, - // updatedBy: "a76fc711807ac9827d7611b0f94ec220", - // updatedTime: "2020-09-02 14:49", - // url: "customer/customize/ConfigItem", - // }, - // { - // children: [], - // createdBy: "a76fc711807ac9827d7611b0f94ec220", - // createdTime: "2020-08-26 16:38", - // delFlag: null, - // icon: "icon-file-text", - // id: "8e55eba74c920c00c44c125e3bc73ddc", - // name: "居民端首页配置", - // parentName: null, - // permissions: "", - // pid: "0", - // resourceList: null, - // revision: 0, - // showFlag: 1, - // sort: 3, - // type: 0, - // updatedBy: "a76fc711807ac9827d7611b0f94ec220", - // updatedTime: "2020-09-02 14:49", - // url: "customer/customize/MiniHome", - // } - // ] - // window.SITE_CONFIG['menuList'] = menuList - // fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) - // // next({ ...to, replace: true }) - // next({ ...to, replace: true }) - // }else{ + // http + // .get("/gov/access/menu/nav") + // .then(({ data: res }) => { + // if (res.code !== 0) { + // // Vue.prototype.$message.error(res.msg) + // return next({ + // name: "login", + // }); + // } - http - .get("/gov/access/menu/nav") - .then(({ data: res }) => { - if (res.code !== 0) { - // Vue.prototype.$message.error(res.msg) - return next({ - name: "login", - }); - } - window.SITE_CONFIG["menuShujuList"] = [ + // next({ + // ...to, + // replace: true, + // }); + // }) + // .catch(() => { + // next({ + // name: "login", + // }); + // }); + window.SITE_CONFIG["menuShujuList"] = [ + { + icon: "icon-setting", + id: "22213213", + name: "基础信息", + // url: "visual/basicinfo/basicInfoMain", + children: [ { - icon: "icon-setting", - id: "22213213", + url: "/visual/basicinfo/basicInfoMain", name: "基础信息", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/basicinfo/basicInfoMain", - name: "基础信息", - id: "5feawfwaefwa5", - }, - { - url: "/visual/basicinfo/personCategory/index", - name: "人员类别分析", - id: "5fwaefwaefawef5", - }, - ], + id: "5feawfwaefwa5", }, { - icon: "icon-setting", - id: "3", - name: "人员预警", - url: "visual/warning/index", + url: "/visual/basicinfo/personCategory/index", + name: "人员类别分析", + id: "5fwaefwaefawef5", }, + ], + }, + { + icon: "icon-setting", + id: "3", + name: "人员预警", + url: "visual/warning/index", + }, + { + icon: "icon-setting", + id: "6", + name: "社区治理", + children: [ { - icon: "icon-setting", - id: "6", - name: "社区治理", - children: [ - { - url: "visual/communityGovern/processAnalyze", - name: "项目处理分析", - id: "processAnalyze", - }, - { - url: "/visual/communityGovern/typeAnalyze", - name: "项目分类分析", - id: "typeAnalyze", - }, - { - url: "/visual/communityGovern/resibuzz", - name: "居民热议", - id: "resibuzz", - }, - { - url: "/visual/communityGovern/distributionAnalyze", - name: "项目分布分析", - id: "distributionAnalyze", - }, - ], + url: "visual/communityGovern/processAnalyze", + name: "项目处理分析", + id: "processAnalyze", }, { - icon: "icon-setting", - id: "2221321001", - name: "社区党建", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/communityParty/party", - name: "党员信息统计", - id: "5feawfwaefwa578", - }, - { - url: "/visual/communityParty/community", - name: "区域化党建", - id: "5fwaefwaefawef588", - }, - ], + url: "/visual/communityGovern/typeAnalyze", + name: "项目分类分析", + id: "typeAnalyze", }, { - icon: "icon-setting", - id: "2221321123", - name: "措施清单", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/measure/service", - name: "服务措施分析", - id: "5feawfwaefwa57", - }, - { - url: "/visual/measure/volunteer", - name: "志愿者服务分析", - id: "5fwaefwaefawef58", - }, - ], + url: "/visual/communityGovern/resibuzz", + name: "居民热议", + id: "resibuzz", }, { - icon: "icon-setting", - id: "2221321fefefaewfa123", - name: "初心互助", - url: "visual/heart/index", - children: [], + url: "/visual/communityGovern/distributionAnalyze", + name: "项目分布分析", + id: "distributionAnalyze", }, - ]; - fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]); - // next({ ...to, replace: true }) - next({ - ...to, - replace: true, - }); - }) - .catch(() => { - next({ - name: "login", - }); - }); + ], + }, + { + icon: "icon-setting", + id: "2221321001", + name: "社区党建", + // url: "visual/basicinfo/basicInfoMain", + children: [ + { + url: "/visual/communityParty/party", + name: "党员信息统计", + id: "5feawfwaefwa578", + }, + { + url: "/visual/communityParty/community", + name: "区域化党建", + id: "5fwaefwaefawef588", + }, + ], + }, + { + icon: "icon-setting", + id: "2221321123", + name: "措施清单", + // url: "visual/basicinfo/basicInfoMain", + children: [ + { + url: "/visual/measure/service", + name: "服务措施分析", + id: "5feawfwaefwa57", + }, + { + url: "/visual/measure/volunteer", + name: "志愿者服务分析", + id: "5fwaefwaefawef58", + }, + ], + }, + { + icon: "icon-setting", + id: "2221321fefefaewfa123", + name: "初心互助", + url: "visual/heart/index", + children: [], + }, + ]; + fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]); http .get("/gov/access/menu/nav")