Authored by hongyong.zhao

结果页增加推荐

... ... @@ -14,6 +14,7 @@ Page(Object.assign({
*/
data: {
shareProduct: {},
recommends: [],
list: [{
page: 1,
data: []
... ... @@ -52,7 +53,6 @@ Page(Object.assign({
*/
onLoad: function (options) {
this.service = new ZeroSellService()
app = getApp();
},
... ... @@ -72,6 +72,7 @@ Page(Object.assign({
});
this._init();
this._getRecommend();
},
/**
... ... @@ -154,7 +155,7 @@ Page(Object.assign({
return this.service.getMyList({type, page}).then(result => {
this.setData({
footText: '暂无更多内容'
footText: ''
});
if (result.code !== 200) {
... ... @@ -165,6 +166,22 @@ Page(Object.assign({
});
},
_getRecommend() {
this.service.getRecommend({
actPrizeId: 0
})
.then(response => {
if (response && response.code === 200 && response.data){
this.setData({
recommends: response.data,
})
}
})
.catch(error => {
console.log(error)
})
},
share({detail}){
this.setData({
'actionsheet.show': true,
... ...
... ... @@ -8,6 +8,9 @@
"tabs-pane": "./components/tabs-pane",
"prize-item": "./components/prize-item",
"fellow-bar": "./components/fellow-bar",
"quickNavigation": "/pages/quickNavigation/quickNavigation"
"quickNavigation": "/pages/quickNavigation/quickNavigation",
"more": "./components/more",
"product-item": "./components/product-item",
"product-header": "./components/product-detail-header"
}
}
\ No newline at end of file
... ...
... ... @@ -22,7 +22,14 @@
<view class="list-foot-blank">{{footText}}</view>
</tabs>
<view style="height: 20rpx;background-color:#F0F0F0"></view>
<more wx:if="{{recommends.length > 0}}">
<block wx:for="{{recommends}}">
<view class="product-item" >
<product-item product="{{item}}"></product-item>
</view>
</block>
</more>
<template is="zan-actionsheet" data="{{...actionsheet}}" />
... ...