在指定地址下系统维护期间也可以访问
This commit is contained in:
@@ -511,7 +511,11 @@ router.beforeEach((to: any, from, next) => {
|
||||
if (isTimeRangePassed(time) == 'in_progress') {
|
||||
// 系统维护
|
||||
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();
|
||||
}else{
|
||||
if (toName) {
|
||||
@@ -521,6 +525,7 @@ router.beforeEach((to: any, from, next) => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
localStorage.setItem('isAdminVisit', 'false')
|
||||
|
||||
// 机房用户
|
||||
let herfData = window.location.search.substring(1);
|
||||
|
||||
Reference in New Issue
Block a user