Browse Source

404页面闪动问题

shibei_master
dai 4 years ago
parent
commit
67a2b2362c
  1. 88
      src/router/index.js

88
src/router/index.js

@ -161,66 +161,27 @@ 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",
});
}
// next({
// ...to,
// replace: true,
// });
// })
// .catch(() => {
// next({
// name: "login",
// });
// });
window.SITE_CONFIG["menuShujuList"] = [
{
icon: "icon-setting",
@ -318,17 +279,6 @@ router.beforeEach((to, from, next) => {
},
];
fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]);
// next({ ...to, replace: true })
next({
...to,
replace: true,
});
})
.catch(() => {
next({
name: "login",
});
});
http
.get("/gov/access/menu/nav")

Loading…
Cancel
Save