diff --git a/front/public/static/config/location.js b/front/public/static/config/location.js index f4ff914d..b6668da1 100644 --- a/front/public/static/config/location.js +++ b/front/public/static/config/location.js @@ -2,12 +2,12 @@ * @Author: hisense.wuhongjian * @Date: 2020-07-07 16:03:23 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-06-22 16:18:47 + * @LastEditTime: 2022-06-23 10:53:31 * @Description: 数据资源参数配置 */ // const newLocation = 'qingdao' // const newLocation = 'baotou' -const newLocation = 'qingdao' +const newLocation = 'xihaian' // 数据资源数据 const whoShow = {} diff --git a/front/src/utils/request.js b/front/src/utils/request.js index a939dd25..b9b36c15 100644 --- a/front/src/utils/request.js +++ b/front/src/utils/request.js @@ -129,7 +129,28 @@ instance.interceptors.response.use( if (error.response && error.response.data) { console.log('接口返回', response) console.log('接口返回headers', response.headers) - console.log('接口返回REDIRECT', response.headers.redirect) + console.log('接口返回REDIRECT1111', response.headers.redirect) + if (response.headers.redirect === '/#/login') { + var keys = document.cookie.match(/[^ =;]+(?=\=)/g) + if (keys) { + for (var i = keys.length; i--; ) { + document.cookie = + keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString() //清除当前域名下的,例如:m.kevis.com + document.cookie = + keys[i] + + '=0;path=/;domain=' + + document.domain + + ';expires=' + + new Date(0).toUTCString() //清除当前域名下的,例如 .m.kevis.com + document.cookie = + keys[i] + + '=0;path=/;domain=kevis.com;expires=' + + new Date(0).toUTCString() //清除一级域名下的或指定的,例如 .kevis.com + } + } + console.log('已清除') + location.reload() + } if (response.headers.redirect) { window.location.href = response.headers.redirect return Promise.reject(error) diff --git a/front/src/views/newHome/components/CapabilityConvergence.vue b/front/src/views/newHome/components/CapabilityConvergence.vue index 3a02c403..1b5ecd85 100644 --- a/front/src/views/newHome/components/CapabilityConvergence.vue +++ b/front/src/views/newHome/components/CapabilityConvergence.vue @@ -34,24 +34,28 @@