Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
fc170e3c5f
@ -6,8 +6,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
// import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -19,11 +19,15 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const project = getSessionStorage('project');
|
||||
this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title;
|
||||
this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
|
||||
this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
|
||||
this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
|
||||
// const project = getSessionStorage('project');
|
||||
// this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title;
|
||||
// this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
|
||||
// this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
|
||||
// this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
|
||||
this.systemTitle = this.$store.state.projectConfig.homeTitle;
|
||||
this.logoImg = this.$store.state.projectConfig.loginProLogo;
|
||||
this.navigationLogoWidth = this.$store.state.projectConfig.homeProLogoWidth + 'px';
|
||||
this.navigationMarginLeft = '60px';
|
||||
},
|
||||
methods: {
|
||||
goToMain() {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user