登陆代码调整

This commit is contained in:
joylink_cuiweidong 2022-10-12 15:38:21 +08:00
parent cf69f61494
commit 706a73fafa
4 changed files with 46 additions and 11 deletions

View File

@ -19,6 +19,7 @@ import iscs from './modules/iscs';
import rpTools from './modules/rpTools'; import rpTools from './modules/rpTools';
import race from './modules/race'; import race from './modules/race';
import trainingNew from './modules/trainingNew'; import trainingNew from './modules/trainingNew';
import projectConfig from './modules/projectConfig';
import getters from './getters'; import getters from './getters';
@ -44,7 +45,8 @@ const store = new Vuex.Store({
iscs, iscs,
rpTools, rpTools,
race, race,
trainingNew trainingNew,
projectConfig
}, },
getters getters
}); });

View File

@ -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;

View File

@ -42,7 +42,6 @@ export default {
showBackPic:true, showBackPic:true,
wechatLogin:true, wechatLogin:true,
loginProLogoWidth:0, loginProLogoWidth:0,
loginProLogoHeight:0,
loginOrgTitle:'', loginOrgTitle:'',
loginProLogo:'' loginProLogo:''
}; };
@ -69,17 +68,19 @@ export default {
if (response.data) { if (response.data) {
this.backProject = response.data.project; this.backProject = response.data.project;
// loginProLogoHeight // 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.showBackPic = showBackPic;
this.wechatLogin = wechatLogin; this.wechatLogin = wechatLogin;
this.loginProtitle = loginProtitle; this.loginProtitle = loginProtitle;
this.loginProLogoWidth = loginProLogoWidth; this.loginProLogoWidth = loginProLogoWidth;
// this.loginProLogoHeight = loginProLogoHeight; // this.homeProLogoWidth = homeProLogoWidth;
this.loginOrgTitle = loginOrgTitle; this.loginOrgTitle = loginOrgTitle;
this.loginProLogo = loginProLogo ? this.$store.state.user.ossUrl + '/logo/' + loginProLogo : ''; this.loginProLogo = loginProLogo ? this.$store.state.user.ossUrl + '/logo/' + loginProLogo : '';
document.title = browserTitle; document.title = browserTitle;
document.querySelector("link[rel*='icon']").href = this.loginProLogo; 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:" ICP2021039716" // aboutSystem:" ICP2021039716"
// baseDevelopment // baseDevelopment
// : // :

View File

@ -32,9 +32,9 @@
<el-form-item label="登录页Logo宽度:" prop="loginProLogoWidth" class="inlineBlock" style="margin-left:10px"> <el-form-item label="登录页Logo宽度:" prop="loginProLogoWidth" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.loginProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" /> <el-input-number v-model="formModel.loginProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="登录页Logo高度:" prop="loginProLogoHeight" class="inlineBlock" style="margin-left:10px"> <el-form-item label="主页Logo宽度:" prop="homeProLogoWidth" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.loginProLogoHeight" size="small" style="width: 210px;" :min="0" :step="1" /> <el-input-number v-model="formModel.homeProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item> --> </el-form-item>
<el-form-item label="页签名称:" prop="browserTitle" class="inlineBlock"> <el-form-item label="页签名称:" prop="browserTitle" class="inlineBlock">
<el-input v-model="formModel.browserTitle" style="width: 210px;" size="small" /> <el-input v-model="formModel.browserTitle" style="width: 210px;" size="small" />
</el-form-item> </el-form-item>
@ -88,7 +88,7 @@ export default {
loginContectInformation:false, // loginContectInformation:false, //
loginProLogo:'', // logo loginProLogo:'', // logo
loginProLogoWidth:0, // logo loginProLogoWidth:0, // logo
// loginProLogoHeight:0, // logo homeProLogoWidth:0, // logo
browserTitle:'', // browserTitle:'', //
homeTitle:'', // homeTitle:'', //
@ -145,7 +145,7 @@ export default {
this.formModel.loginProLogo = viewSetting.loginProLogo || ''; this.formModel.loginProLogo = viewSetting.loginProLogo || '';
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0; 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.browserTitle = viewSetting.browserTitle || '';
this.formModel.homeTitle = viewSetting.homeTitle || ''; this.formModel.homeTitle = viewSetting.homeTitle || '';
@ -171,7 +171,7 @@ export default {
loginContectInformation:false, // loginContectInformation:false, //
loginProLogo:'', // logo loginProLogo:'', // logo
loginProLogoWidth:'', // logo loginProLogoWidth:'', // logo
// loginProLogoHeight:'', // logo homeProLogoWidth:'', // logo
browserTitle:'', // browserTitle:'', //
homeTitle:'', // homeTitle:'', //