| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <div style="min-width:1200px;height: 100vh;background: #000000;" :style="{'--color': `${basicSet.set ? basicSet.set.theme_color: '#44be95'}` }">
- <v-header :showTab="showTab" :showPublish="showPublish" v-if="!isCourse && !isMicro"></v-header>
- <m-header :showPublish="showPublish" v-if="!isCourse && isMicro"></m-header>
- <!--l-header为了改变主题色-->
- <l-header v-show="false"></l-header>
- <main class="content-container" ref="container">
- <nuxt/>
- </main>
- </div>
- </template>
- <script>
- import {mapState} from 'vuex';
- import LHeader from "~/components/default/header";
- import VHeader from "~/components/default/video-header";
- import MHeader from "~/components/default/micro-header";
- export default {
- components: {
- LHeader,
- VHeader,
- MHeader
- },
- data (){
- return {
- isCourse: true,
- showTab: false,
- showPublish: false,
- isMicro: false,
- showRoute: ['videoDetail'],
- microRoute: ['microhomepage','microRelease','member-sign'],
- }
- },
- computed: {
- ...mapState(['basicSet'])
- },
- watch: {
- '$route'(res) {
- console.log(this.$route.name)
- this.url = this.fun.redirectH5(this.$route.path, this.$route.fullPath);
- this.microRoute.indexOf(this.$route.name)> -1 ? this.isMicro = true : this.isMicro = false;
- this.showRoute.indexOf(this.$route.name)> -1 ? this.showTab = true : this.showTab = false;
- (location.href.indexOf('releaseVideo')>-1 || this.$route.name.indexOf('microRelease')>-1) ? this.showPublish = false : this.showPublish = true;
- location.href.indexOf('coursedetail')>-1 ? this.isCourse = true : this.isCourse = false;
- }
- },
- mounted () {
- // console.log(this.$route.name)
- this.fun.redirectH5(this.$route.path, this.$route.fullPath);
- //判断是否微社区
- this.microRoute.indexOf(this.$route.name)> -1 ? this.isMicro = true : this.isMicro = false;
- // 判断是否发现视频详情
- this.showRoute.indexOf(this.$route.name)> -1 ? this.showTab = true : this.showTab = false;
- // 判断是否发布页面
- (location.href.indexOf('releaseVideo')>-1 || this.$route.name.indexOf('microRelease')>-1) ? this.showPublish = false : this.showPublish = true;
- // 判断课程详情
- location.href.indexOf('coursedetail')>-1 ? this.isCourse = true : this.isCourse = false;
- },
- methods: {
- },
- }
- </script>
|