修改死数据配置,token失效问题

This commit is contained in:
wuhongjian 2022-06-23 17:56:40 +08:00
parent 5430330eaf
commit c97201645b
6 changed files with 76 additions and 17 deletions

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-23 14:17:52
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-23 17:55:06
* @Description: 数据资源参数配置
*/
const newLocation = 'qingdao'
@ -14,6 +14,8 @@ const whoShow = {}
const launchedDataNumObject = {}
//
const navListManagement = {}
//
const mapTestNum = {}
//
const footerDataList = {}
// qingdao
@ -51,6 +53,45 @@ if (newLocation === 'qingdao') {
},
],
}
mapTestNum.lsNum = [
{
name: '基础设施',
key: 'lsjcss',
num: 20135,
},
{
name: '数据资源',
key: 'lsjcss',
num: 857,
},
{
name: '应用资源',
key: 'lsjcss',
num: 28,
},
]
mapTestNum.xhaNum = [
{
name: '基础设施',
key: 'xhajcss',
num: 35282,
},
{
name: '数据资源',
key: 'xhajcss',
num: 11,
},
{
name: '应用资源',
key: 'xhajcss',
num: 23,
},
{
name: '组件服务',
key: 'xhazjfw',
num: 8,
},
]
}
// baotou
else if (newLocation === 'baotou') {

View File

@ -90,6 +90,7 @@ instance.interceptors.response.use(
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
if (keys) {
@ -109,7 +110,9 @@ instance.interceptors.response.use(
}
}
console.log('已清除')
router.push({ path: '/login' })
setTimeout(() => {
location.reload()
}, 1000)
}
response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data
@ -170,7 +173,9 @@ instance.interceptors.response.use(
}
}
console.log('已清除')
router.push({ path: '/login' })
setTimeout(() => {
location.reload()
}, 1000)
}
if (response.headers.redirect) {
window.location.href = response.headers.redirect

View File

@ -89,7 +89,7 @@
dataList.value.dataList = res.data.data
res.data.data.map((item, index) => {
if (dataList.value.dataList[index].type === '数据资源') {
dataList.value.dataList[index].amount = dataSourceNum.value || 10433
dataList.value.dataList[index].amount = dataSourceNum.value || 0
}
dataList.value.dataList[index].organization = '个'
dataList.value.dataList[index].photo = photo.value[index]

View File

@ -544,7 +544,6 @@
</div>
</div>
</div>
-->
<div v-if="resourceList.data?.length <= 0" style="margin-top: 2rem">
<a-empty v-if="!(Cardsname == '数据资源')" />
</div>

View File

@ -2,7 +2,7 @@
<home-header></home-header>
<div class="survey-left" @click="hidePop()">
<div ref="cityMap" class="city-map-content-echarts"></div>
<div class="box xha" v-show="xhaFlag">
<div class="box xha" v-show="xhaFlag" v-if="xhaList">
<div class="top">
<span>西海岸</span>
<span>
@ -11,12 +11,12 @@
</span>
</div>
<div class="bottom">
<div class="item">
<span>基础设施</span>
<div class="item" v-for="item in xhaList" :key="item.key">
<span>{{ item.name }}</span>
<i></i>
<span>35282</span>
<span>{{ item.num }}</span>
</div>
<div class="item">
<!-- <div class="item">
<span>数据资源</span>
<i></i>
<span>11</span>
@ -30,11 +30,11 @@
<span>组件服务</span>
<i></i>
<span>8</span>
</div>
</div> -->
</div>
<div class="zx"></div>
</div>
<div class="box lsq" v-show="lsqFlag">
<div class="box lsq" v-show="lsqFlag" v-if="lsList">
<div class="top">
<span>崂山区</span>
<span>
@ -43,7 +43,12 @@
</span>
</div>
<div class="bottom">
<div class="item">
<div class="item" v-for="item in lsList" :key="item.key">
<span>{{ item.name }}</span>
<i></i>
<span>{{ item.num }}</span>
</div>
<!-- <div class="item">
<span>基础设施</span>
<i></i>
<span>20135</span>
@ -57,7 +62,7 @@
<span>应用资源</span>
<i></i>
<span>28</span>
</div>
</div> -->
</div>
<div class="zx"></div>
</div>
@ -73,6 +78,15 @@
const echarts = require('echarts')
const xhaFlag = ref(false)
const lsqFlag = ref(false)
const lsList = ref([])
const xhaList = ref([])
// eslint-disable-next-line no-undef
const mapTestNum1 = mapTestNum
if (mapTestNum1) {
lsList.value = mapTestNum1.lsNum
xhaList.value = mapTestNum1.xhaNum
}
console.log('===============>', mapTestNum1)
const areaMenuList = ref([
//
// {

View File

@ -104,7 +104,7 @@
const whoShow1 = ref(whoShow)
const getAppResources = (type, obj) => {
paramsGetResources.type = type
if (type === '数据资源') {
if (type === '数据资源' && !whoShow1.value.itShowBaoTou) {
getDataResource({
serviceName: paramsGetResources.name, //
orderField: whoShow1.value.itShowQingDao ? 'fbrq' : 'createTime', //
@ -138,7 +138,7 @@
})
} else {
pageWithAttrs(paramsGetResources).then((res) => {
console.log('知识库查询列表============>', res.data.data.records)
// console.log('============>', res.data.data.records)
obj.value = res.data.data.records
})
}