Browse Source

Merge branch 'dev_shequzhili' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev_shequzhili

shibei_master
jiangyy 3 years ago
parent
commit
7424615aff
  1. 47
      src/router/index.js

47
src/router/index.js

@ -202,26 +202,6 @@ router.beforeEach((to, from, next) => {
const customerId = localStorage.getItem("customerId");
console.log("customerId:", customerId);
// 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"] = [
// {
// url: "/visual/plugin/power/organization",
@ -346,7 +326,6 @@ router.beforeEach((to, from, next) => {
],
},
{
icon: "icon-setting",
id: "2221321fefefaewfa123",
@ -404,6 +383,32 @@ router.beforeEach((to, from, next) => {
];
fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]);
http
.get("/gov/access/menu/nav?tableName=data_menu")
.then(({ data: res }) => {
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录
console.log("登录失效");
Vue.prototype.$message.error(res.msg);
return next({
name: "login",
});
}
// window.SITE_CONFIG["menuShujuList"] = res.data;
// fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]);
next({
...to,
replace: true,
});
})
.catch(() => {
next({
name: "login",
});
});
http
.get("/gov/access/menu/nav")
.then(({ data: res }) => {

Loading…
Cancel
Save