diff --git a/src/views/components/topnav/topnav-menu.vue b/src/views/components/topnav/topnav-menu.vue index 114a5c051856a127b6da873e943f4044598f6e9f..76e61264f8d5794789d8452d3e8ddef084c84187 100644 --- a/src/views/components/topnav/topnav-menu.vue +++ b/src/views/components/topnav/topnav-menu.vue @@ -85,7 +85,19 @@ export default { } this.$route.meta.clearHistory = true; if (module === MODULEID) { - this.$router.push(path); + let defaultPage = ''; + try { + const moduleList = JSON.parse(localStorage.getItem('moduleList')); + defaultPage = + moduleList.find(module => { + return module.moduleId === MODULEID; + }).defaultPage || '/welcome'; + } catch { + defaultPage = '/welcome'; + } + this.$router.push({ + path: defaultPage + }); } else { let that = this.$root.$children[0] ? this.$root.$children[0].$refs.root : null;//获取router-view 的vue 对象 this.$utils.gotoHref(`${HOME}/${module}.html#${path}`, that);