diff --git a/nezha-fronted/src/App.vue b/nezha-fronted/src/App.vue index 793aee4c0..a0d76882b 100644 --- a/nezha-fronted/src/App.vue +++ b/nezha-fronted/src/App.vue @@ -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] } } } diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 32b4d8a0f..31a350f7d 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -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)) diff --git a/nezha-fronted/src/permission.js b/nezha-fronted/src/permission.js index a0f474bb9..8effb545b 100644 --- a/nezha-fronted/src/permission.js +++ b/nezha-fronted/src/permission.js @@ -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() } } })