From f03da32e215b48f734781d6b4b1e21d4e90c9521 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 12 Oct 2022 17:32:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Title.vue | 1 - src/permission.js | 8 ++++++-- src/store/modules/permission.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/layout/components/Title.vue b/src/layout/components/Title.vue index 384bb0f63..0c0f50a8a 100644 --- a/src/layout/components/Title.vue +++ b/src/layout/components/Title.vue @@ -24,7 +24,6 @@ export default { // this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project]; // this.navigationLogoWidth = loginInfo[project].navigationLogoWidth; // this.navigationMarginLeft = loginInfo[project].navigationMarginLeft; - console.log('🚀 ~ file: Title.vue ~ line 28 ~ mounted ~ projectConfig', this.$store.state.projectConfig); this.systemTitle = this.$store.state.projectConfig.homeTitle; this.logoImg = this.$store.state.projectConfig.loginProLogo; this.navigationLogoWidth = this.$store.state.projectConfig.homeProLogoWidth + 'px'; diff --git a/src/permission.js b/src/permission.js index f5cf13904..47e9b90d7 100644 --- a/src/permission.js +++ b/src/permission.js @@ -114,7 +114,7 @@ router.beforeEach( async (to, from, next) => { // } const response = await getFrontProjectConfigByLogin(project); if (response.data) { - const {browserTitle, loginProLogo, baseApiUrl, baseSite, caseShow, ossUrl} = response.data.viewSetting; + const {browserTitle, loginProLogo, baseApiUrl, baseSite, caseShow, ossUrl, homeTitle, homeProLogoWidth} = response.data.viewSetting; if (!store.state.user.baseUrl && project) { const urlData = handlerUrl(); store.dispatch('setBaseUrl', baseApiUrl || urlData.BASE_API); @@ -123,8 +123,12 @@ router.beforeEach( async (to, from, next) => { subscribe(); } document.title = browserTitle; - document.querySelector("link[rel*='icon']").href = loginProLogo ? '/oss-rtss/logo/' + loginProLogo : ''; + const url = loginProLogo ? store.state.user.ossUrl + '/logo/' + loginProLogo : ''; + document.querySelector("link[rel*='icon']").href = url; store.commit('setCaseShow', caseShow); + store.dispatch('setHomeProLogoWidth', homeProLogoWidth); + store.dispatch('setLoginProLogo', url); + store.dispatch('setHomeTitle', homeTitle); NProgress.start(); const loginPath = getRouteInfo(to, response.data.markKey); const token = to.query.token; diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 918aca4f5..63a76fd8b 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -110,7 +110,7 @@ const permission = { if (route.children && route.children.length == 0) { route.hidden = true; } - if (route.path == '/case') { + if (route.path == '/case') { // 案例菜单是否显示 route.hidden = !rootState.projectConfig.caseShow; } });