更新
This commit is contained in:
@@ -2,8 +2,8 @@ import axios from 'axios'
|
||||
import { wsuri_config, name_config, name1_config, name3_config, name4_config, readFile_config, readImg_config, upload_config, upload2_config, upload3_config, uploadInvoiceScan_config, uploadInvoiceScan1_config,
|
||||
download_config, uploadPerson_config, uploadOP_config, url_config, ExcelDownLoad_config, ServerIP_config, uploadFileMachine_config,
|
||||
downloadFileMachine_config, MESUploadFile_config, MESDownloadFile_config, request_config } from '../../static/config'
|
||||
// import Cookies from 'js-cookie'
|
||||
// import store from '@/store'
|
||||
import Cookies from 'js-cookie'
|
||||
import store from '@/store'
|
||||
|
||||
export const wsuri = wsuri_config
|
||||
export const name = name_config
|
||||
@@ -36,16 +36,17 @@ const service = axios.create({
|
||||
|
||||
// && config.data.name !== '菜单系统模块_通知信息_查询数据' && config.data.name !== '菜单系统模块_首页信息_查询数据1' && config.data.name !== '菜单系统模块_首页信息_查询数据2'
|
||||
service.interceptors.request.use(config => {
|
||||
// if (config.data.name !== '菜单系统模块_用户名密码_查询数据_new2' && config.data.name !== '菜单系统模块_获取角色模块_查询数据') {
|
||||
// getSession_id().then(res => {
|
||||
// if (res === 0) {
|
||||
// store.dispatch('FedLogOut').then(() => {
|
||||
// location.reload() // 为了重新实例化vue-router对象 避免bug
|
||||
// alert('此账号已异地登录,请查重新登录')
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
if (config.data.name !== '菜单系统模块_用户名密码_查询数据_new2' && config.data.name !== '菜单系统模块_获取角色模块_查询数据') {
|
||||
const id = Cookies.get('id')
|
||||
if (id) {
|
||||
console.log(id, 123)
|
||||
} else {
|
||||
store.dispatch('FedLogOut').then(() => {
|
||||
location.reload() // 为了重新实例化vue-router对象 避免bug
|
||||
alert('此账号登录失效,请重新登录')
|
||||
})
|
||||
}
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
Promise.reject(error)
|
||||
|
||||
Reference in New Issue
Block a user