From 405f78e79380117970f812cb4f614d992f78cee4 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 22 Feb 2024 10:55:08 +0800 Subject: [PATCH] fix --- src/layouts/navbar/index.vue | 6 +++--- src/setting.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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/' }