index.vue 966 Bytes
<template>
    <tab v-bind:page="page"></tab>
    <resources v-bind:content-code="contentCode"></resources>
</template>

<script>
    const qs = require('yoho-qs');
    const cookie = require('yoho-cookie');
    const contentCode = require('content-code');
    const bus = require('common/vue-bus');

    const tab = require('channel/tab.vue');
    const resources = require('component/resources/index.vue');

    const detaultChannel = qs.channel || cookie.get('_Channel') || 'men';

    module.exports = {
        data() {
            return {
                page: 'channel',
                contentCode: contentCode.channel[detaultChannel]
            };
        },
        components: {
            tab,
            resources
        },
        created() {
            bus.$on('contentCode.change', (code) => {
                this.contentCode = code;
            });
        }
    };
</script>

<style>
    #channel {
        padding-top: 90px;
    }
</style>