Bladeren bron

fix: polish payment cancel and voucher display

root 21 uur geleden
bovenliggende
commit
cbeb6edb18

+ 8 - 2
packageUser/pages/user/buy/buy.js

@@ -73,7 +73,13 @@ Page({
           })
         },
         'fail':function(res){
-
+          if (res && res.errMsg && (res.errMsg.indexOf('cancel') > -1 || res.errMsg.indexOf('取消') > -1)) {
+            wx.showToast({
+              title: '用户取消支付',
+              icon: 'none',
+              duration: 2000
+            })
+          }
         }
       })
     }
@@ -124,4 +130,4 @@ Page({
     }
     _request.$get(url, params, success)
   },
-})
+})

+ 1 - 1
packageUser/pages/user/radish/radish.wxml

@@ -17,7 +17,7 @@
         <view class="radish-main__time"><format-time type="formatTime" value="{{item.ctime}}" ></format-time></view>
         <view class="clean"></view>
       </view>
-      <view class="radish-main__count">{{item.count / 100}}提货券</view>
+      <view class="radish-main__count">{{item.count / 100}}</view>
     </view>
   </view>
 </view>

+ 1 - 1
packageUser/pages/user/radishDetail/radishDetail.wxml

@@ -2,7 +2,7 @@
   <view class="radishDetail">
     <view class="radishDetail-count">
       <view class="radishDetail-count__title">数量</view>
-      <view class="radishDetail-count__value">{{detail.count / 100}}提货券</view>
+      <view class="radishDetail-count__value">{{detail.count / 100}}</view>
       <view class="clean"></view>
     </view>
     <view class="radishDetail-line">

+ 5 - 0
packageUser/pages/user/recharge/recharge.js

@@ -132,6 +132,11 @@ Page({
           that.setData({
             lock: false
           })
+          wx.showToast({
+            title: '用户取消支付',
+            icon: 'none',
+            duration: 2000
+          })
           return
         }
         wx.showToast({

+ 2 - 2
packageUser/pages/user/recharge/recharge.wxml

@@ -9,9 +9,9 @@
       <view class="title">余额充值</view>
       <view class="recharge__price">
         <text>¥</text>
-        <input type="text" placeholder="请输入充值金额" bindinput="rechargePrice" />
+        <input type="number" placeholder="请输入充值金额" bindinput="rechargePrice" />
       </view>
       <view class="recharge__btn" bindtap="createRecharge">立即充值</view>
     </view>
   </view>
-</view>
+</view>

+ 8 - 1
pages/helpfarm/helpfarm-detail/helpfarm-detail.js

@@ -561,6 +561,13 @@ Page({
           })
         },
         'fail':function(res){
+          if (res && res.errMsg && (res.errMsg.indexOf('cancel') > -1 || res.errMsg.indexOf('取消') > -1)) {
+            wx.showToast({
+              title: '用户取消支付',
+              icon: 'none',
+              duration: 2000
+            })
+          }
         },
         'complete': function () {
           buttonClicked = true
@@ -931,4 +938,4 @@ Page({
   stopPageScroll () {
     return
   }
-})
+})

+ 7 - 0
pages/pay/pay.js

@@ -698,6 +698,13 @@ Page({
 	              })
 	              return
 	            }
+	            if (res && res.errMsg && (res.errMsg.indexOf('cancel') > -1 || res.errMsg.indexOf('取消') > -1)) {
+	              wx.showToast({
+	                title: '用户取消支付',
+	                icon: 'none',
+	                duration: 2000
+	              })
+	            }
 							that.setData({
 					      payFlag: false
 					    })