perf: 首页判断是否登录优先于判断是否需要启动首页

This commit is contained in:
韦荣超 2022-02-25 15:57:03 +08:00
parent 7428022b2f
commit 011fc8cc9e

View File

@ -245,12 +245,14 @@ export default {
url: "system/get/starthome",
})
.then(({data}) => {
this.needStartHome = !!data.need_start;
this.homeFooter = data.home_footer;
if (this.$store.state.userId > 0) {
this.goForward({path: '/manage/dashboard'}, true);
} else if (this.needStartHome === false) {
this.goForward({path: '/login'}, true);
} else {
this.needStartHome = !!data.need_start;
if (this.needStartHome === false) {
this.goForward({path: '/login'}, true);
}
}
})
.catch(() => {