918f6962 by renchao@pashanhoo.com

style:router

1 parent 971be918
/*
* @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
* @Autor: renchao
* @LastEditTime: 2023-06-02 10:07:55
* @LastEditTime: 2023-06-02 10:18:32
*/
import axios from 'axios'
import Router from '@/router'
import Cookies from 'js-cookie'
import { Message } from 'element-ui'
import { endLoadingSubCount } from './requestLoading'
......@@ -78,14 +80,13 @@ service.interceptors.response.use(
} else {
Cookies.remove('token')
}
if (window._config.casEnable) {
window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(locationUrl);
} else {
router.replace({
Router.replace({
path: '/login',
query: {
redirect: router.currentRoute.value.fullPath
redirect: Router.currentRoute.value.fullPath
}
})
return false
......