diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 27191ba..b473b7d 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -108,9 +108,9 @@ export default { this.showMoreBtns = false this.menus = menuVisibleData } - if (data.length) { - if (!this.$route.query.id && !this.$route.query.articleId && this.$route.path !== '/column/result') this.$router.replace(`/column?id=${data[0].id}&siteId=${data[0].siteId}`) - if (!this.active) this.active = data[0].id + if (menuVisibleData.length) { + if (!this.$route.query.id && !this.$route.query.articleId && this.$route.path !== '/column/result') this.$router.replace(`/column?id=${menuVisibleData[0].id}&siteId=${menuVisibleData[0].siteId}`) + if (!this.active) this.active = menuVisibleData[0].id this.$nextTick(() => { const menu = document.querySelectorAll('.el-submenu') for (let i = 0; i < menu.length; i++) { diff --git a/src/setting.js b/src/setting.js index 97a9da7..ef7b507 100644 --- a/src/setting.js +++ b/src/setting.js @@ -5,7 +5,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境 let host = `${location.origin}/` if (isDev) { // host = 'http://192.168.31.52:10000/' - host = 'http://192.168.31.136:10000/' + host = 'http://192.168.31.51:10000/' // host = 'http://10.10.11.7/' }