From e1c1cddf9cafaa71980c74149cbbbdfd5906d431 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 18 Jul 2024 14:52:58 +0800 Subject: [PATCH] fix --- src/layouts/navbar/index.vue | 7 ++++--- src/pages/column/index.vue | 2 +- src/setting.js | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 188f3fc..a7bec39 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -13,7 +13,6 @@ - @@ -150,8 +149,10 @@ export default { }, // 跳转 jump (id) { - this.getPath(this.otherMenus, id || this.otherMenus[0].id) - this.getPath(this.menus, id || this.menus[0].id) + id = id || this.otherMenus[0].id + this.active = id + this.getPath(this.otherMenus, id) + this.getPath(this.menus, id) this.columnTo(this.toItem) this.$parent.showSearch = false } diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index b06f38e..9930792 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -679,7 +679,7 @@ export default { } } else if (typeId === 3) { // 长页栏目直接获取path - this.$router.push(`/${to.path}?id=${to.id}&siteId=${this.site}`).catch((err) => { }); + this.$router.replace(`/${to.path}?id=${to.id}&siteId=${this.site}`).catch((err) => { }); } else if (left && (typeId === 1 || (typeId === 4 && !to.children.length))) { // 常规栏目,或者没有子级的子级优先栏目,跳转到column页 this.$router.push(`/column?id=${to.id + (to.level !== 1 || !this.sameStyle ? '&column=1' : '')}&siteId=${this.site}`).catch((err) => { }); diff --git a/src/setting.js b/src/setting.js index 3c71f36..e2137eb 100644 --- a/src/setting.js +++ b/src/setting.js @@ -3,9 +3,7 @@ * */ const isDev = process.env.NODE_ENV === 'development' // 开发环境 let host = `${location.origin}/` -if (isDev) { - host = 'http://192.168.31.51:10000/' -} + const Setting = { /** * 基础配置