11<template >
2- <v-app id =" app" :class =" bgcClass" :style = " curBgcStyle " >
2+ <v-app id =" app" :class =" bgcClass" >
33 <jse-header v-show =" !hideHAF" />
4- <section class =" app-content" :class =" hideHAF? 'app-full-screen':'' " >
4+ <section class =" app-content" :class =" { 'app-full-screen':hideHAF} " >
55 <router-view :key =" routerKey" />
66 <jse-snackbar />
77 </section >
1010</template >
1111
1212<script >
13- import { mapState , mapMutations } from ' vuex'
14-
13+ import { mapMutations } from ' vuex'
1514import Header from ' @components/header.vue'
1615import Footer from ' @components/footer.vue'
1716import Snackbar from ' @components/snackbar.vue'
@@ -20,7 +19,6 @@ export default {
2019 data () {
2120 return {
2221 bgcClass: ' ' ,
23- curBgcStyle: {},
2422 routerKey: 0 ,
2523 }
2624 },
@@ -35,16 +33,9 @@ export default {
3533 this .setBgc ()
3634 },
3735 computed: {
38- ... mapState ([' curUserDetail' ]),
39- routeName () {
40- return this .$route .name
41- },
4236 path () {
4337 return this .$route .path .replace (' /' , ' ' ) || ' home'
4438 },
45- userBgc () {
46- return this .curUserDetail .bgc
47- },
4839 hideHAF () {
4940 return this .$route .meta .hideHAF
5041 },
@@ -53,17 +44,13 @@ export default {
5344 path () {
5445 this .setBgc ()
5546 },
56- userBgc () {
57- this .setBgc ()
58- },
5947 },
6048 methods: {
6149 ... mapMutations ([' setLoginInfo' , ' setLoginState' ]),
6250 setBgc () {
6351 // 根据路由更换不同的背景
6452 this .bgcClass = ' '
65- this .curBgcStyle = {}
66- let path = this .path
53+ const path = this .path
6754 const list = [' home' , ' features' , ' feedback' ]
6855 if (list .includes (path)) {
6956 this .bgcClass = ` bgc-animation bgc-before ${ path} -bgc`
@@ -141,12 +128,6 @@ export default {
141128 background-color : rgba (194 , 24 , 91 , 0.1 );
142129 }
143130}
144- .user-bgc {
145- background-image : linear-gradient (
146- rgba (25 , 128 , 255 , 0.3 ) -50px ,
147- $deep-5 300px
148- );
149- }
150131@include screenLG {
151132 .app-content {
152133 min-height : calc (100vh - 70px );
0 commit comments