Browse Source

移除无用的console

chengyang
luyan 6 months ago
parent
commit
1839031fd3
  1. 22
      src/router/index.js
  2. 1
      src/views/modules/home/index.vue
  3. 14904
      yarn-error.log
  4. 14744
      yarn.lock

22
src/router/index.js

@ -206,28 +206,21 @@ function cookApiDataItem(item) {
function n2one(v) {
let ret = [];
for (let i = 0; i < v.length; i++) {
// console.log("xxxxx", v[i]);
ret.push(v[i]);
if (Array.isArray(v[i].children) && v[i].children.length > 0) {
ret.push(...n2one(v[i].children));
}
}
// console.log("aaaa", ret);
return ret;
}
let allChildrenUrl = n2one(item.children)
.filter((i) => i.url != "" && i.showFlag == 1)
.map((i) => i.url);
// console.log("))))))))))))", allChildrenUrl);
if (item.children.length > 0) {
if (item.url == "" || !allChildrenUrl.find((i) => i.url == item.url)) {
item.url = allChildrenUrl[0];
}
}
// item.children.forEach((item) => {
// item.color = "#f00";
// return item;
// });
return item;
}
// 把按钮都化为页面内部的权限
@ -998,7 +991,6 @@ router.beforeEach((to, from, next) => {
return null;
}
const match = location.href.match(/[?&]ticket=([^&#]+)/);
localStorage.setItem('ticket',match[1])
if (match && to.name == 'login') {
http.get(`/auth/xiaZhuangLogin/dealUserInfo?ticket=${match[1]}`)
.then(({ data: res }) => {
@ -1007,9 +999,6 @@ router.beforeEach((to, from, next) => {
name: 'home'
})
})
} else {
console.log("未找到 ticket 参数");
}
if (to.name === "caiji") {
@ -1035,13 +1024,10 @@ router.beforeEach((to, from, next) => {
return next();
}
const customerId = localStorage.getItem("customerId");
console.log("customerId:", customerId);
http
.get("gov/access/menu/navDigitalCommunityNew?tableName=data_menu")
.then(({ data: res }) => {
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录
console.log("登录失效");
message({
message: res.msg || "未知错误",
type: "error",
@ -1060,7 +1046,6 @@ router.beforeEach((to, from, next) => {
});
})
.catch((err) => {
console.log(err);
next({
name: "login",
query: { redirect: to.fullPath }
@ -1069,18 +1054,12 @@ router.beforeEach((to, from, next) => {
http
.get("gov/access/menu/navDigitalCommunityNew")
.then(({ data: res }) => {
console.log(res);
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录
console.log("登录失效");
message({
message: res.msg || "未知错误",
type: "error",
duration: 2 * 1000,
});
console.log(to,from,'=============sss');
return next({ name: "login" });
}
window.SITE_CONFIG["menuList"] = res.data
@ -1095,7 +1074,6 @@ router.beforeEach((to, from, next) => {
});
})
.catch((err) => {
console.log(err);
next({
name: "login",
query: { redirect: to.fullPath }

1
src/views/modules/home/index.vue

@ -1113,7 +1113,6 @@ this.getStatistics()
}
});
console.log("请求成功:", data);
});
},
async getResidentClassWarnAnalyzed() {

14904
yarn-error.log

File diff suppressed because it is too large

14744
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save