brand-box.vue
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<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>