From ff0c5bb9f8136d5b9404b0c0a00f37911456ff41 Mon Sep 17 00:00:00 2001 From: yj <2077506045@qq.com> Date: 星期一, 25 十一月 2024 11:51:56 +0800 Subject: [PATCH] 更新CAQ --- src/layout/index.vue | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index abbd80c..cd989c8 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,6 +1,6 @@ <template> <el-container> - <el-header height="60" class="student-header header" :style="{'background-color': logo!='none'?'#fff':'#409eff'}"> + <el-header height="60" class="student-header header" :style="{'background-color': backgroundColor}"> <div class="head-language" v-if="langFlag"> <!--<lang-select class="right-menu-item" />--> <!--鍥介檯鍖栫殑璇█閫夋嫨--> @@ -25,8 +25,8 @@ <el-main class="student-main" style="margin-top:20px;"> <router-view/> </el-main> - <el-footer height="340" class="student-footer"> - </el-footer> + <!-- <el-footer height="340" class="student-footer"> + </el-footer> --> </el-container> </template> @@ -39,6 +39,7 @@ return { defaultUrl: '/index', logoHeight: 50, + backgroundColor: '#fff', userInfo: { imagePath: null }, @@ -48,6 +49,8 @@ } }, created () { + console.log('鐜鍙橀噺锛�') + console.log(process.env) }, watch: { logo: function (val) { @@ -55,34 +58,34 @@ if (this.productType === 'API_Fan') { this.logoUrl = require('@/assets/logo-apifan.png') } else if (val === 'none') { + this.backgroundColor = '#409eff' this.logoUrl = require('@/assets/logo-t.png') } else if (val !== null) { this.logoUrl = val + this.backgroundColor = '#fff' } else if (sessionLogoUrl !== null) { this.logoUrl = sessionLogoUrl } - console.log('logoUrl:' + this.logoUrl) sessionStorage.setItem('logoUrl', this.logoUrl) + sessionStorage.setItem('backgroundColor', this.backgroundColor) } }, mounted () { let sessionLogoUrl = sessionStorage.getItem('logoUrl') + let sessionBackgroundColor = sessionStorage.getItem('backgroundColor') if (sessionLogoUrl !== null) { this.logoUrl = sessionLogoUrl + this.backgroundColor = sessionBackgroundColor } + sessionStorage.setItem('backgroundColor', this.backgroundColor) window.addEventListener('beforeunload', this.handleBeforeUnload) - window.addEventListener('unload', this.handleUnload) }, beforeDestroy () { window.removeEventListener('beforeunload', this.handleBeforeUnload) - window.removeEventListener('unload', this.handleUnload) }, methods: { handleBeforeUnload: function () { sessionStorage.setItem('logoUrl', this.logoUrl) - }, - handleUnload: function () { - console.log('宸茬粡鍒锋柊') }, logout: function () { window.opener = null -- Gitblit v1.9.1