Showing
3 changed files
with
12 additions
and
7 deletions
| @@ -76,13 +76,16 @@ Component({ | @@ -76,13 +76,16 @@ Component({ | ||
| 76 | tplid:accept.toString() | 76 | tplid:accept.toString() |
| 77 | }) | 77 | }) |
| 78 | },800) | 78 | },800) |
| 79 | + this.triggerEvent('event',{type:'success'}) | ||
| 79 | }else{ | 80 | }else{ |
| 80 | util.toast('订阅失败,请在设置中打开','none') | 81 | util.toast('订阅失败,请在设置中打开','none') |
| 82 | + this.triggerEvent('event',{type:'fail'}) | ||
| 81 | } | 83 | } |
| 82 | }, | 84 | }, |
| 83 | fail:(efail)=>{ | 85 | fail:(efail)=>{ |
| 84 | console.log('wx.requestSubscribeMessage.fail',efail) | 86 | console.log('wx.requestSubscribeMessage.fail',efail) |
| 85 | if(efail.errMsg.indexOf('not ended')) return; | 87 | if(efail.errMsg.indexOf('not ended')) return; |
| 88 | + this.triggerEvent('event',{type:'fail'}) | ||
| 86 | wx.showModal({ | 89 | wx.showModal({ |
| 87 | title: '授权提示', | 90 | title: '授权提示', |
| 88 | content: '您拒绝了订阅消息,请点击确定打开授权', | 91 | content: '您拒绝了订阅消息,请点击确定打开授权', |
| @@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
| 43 | </view> | 43 | </view> |
| 44 | <view class="list flex-lr"> | 44 | <view class="list flex-lr"> |
| 45 | <view class="list-name">红 包</view> | 45 | <view class="list-name">红 包</view> |
| 46 | - <view class="list-val">-¥ {{user.price}}</view> | 46 | + <view class="list-val">-¥ {{checkout.subsidy_price}}</view> |
| 47 | </view> | 47 | </view> |
| 48 | <view class="list flex-lr"> | 48 | <view class="list flex-lr"> |
| 49 | <view class="list-name">应付金额</view> | 49 | <view class="list-name">应付金额</view> |
| @@ -126,11 +126,13 @@ | @@ -126,11 +126,13 @@ | ||
| 126 | </view> | 126 | </view> |
| 127 | </view> | 127 | </view> |
| 128 | </checkbox-group> | 128 | </checkbox-group> |
| 129 | - <view class="checkout-get" bindtap="checkoutInit"> | ||
| 130 | - <view class="checkout-button"> | ||
| 131 | - 获取消费金额 | ||
| 132 | - <view class="checkout-button-money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> | ||
| 133 | - </view> | 129 | + <view class="checkout-get"> |
| 130 | + <subscribe ids="{{[0]}}" bindevent="checkoutInit"> | ||
| 131 | + <view class="checkout-button"> | ||
| 132 | + 获取消费金额 | ||
| 133 | + <view class="checkout-button-money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view> | ||
| 134 | + </view> | ||
| 135 | + </subscribe> | ||
| 134 | </view> | 136 | </view> |
| 135 | </block> | 137 | </block> |
| 136 | </view> | 138 | </view> |
| @@ -178,7 +178,7 @@ | @@ -178,7 +178,7 @@ | ||
| 178 | <view class="detail-info Medium" style="margin-top: 56rpx;"> | 178 | <view class="detail-info Medium" style="margin-top: 56rpx;"> |
| 179 | <view class="flex-lr"> | 179 | <view class="flex-lr"> |
| 180 | <view>实付金额</view> | 180 | <view>实付金额</view> |
| 181 | - <view class="detail-info-right" style="color:rgba(224,32,32,1);">¥{{checkout.price}}</view> | 181 | + <view class="detail-info-right" style="color:rgba(224,32,32,1);">¥{{checkout.should_price}}</view> |
| 182 | </view> | 182 | </view> |
| 183 | <view class="flex-lr" style="margin-top: 26rpx;"> | 183 | <view class="flex-lr" style="margin-top: 26rpx;"> |
| 184 | <view></view> | 184 | <view></view> |
-
Please register or login to post a comment