|
|
@@ -33,7 +33,12 @@ service.interceptors.request.use(
|
|
|
} else if (router.history.current !== null && router.history.current.query.TenantId) {
|
|
|
config.headers.TenantId = router.history.current.query.TenantId
|
|
|
sessionStorage.TenantId = router.history.current.query.TenantId;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
+ if (router.history._startLocation.indexOf("?TenantId=") !== -1) {
|
|
|
+ var a = router.history._startLocation.slice(router.history._startLocation.indexOf("=") +1, router.history._startLocation.indexOf("?TenantId=").length)
|
|
|
+ config.headers.TenantId = a
|
|
|
+ sessionStorage.TenantId = a
|
|
|
+ }
|
|
|
console.log('router.history:',router.history)
|
|
|
console.log('sessionStorage.TenantId:',sessionStorage.TenantId)
|
|
|
}
|
|
|
@@ -63,7 +68,7 @@ service.interceptors.response.use(
|
|
|
Message.error(response.data.msg)
|
|
|
store.dispatch('outLogin').then(() => {
|
|
|
delCookie('token')
|
|
|
- if(router.history.current.name == "login"){
|
|
|
+ if (router.history.current.name == "login") {
|
|
|
return
|
|
|
}
|
|
|
setTimeout(() => {
|