brand-box.vue
1.27 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
<template>
<brand-top-cmpnt v-bind:share-Link="shareLink"></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');
// TODO 确定分享页面后需要添加拼接分享链接的公共方法
let shareLink = 'http://www.yohobuy.com';
module.exports = {
data() {
return {
shareLink: shareLink,
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>