提交系统维护页面

This commit is contained in:
X1627315083
2024-02-22 10:05:24 +08:00
parent 0d85fd74e0
commit 3708ca0d34
2 changed files with 37 additions and 36 deletions

View File

@@ -70,43 +70,43 @@ const router = createRouter({
})
router.beforeEach((to, from, next) => {
// 系统维护
// const toName = to.name === 'upgrade';
// if (toName) {
// next();
// } else {
// next({ name: 'upgrade' });
// }
// 检查路由是否存在
// 机房用户
let murmurStr: any = localStorage.getItem('murmurStr')
let getIsMurmur: any = getCookie("isMurmur")
let token = getCookie("token");
let isMurmur = JSON.parse(getIsMurmur)
const routeExists = router.getRoutes().some(({ name }) =>{
if(name){
return name === to.name
}else{
return false
}
});
if (routeExists) {
if (isMurmur && murmurStr && token) {
const toName = to.name === 'login';
if (toName) {
next({ name: 'home' });
} else {
next();
}
} else {
// 如果页面存在,正常跳转
next();
}
const toName = to.name === 'upgrade';
if (toName) {
next();
} else {
// 如果页面不存在可以跳转到404页面或者其他页面
next('/404');
next({ name: 'upgrade' });
}
// 检查路由是否存在
// 机房用户
// let murmurStr: any = localStorage.getItem('murmurStr')
// let getIsMurmur: any = getCookie("isMurmur")
// let token = getCookie("token");
// let isMurmur = JSON.parse(getIsMurmur)
// const routeExists = router.getRoutes().some(({ name }) =>{
// if(name){
// return name === to.name
// }else{
// return false
// }
// });
// if (routeExists) {
// if (isMurmur && murmurStr && token) {
// const toName = to.name === 'login';
// if (toName) {
// next({ name: 'home' });
// } else {
// next();
// }
// } else {
// // 如果页面存在,正常跳转
// next();
// }
// next();
// } else {
// // 如果页面不存在可以跳转到404页面或者其他页面
// next('/404');
// }
});

View File

@@ -5,8 +5,9 @@
<i class="fi fi-rr-settings"></i>
</div>
<div class="upgrade-content-wire"></div>
<div class="upgrade-content-text">System upgrading</div>
<div class="upgrade-content-textab">The system update will begin at January 26th and is expected to be completed by January 28th.</div>
<!-- <div class="upgrade-content-text">System upgrading</div> -->
<div class="upgrade-content-text">System maintenance</div>
<!-- <div class="upgrade-content-textab">The system update will begin at January 26th and is expected to be completed by January 28th.</div> -->
</div>
</div>
</template>