| | |
| | | <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> |
| | | |
| | |
| | | }, |
| | | watch: { |
| | | logo: function (val) { |
| | | let sessionLogoUrl = sessionStorage.getItem('logoUrl') |
| | | let sessionLogoUrl = localStorage.getItem('logoUrl') |
| | | if (this.productType === 'API_Fan') { |
| | | this.logoUrl = require('@/assets/logo-apifan.png') |
| | | } else if (val === 'none') { |
| | |
| | | this.logoUrl = require('@/assets/logo-t.png') |
| | | } else if (val !== null) { |
| | | this.logoUrl = val |
| | | this.backgroundColor = '#fff' |
| | | } else if (sessionLogoUrl !== null) { |
| | | this.logoUrl = sessionLogoUrl |
| | | } |
| | | sessionStorage.setItem('logoUrl', this.logoUrl) |
| | | sessionStorage.setItem('backgroundColor', this.backgroundColor) |
| | | localStorage.setItem('logoUrl', this.logoUrl) |
| | | localStorage.setItem('backgroundColor', this.backgroundColor) |
| | | } |
| | | }, |
| | | mounted () { |
| | | let sessionLogoUrl = sessionStorage.getItem('logoUrl') |
| | | let sessionBackgroundColor = sessionStorage.getItem('backgroundColor') |
| | | let sessionLogoUrl = localStorage.getItem('logoUrl') |
| | | let sessionBackgroundColor = localStorage.getItem('backgroundColor') |
| | | if (sessionLogoUrl !== null) { |
| | | this.logoUrl = sessionLogoUrl |
| | | this.backgroundColor = sessionBackgroundColor |
| | | } |
| | | sessionStorage.setItem('backgroundColor', this.backgroundColor) |
| | | localStorage.setItem('backgroundColor', this.backgroundColor) |
| | | window.addEventListener('beforeunload', this.handleBeforeUnload) |
| | | }, |
| | | beforeDestroy () { |
| | |
| | | }, |
| | | methods: { |
| | | handleBeforeUnload: function () { |
| | | sessionStorage.setItem('logoUrl', this.logoUrl) |
| | | localStorage.setItem('logoUrl', this.logoUrl) |
| | | }, |
| | | logout: function () { |
| | | window.opener = null |
| | |
| | | // logoUrl: function () { |
| | | // console.log('this.logo') |
| | | // console.log(this.logo) |
| | | // let sessionLogoUrl = this.setLogo(sessionStorage.getItem('logoUrl')) |
| | | // let sessionLogoUrl = this.setLogo(localStorage.getItem('logoUrl')) |
| | | // if (this.productType === 'API_Fan') { |
| | | // return require('@/assets/logo-apifan.png') |
| | | // } else if (this.logo === 'none') { |
| | |
| | | // } else if (this.logo === null && sessionLogoUrl !== null) { |
| | | // return sessionLogoUrl |
| | | // } else { |
| | | // sessionStorage.setItem('logoUrl', this.logo) |
| | | // localStorage.setItem('logoUrl', this.logo) |
| | | // return this.logo |
| | | // } |
| | | // }, |