Commit 1d93242a by caoyanzhi

Merge branch 'feature/退出登录跳转' into dev

parents f4f13e8e f7af32cb
...@@ -56,17 +56,9 @@ Vue.axios.interceptors.response.use( ...@@ -56,17 +56,9 @@ Vue.axios.interceptors.response.use(
data => { data => {
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.code != 1) {
// Message.error({message: data.data.message}); if (data.data.code == '401') {
if (data.data.errorCode == 4) { window.location.href = local + '/operation-platform/#/login';
if (window.location.href.indexOf('gic-error') != -1) {
return false;
}
// window.location.href = local + '/haoban-3/#/login';
}
if (data.data.errorCode == 10 || data.data.errorCode == 7) {
// window.location.href = local + '/haoban-3/#/index';
} }
return data; return data;
} }
...@@ -89,7 +81,7 @@ Vue.axios.interceptors.response.use( ...@@ -89,7 +81,7 @@ Vue.axios.interceptors.response.use(
// window.location.href= local + "/haoban-3/#/login" // window.location.href= local + "/haoban-3/#/login"
// Message.error({message: '权限不足,请联系管理员!'}); // Message.error({message: '权限不足,请联系管理员!'});
} else { } else {
// window.location.href = local + '/haoban-3/#/login'; window.location.href = local + '/operation-platform/#/login';
Message.error({ message: '登录失效!' }); Message.error({ message: '登录失效!' });
} }
return Promise.resolve(err); return Promise.resolve(err);
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
type: 'success' type: 'success'
}); });
// 跳转登录页 // 跳转登录页
window.location.href = window.location.origin + '/haoban-3/#/login'; window.location.href = window.location.origin + '/operation-platform/#/login';
return; return;
} }
that.$message.error({ that.$message.error({
......
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