brand-box.vue 1.38 KB
<template>
    <brand-top-cmpnt v-bind:share-data="shareData"></brand-top-cmpnt>
    <brand-shop-top-cmpnt v-bind:domain="'nike'"></brand-shop-top-cmpnt>
    <!--<goods-list v-bind:data="productList"></goods-list>-->
</template>

<script>
    const $ = require('yoho-jquery');
    const tip = require('common/tip');
    const brandTopCmpnt = require('channel/brand-top.vue');
    const brandShopTopCmpnt = require('channel/brand-shop-top.vue');
    const goodsList = require('product/list.vue');

    module.exports = {
        data() {
            return {
                shareData: {
                    title: 'BLK',
                    link: 'm.blk.com',
                    img: 'https://img11.static.yhbimg.com/brandLogo/2016/04/13/15/010eb8606c1072fd2e769c62567d3bbe93.png?imageView2/2/w/140/h/140'
                },
                productList: []
            };
        },
        methods: {
            getProductList() {
                let data = {};

                $.ajax({
                    url: '/get-brand-shop-goods',
                    data: data
                }).done(result => {
                    this.productList = result.productList;
                }).fail(() => {
                    tip('网络错误');
                });
            }
        },
        components: {
            brandTopCmpnt,
            brandShopTopCmpnt,
            goodsList
        }
    };
</script>