Commit 0186f589 by crushh

Merge branch 'feature/2月迭代' into dev

parents 1f02393b d30be4c7
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<link rel="shortcut icon" href="./favicon.ico" /> <link rel="shortcut icon" href="./favicon.ico" />
<title>好办管理平台</title> <title>好办管理平台</title>
<link rel="stylesheet" type="text/css" href="//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.69.css" /> <link rel="stylesheet" type="text/css" href="//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.69.css" />
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1628375_cl07xa4zqij.css" /> <!--好办后台3.0--> <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1628375_b9ejwjvcr7.css" /> <!--好办后台3.0-->
<script src="//at.alicdn.com/t/font_1628375_cl07xa4zqij.js"></script> <script src="//at.alicdn.com/t/font_1628375_b9ejwjvcr7.js"></script>
</head> </head>
<body style="min-width: 1400px;" class="damolish"> <body style="min-width: 1400px;" class="damolish">
......
...@@ -66,17 +66,13 @@ Vue.axios.interceptors.response.use( ...@@ -66,17 +66,13 @@ Vue.axios.interceptors.response.use(
removePending(data.config); //在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除 removePending(data.config); //在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除
// console.log(data); // console.log(data);
if (data.status && data.status == 200 && data.data.errorCode != 1) { if (data.status && data.status == 200 && data.data.errorCode != 1) {
// Message.error({message: data.data.message});
if (data.data.errorCode == 4) { if (data.data.errorCode == 4) {
if (window.location.href.indexOf('gic-error') != -1) { if (window.location.href.indexOf('gic-error') != -1) {
return false; return false;
} }
window.location.href = local + '/haoban-3/#/login'; window.location.href = local + '/haoban-3/#/login';
} }
/* if (data.data.errorCode == 3) {
Message.error({ message: data.data.message });
window.location.href = local + '/haoban-3/#/login';
} */
if (data.data.errorCode == 10 || data.data.errorCode == 7) { if (data.data.errorCode == 10 || data.data.errorCode == 7) {
window.location.href = local + '/haoban-3/#/index'; window.location.href = local + '/haoban-3/#/index';
} }
...@@ -85,22 +81,11 @@ Vue.axios.interceptors.response.use( ...@@ -85,22 +81,11 @@ Vue.axios.interceptors.response.use(
return data; return data;
}, },
err => { err => {
// console.log(err, typeof err, err.response);
if (Vue.axios.isCancel(err)) {
// console.log('请求取消');
}
if (err.response.status == 502) { if (err.response.status == 502) {
window.location.href = local + '/haoban-3/#/login'; window.location.href = local + '/haoban-3/#/login';
Message.error({ message: '服务异常⊙﹏⊙∥' }); Message.error({ message: '服务异常⊙﹏⊙∥' });
} }
// Message.error({message: err.response.message}); if (err.response.status != 403) {
if (err.response.status == 504 || err.response.status == 404) {
// window.location.href= local + "/haoban-3/#/login"
// Message.error({message: '服务异常⊙﹏⊙∥'});
} else if (err.response.status == 403) {
// window.location.href= local + "/haoban-3/#/login"
// Message.error({message: '权限不足,请联系管理员!'});
} else {
window.location.href = local + '/haoban-3/#/login'; window.location.href = local + '/haoban-3/#/login';
Message.error({ message: '登录失效!' }); Message.error({ message: '登录失效!' });
} }
...@@ -154,8 +139,7 @@ export const postJsonRequest = (url, params) => { ...@@ -154,8 +139,7 @@ export const postJsonRequest = (url, params) => {
return Vue.axios({ return Vue.axios({
method: 'post', method: 'post',
url: `${local}${url}`, url: `${local}${url}`,
data: '{}', data: params,
params: params,
headers: { 'Content-Type': 'application/json;charset=UTF-8' } //multipart/form-data{"token": token} headers: { 'Content-Type': 'application/json;charset=UTF-8' } //multipart/form-data{"token": token}
}); });
}; };
......
...@@ -363,6 +363,7 @@ export default { ...@@ -363,6 +363,7 @@ export default {
} }
return father.parentDepartmentId == 0; //返回第一层 return father.parentDepartmentId == 0; //返回第一层
}); });
console.log(tree);
return tree; return tree;
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment