From 706a73fafa5dc952339ebe430c4545a4054b9fe4 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Wed, 12 Oct 2022 15:38:21 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86=E4=BB=A3=E7=A0=81=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/store/index.js | 4 ++-
src/store/modules/projectConfig.js | 32 +++++++++++++++++++
src/views/login/index.vue | 9 +++---
.../frontProjectConfigManage/frontConfig.vue | 12 +++----
4 files changed, 46 insertions(+), 11 deletions(-)
create mode 100644 src/store/modules/projectConfig.js
diff --git a/src/store/index.js b/src/store/index.js
index 2b18f7145..213cc4d6a 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -19,6 +19,7 @@ import iscs from './modules/iscs';
import rpTools from './modules/rpTools';
import race from './modules/race';
import trainingNew from './modules/trainingNew';
+import projectConfig from './modules/projectConfig';
import getters from './getters';
@@ -44,7 +45,8 @@ const store = new Vuex.Store({
iscs,
rpTools,
race,
- trainingNew
+ trainingNew,
+ projectConfig
},
getters
});
diff --git a/src/store/modules/projectConfig.js b/src/store/modules/projectConfig.js
new file mode 100644
index 000000000..8682222b5
--- /dev/null
+++ b/src/store/modules/projectConfig.js
@@ -0,0 +1,32 @@
+const user = {
+ state: {
+ homeProLogoWidth:0,
+ loginProLogo:'',
+ homeTitle:''
+ },
+ mutations: {
+ setHomeProLogoWidth: (state, homeProLogoWidth) => {
+ state.homeProLogoWidth = homeProLogoWidth;
+ },
+ setLoginProLogo: (state, loginProLogo) => {
+ state.loginProLogo = loginProLogo;
+ },
+ setHomeTitle: (state, homeTitle) => {
+ state.homeTitle = homeTitle;
+ }
+ },
+ actions: {
+ setHomeProLogoWidth({ commit }, homeProLogoWidth) {
+ commit('setHomeProLogoWidth', homeProLogoWidth);
+ },
+ setLoginProLogo({ commit }, loginProLogo) {
+ commit('setLoginProLogo', loginProLogo);
+ },
+ setHomeTitle({ commit }, homeTitle) {
+ commit('setHomeTitle', homeTitle);
+ }
+
+ }
+};
+
+export default user;
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index f5e39de92..f347c92da 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -42,7 +42,6 @@ export default {
showBackPic:true,
wechatLogin:true,
loginProLogoWidth:0,
- loginProLogoHeight:0,
loginOrgTitle:'',
loginProLogo:''
};
@@ -69,17 +68,19 @@ export default {
if (response.data) {
this.backProject = response.data.project;
// loginProLogoHeight
- const {showBackPic, wechatLogin, browserTitle, loginProtitle, loginProLogoWidth, loginOrgTitle, loginProLogo} = response.data.viewSetting;
+ const {showBackPic, wechatLogin, browserTitle, homeTitle, loginProtitle, loginProLogoWidth, loginOrgTitle, homeProLogoWidth, loginProLogo} = response.data.viewSetting;
this.showBackPic = showBackPic;
this.wechatLogin = wechatLogin;
this.loginProtitle = loginProtitle;
this.loginProLogoWidth = loginProLogoWidth;
- // this.loginProLogoHeight = loginProLogoHeight;
+ // this.homeProLogoWidth = homeProLogoWidth;
this.loginOrgTitle = loginOrgTitle;
this.loginProLogo = loginProLogo ? this.$store.state.user.ossUrl + '/logo/' + loginProLogo : '';
document.title = browserTitle;
document.querySelector("link[rel*='icon']").href = this.loginProLogo;
- // document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project]
+ this.$store.dispatch('projectConfig/setHomeProLogoWidth', homeProLogoWidth);
+ this.$store.dispatch('projectConfig/setLoginProLogo', this.loginProLogo);
+ this.$store.dispatch('projectConfig/setHomeTitle', homeTitle);
// aboutSystem:"主体:北京玖琏科技有限公司 备案号:京ICP备2021039716号"
// baseDevelopment
// :
diff --git a/src/views/system/frontProjectConfigManage/frontConfig.vue b/src/views/system/frontProjectConfigManage/frontConfig.vue
index 3cb8ae794..9985c3c38 100644
--- a/src/views/system/frontProjectConfigManage/frontConfig.vue
+++ b/src/views/system/frontProjectConfigManage/frontConfig.vue
@@ -32,9 +32,9 @@
-
+
+
+
@@ -88,7 +88,7 @@ export default {
loginContectInformation:false, // 登录页 是否显示联系方式
loginProLogo:'', // 登录页 logo
loginProLogoWidth:0, // 登录页 logo 宽度
- // loginProLogoHeight:0, // 登录页 logo 高度
+ homeProLogoWidth:0, // 主页 logo 宽度
browserTitle:'', // 浏览器页签名称
homeTitle:'', // 导航栏名称
@@ -145,7 +145,7 @@ export default {
this.formModel.loginProLogo = viewSetting.loginProLogo || '';
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0;
- // this.formModel.loginProLogoHeight = viewSetting.loginProLogoHeight || 0;
+ this.formModel.homeProLogoWidth = viewSetting.homeProLogoWidth || 0;
this.formModel.browserTitle = viewSetting.browserTitle || '';
this.formModel.homeTitle = viewSetting.homeTitle || '';
@@ -171,7 +171,7 @@ export default {
loginContectInformation:false, // 登录页 是否显示联系方式
loginProLogo:'', // 登录页 logo
loginProLogoWidth:'', // 登录页 logo 宽度
- // loginProLogoHeight:'', // 登录页 logo 高度
+ homeProLogoWidth:'', // 主页 logo 宽度
browserTitle:'', // 浏览器页签名称
homeTitle:'', // 导航栏名称