增加没有分配菜单的拦截功能

This commit is contained in:
2026-07-15 09:07:12 +08:00
parent 4edaca03cf
commit bafe23a43c
3 changed files with 26 additions and 7 deletions

View File

@@ -246,6 +246,11 @@ export default {
: undefined;
this.getCookie();
},
watch: {
'$route.query.menu_error'() {
this.loading = false;
},
},
destroyed() {
document.body.style['min-height'] = 'unset';
},
@@ -293,7 +298,9 @@ export default {
)
.then(() => {
console.log(this.redirect, this.$route.query.redirect, 'this.redirect');
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
this.$router.push({ path: this.redirect || '/' }).catch(() => {
this.loading = false;
});
})
.catch(() => {
this.loading = false;