在指定地址下系统维护期间也可以访问

This commit is contained in:
X1627315083
2025-12-15 13:33:47 +08:00
parent b3c396ba9c
commit b01a375acc

View File

@@ -511,7 +511,11 @@ router.beforeEach((to: any, from, next) => {
if (isTimeRangePassed(time) == 'in_progress') { if (isTimeRangePassed(time) == 'in_progress') {
// 系统维护 // 系统维护
const toName = to.name === 'upgrade'; const toName = to.name === 'upgrade';
if(upgradeList.indexOf(to.path) > -1){ if(to.query.status == 'admin'){
localStorage.setItem('isAdminVisit', 'true')
}
const isAdminVisit = localStorage.getItem('isAdminVisit') == 'true'
if(upgradeList.indexOf(to.path) > -1 || isAdminVisit){
next(); next();
}else{ }else{
if (toName) { if (toName) {
@@ -521,6 +525,7 @@ router.beforeEach((to: any, from, next) => {
} }
} }
} else { } else {
localStorage.setItem('isAdminVisit', 'false')
// 机房用户 // 机房用户
let herfData = window.location.search.substring(1); let herfData = window.location.search.substring(1);