diff --git a/index.html b/index.html index e001420..a41fdf8 100644 --- a/index.html +++ b/index.html @@ -3,51 +3,8 @@ apt-nl - - - -
- diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js index 71aefd3..8ead72f 100644 --- a/src/i18n/i18n.js +++ b/src/i18n/i18n.js @@ -13,7 +13,7 @@ const messages = { zh: Object.assign(zh, zhLocale) } -console.log(messages.zh) +// console.log(messages.zh) const i18n = new VueI18n({ locale: localStorage.getItem('locale') || 'zh', diff --git a/src/pages/shells/index/index.vue b/src/pages/shells/index/index.vue index 9eeb803..d0b11d9 100644 --- a/src/pages/shells/index/index.vue +++ b/src/pages/shells/index/index.vue @@ -116,13 +116,9 @@ export default { label: '示教', index: '5', router: '/teach' - }, { - label: '地图', - index: '6', - router: '' }, { label: '系统管理', - index: '7', + index: '6', router: '/user' }], dropdown: false, @@ -132,6 +128,16 @@ export default { unclick: false } }, + beforeRouteEnter (to, from, next) { + next(vm => { + vm.menus.map(el => { + if (el.router === vm.$route.path) { + vm.activeIndex = el.index + vm.$store.dispatch('getDefaultActive', el.index) + } + }) + }) + }, watch: { oldpassword (val) { if (val === '' || this.newpassword1 === '' || this.newpassword2 === '') {