2f686431 by renchao@pashanhoo.com

style:request判断的完成

1 parent 5c31de25
{
"TITLE": "汉中市数据上报系统",
"THEME": "sb",
"CODE": "BDCJGPT",
"CODE": "BDCSBPT",
"SERVERAPI": "/bdcsjsb",
"calcHeight": 160,
"echartTextColor": "#4A4A4A",
......
/*
* @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
* @Autor: renchao
* @LastEditTime: 2023-03-21 15:03:37
* @LastEditTime: 2023-03-29 10:14:34
*/
import Vue from 'vue'
import axios from "axios";
import { Message } from "element-ui";
import { endLoadingSubCount } from "./requestLoading";
......@@ -68,12 +69,23 @@ function handleErrorData (status) {
window.tokenValid = false;
Message.error("由于长时间未操作,请重新登录!");
localStorage.removeItem("token");
router.replace({
path: "/jg",
query: {
redirect: router.history.current.fullPath,
},
});
let code = Vue.prototype.BASE_API.CODE
if (code == 'BDCSBPT') {
router.replace({
path: "/sb",
query: {
redirect: router.history.current.fullPath,
},
});
} else {
router.replace({
path: "/jg",
query: {
redirect: router.history.current.fullPath,
},
});
}
}
break;
case 403:
......