Commit 3d37eaf3cb7561cc112b1d97dc6a5b79f826944f

Authored by 后端研发-倪永富
1 parent 1c040e5d

推荐商品的显示问题修复

pages/goods/goodsInfo/goodsInfo.js
@@ -305,7 +305,6 @@ Page({ @@ -305,7 +305,6 @@ Page({
305 if (!user) return false; 305 if (!user) return false;
306 clearInterval(ti); 306 clearInterval(ti);
307 307
308 -  
309 if(user.card_field ){ 308 if(user.card_field ){
310 var str = user['card_expiredate'].replace(/-/g, '/'); 309 var str = user['card_expiredate'].replace(/-/g, '/');
311 var end = new Date(str); 310 var end = new Date(str);
@@ -1573,7 +1572,7 @@ Page({ @@ -1573,7 +1572,7 @@ Page({
1573 } 1572 }
1574 1573
1575 var goods_list = this.selectComponent("#goods_list"); //组件的id 1574 var goods_list = this.selectComponent("#goods_list"); //组件的id
1576 - goods_list.get_list(); 1575 + if (goods_list) goods_list.get_list();
1577 }, 1576 },
1578 1577
1579 //--------检查是否活动,活动是否开始,或者是否结束------- 1578 //--------检查是否活动,活动是否开始,或者是否结束-------
pages/goods/goodsInfo/goodsInfo.wxml
@@ -566,25 +566,8 @@ @@ -566,25 +566,8 @@
566 <view class="xc-recommend-word">推荐</view> 566 <view class="xc-recommend-word">推荐</view>
567 </view> 567 </view>
568 </view> 568 </view>
569 -  
570 - <!-- 显示商品 -->  
571 - <view class="xc-goods ">  
572 - <view>  
573 - <view bindtap="go_goods" data-gid="{{item.goods_id}}" class="rel xc-goods-recommend {{index%2==0?'':'ml'}}" wx:for="{{recommend_list}}">  
574 - <image class="xc-goods-imgs" src="{{iurl+item.original_img}}"></image>  
575 - <view class='xc-goods-bottom abs'>  
576 - <view class="flex monry-frame">  
577 - <view class="flex">  
578 - <view class="three-level-word money-color-val rmb-symbol">¥</view>  
579 - <view class="two-level-word money-color-val" style='margin-top:8rpx;'>{{item.shop_price}}</view>  
580 - </view>  
581 - <view class="word-lines xc-original-price"> 原价¥{{item.market_price}}</view>  
582 - </view>  
583 - <view class="xc-good-explain ellipsis-2">{{item.goods_name}}</view>  
584 - </view>  
585 - </view>  
586 - </view>  
587 - </view> 569 +
  570 + <goods_recommend id="goods_list"></goods_recommend>
588 571
589 </view> 572 </view>
590 573