Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -30,8 +30,8 @@ axios.interceptors.response.use(
|
|||
(error) => {
|
||||
if (error.response) {
|
||||
if (error.response.status == 401) {
|
||||
// console.log(error.response,"响应拦截器失败")
|
||||
ElMessage.error("请重新登录!");
|
||||
// console.log(error.response,"响应拦截器失败")
|
||||
// window.location.href = '/#/login?returnURL=' + window.location.href
|
||||
// window.location.href =
|
||||
// "http://220.191.238.50:996/api/login?returnURL=" +
|
||||
|
@ -45,9 +45,8 @@ axios.interceptors.response.use(
|
|||
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
|
||||
}
|
||||
router.replace({
|
||||
path: '/guide'
|
||||
path: "/guide",
|
||||
});
|
||||
|
||||
} else if (error.response.status == 404) {
|
||||
ElMessage.error("Status:404,正在请求不存在的服务器记录!");
|
||||
} else if (error.response.status == 500) {
|
||||
|
|
|
@ -159,7 +159,9 @@ const login = () => {
|
|||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
// document.cookie='lytoken=6b0e380b4a8f46baae4923f83faf670d'
|
||||
var token = getCookie("lytoken");
|
||||
|
||||
// var token = '6b0e380b4a8f46baae4923f83faf670d';
|
||||
// console.log('token', token)
|
||||
if (!token) {
|
||||
|
@ -199,16 +201,6 @@ onMounted(() => {
|
|||
// 调用函数清空所有 cookie
|
||||
// clearCookies();
|
||||
login();
|
||||
// let token = tools.data.get("token");
|
||||
// console.log(token, "token");
|
||||
// if (token == null) {
|
||||
// ElMessage.error({
|
||||
// message: "请重新登录!",
|
||||
// offset: 100,
|
||||
// });
|
||||
// window.location.href =
|
||||
// "http://220.191.238.50:996/api/login?returnURL=" + window.location.href;
|
||||
// }
|
||||
reset_font();
|
||||
reset_font();
|
||||
});
|
||||
|
|