fix: 清除页面报错 修改登录缓存的我替你
This commit is contained in:
@@ -15,6 +15,11 @@ export default {
|
||||
browserWindowZoom
|
||||
},
|
||||
async created () {
|
||||
const herfSpiltArr = window.location.href.split('/')
|
||||
if (herfSpiltArr[3] !== '#') {
|
||||
herfSpiltArr[3] = '#'
|
||||
window.location.href = herfSpiltArr.join('/')
|
||||
}
|
||||
const Timestamp = new Date().getTime()
|
||||
const url = 'static/config.json?Timestamp=' + Timestamp
|
||||
const result = await this.$http.get(url)
|
||||
@@ -24,6 +29,8 @@ export default {
|
||||
sessionStorage.clear()
|
||||
localStorage.clear()
|
||||
localStorage.setItem('nz-version', version)
|
||||
herfSpiltArr[2] = herfSpiltArr[2] + '?t=' + new Date().getTime()
|
||||
window.location.href = herfSpiltArr[0] + '//' + herfSpiltArr[2]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1481,7 +1481,7 @@ export default {
|
||||
},
|
||||
getEndpointInfoChartData (chartInfo) {
|
||||
const detail = []
|
||||
this.$refs['editChart' + chartInfo.id][0].showLoad()
|
||||
this.$refs['editChart' + chartInfo.id][0] && this.$refs['editChart' + chartInfo.id][0].showLoad()
|
||||
chartInfo.name = this.$t('project.chart.endpointInfo')
|
||||
chartInfo.from = fromRoute.endpoint
|
||||
const basicInfo = JSON.parse(JSON.stringify(this.obj))
|
||||
|
||||
@@ -20,16 +20,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (res.inited === 0) {
|
||||
next({ path: '/setup' })
|
||||
} else {
|
||||
if (new Date().getTime() - to.query.t < 5 * 60 * 1000) {
|
||||
next()
|
||||
} else {
|
||||
next({
|
||||
path: to.path,
|
||||
query: {
|
||||
t: new Date().getTime()
|
||||
}
|
||||
})
|
||||
}
|
||||
next()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user