Authored by hongyong.zhao

结果页增加推荐

@@ -14,6 +14,7 @@ Page(Object.assign({ @@ -14,6 +14,7 @@ Page(Object.assign({
14 */ 14 */
15 data: { 15 data: {
16 shareProduct: {}, 16 shareProduct: {},
  17 + recommends: [],
17 list: [{ 18 list: [{
18 page: 1, 19 page: 1,
19 data: [] 20 data: []
@@ -52,7 +53,6 @@ Page(Object.assign({ @@ -52,7 +53,6 @@ Page(Object.assign({
52 */ 53 */
53 onLoad: function (options) { 54 onLoad: function (options) {
54 this.service = new ZeroSellService() 55 this.service = new ZeroSellService()
55 -  
56 app = getApp(); 56 app = getApp();
57 }, 57 },
58 58
@@ -72,6 +72,7 @@ Page(Object.assign({ @@ -72,6 +72,7 @@ Page(Object.assign({
72 }); 72 });
73 73
74 this._init(); 74 this._init();
  75 + this._getRecommend();
75 }, 76 },
76 77
77 /** 78 /**
@@ -154,7 +155,7 @@ Page(Object.assign({ @@ -154,7 +155,7 @@ Page(Object.assign({
154 return this.service.getMyList({type, page}).then(result => { 155 return this.service.getMyList({type, page}).then(result => {
155 156
156 this.setData({ 157 this.setData({
157 - footText: '暂无更多内容' 158 + footText: ''
158 }); 159 });
159 160
160 if (result.code !== 200) { 161 if (result.code !== 200) {
@@ -165,6 +166,22 @@ Page(Object.assign({ @@ -165,6 +166,22 @@ Page(Object.assign({
165 }); 166 });
166 }, 167 },
167 168
  169 + _getRecommend() {
  170 + this.service.getRecommend({
  171 + actPrizeId: 0
  172 + })
  173 + .then(response => {
  174 + if (response && response.code === 200 && response.data){
  175 + this.setData({
  176 + recommends: response.data,
  177 + })
  178 + }
  179 + })
  180 + .catch(error => {
  181 + console.log(error)
  182 + })
  183 + },
  184 +
168 share({detail}){ 185 share({detail}){
169 this.setData({ 186 this.setData({
170 'actionsheet.show': true, 187 'actionsheet.show': true,
@@ -8,6 +8,9 @@ @@ -8,6 +8,9 @@
8 "tabs-pane": "./components/tabs-pane", 8 "tabs-pane": "./components/tabs-pane",
9 "prize-item": "./components/prize-item", 9 "prize-item": "./components/prize-item",
10 "fellow-bar": "./components/fellow-bar", 10 "fellow-bar": "./components/fellow-bar",
11 - "quickNavigation": "/pages/quickNavigation/quickNavigation" 11 + "quickNavigation": "/pages/quickNavigation/quickNavigation",
  12 + "more": "./components/more",
  13 + "product-item": "./components/product-item",
  14 + "product-header": "./components/product-detail-header"
12 } 15 }
13 } 16 }
@@ -22,7 +22,14 @@ @@ -22,7 +22,14 @@
22 22
23 <view class="list-foot-blank">{{footText}}</view> 23 <view class="list-foot-blank">{{footText}}</view>
24 </tabs> 24 </tabs>
25 - 25 +<view style="height: 20rpx;background-color:#F0F0F0"></view>
  26 +<more wx:if="{{recommends.length > 0}}">
  27 + <block wx:for="{{recommends}}">
  28 + <view class="product-item" >
  29 + <product-item product="{{item}}"></product-item>
  30 + </view>
  31 + </block>
  32 +</more>
26 33
27 <template is="zan-actionsheet" data="{{...actionsheet}}" /> 34 <template is="zan-actionsheet" data="{{...actionsheet}}" />
28 35