Commit 6592089b19aeb5345d9fe63bb43d77a9bde91cf7
1 parent
091eefef
专享礼包退款的优化
Showing
2 changed files
with
13 additions
and
3 deletions
pages/giftpack/mygiftpack/mygiftpack.js
| ... | ... | @@ -144,7 +144,16 @@ Page({ |
| 144 | 144 | navigateTo: function (e) { |
| 145 | 145 | var th = this; |
| 146 | 146 | var url = e.currentTarget.dataset.url; |
| 147 | - getApp().goto(url); | |
| 147 | + let is_back = e.currentTarget.dataset.is_back | |
| 148 | + if (is_back==1) { | |
| 149 | + wx.showToast({ | |
| 150 | + title: '该礼包已退款', | |
| 151 | + icon: 'none', | |
| 152 | + duration: 2000 | |
| 153 | + }) | |
| 154 | + }else { | |
| 155 | + getApp().goto(url); | |
| 156 | + } | |
| 148 | 157 | }, |
| 149 | 158 | //下拉事件 |
| 150 | 159 | onReachBottom: function () { | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </view> |
| 24 | 24 | <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| 25 | 25 | <view class="content_box"> |
| 26 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
| 26 | + <view class="content_box_ware" bindtap="navigateTo" data-is_back="{{item.is_back}}" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
| 27 | 27 | <view class="content_box_img"> |
| 28 | 28 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> |
| 29 | 29 | <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image> |
| ... | ... | @@ -93,9 +93,10 @@ |
| 93 | 93 | |
| 94 | 94 | </view> |
| 95 | 95 | </view> |
| 96 | - <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
| 96 | + <view wx:if="{{item.is_back !=1}}" class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
| 97 | 97 | <button>立即使用</button> |
| 98 | 98 | </view> |
| 99 | + <view class="content_box_button" style="color:#b9b5b5;" wx:else>已退款</view> | |
| 99 | 100 | </view> |
| 100 | 101 | </block> |
| 101 | 102 | <block wx:if="{{is_read && wareCard.length<1 && is_get}}"> | ... | ... |