ad4d9e59 by renchao@pashanhoo.com

style:监管

1 parent 9901ceaa
1 /* 1 /*
2 * @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 2 * @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-05-25 14:07:28 4 * @LastEditTime: 2023-05-25 14:43:56
5 */ 5 */
6 import Vue from 'vue' 6 import Vue from 'vue'
7 import axios from "axios"; 7 import axios from "axios";
...@@ -69,23 +69,12 @@ function handleErrorData (status) { ...@@ -69,23 +69,12 @@ function handleErrorData (status) {
69 window.tokenValid = false; 69 window.tokenValid = false;
70 Message.error("由于长时间未操作,请重新登录!"); 70 Message.error("由于长时间未操作,请重新登录!");
71 localStorage.removeItem("token"); 71 localStorage.removeItem("token");
72 let code = Vue.prototype.BASE_API.CODE 72 router.replace({
73 if (code == 'BDCSBPT') { 73 path: "/login",
74 router.replace({ 74 query: {
75 path: "/login", 75 redirect: router.history.current.fullPath,
76 query: { 76 }
77 redirect: router.history.current.fullPath, 77 })
78 },
79 });
80 } else {
81 router.replace({
82 path: "/jg",
83 query: {
84 redirect: router.history.current.fullPath,
85 },
86 });
87 }
88
89 } 78 }
90 break; 79 break;
91 case 404: 80 case 404:
......