junyuanz лет назад: 5
Родитель
Сommit
9870ed8aee
2 измененных файлов с 20 добавлено и 3 удалено
  1. 2 2
      packageUser/pages/user/order/order.wxml
  2. 18 1
      pages/pay/pay.js

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

@@ -79,11 +79,11 @@
       <view wx:if="{{order.status !== 'unpay'}}">
 	      <view style="overflow: hidden;width: 100%;">
 	      	<view class="orderDetail-payPrice__title">代金券抵扣</view>
-	      	<text class="orderDetail-payPrice__count">{{pay_way == 'balance' ? (order.coupon_price+order.freight) / 100 : order.coupon_price / 100}}代金券</text>
+	      	<text class="orderDetail-payPrice__count">{{order.coupon_price / 100}}代金券</text>
 	      </view>
 	      <view style="overflow: hidden;width: 100%;">
 	      	<view class="orderDetail-payPrice__title">微信支付</view>
-	      	<currency style="float: right;height: 44px;color: #eab86a;" symbol="¥" value="{{pay_way != 'balance' ? (order.paied_price+order.freight)  / 100 : order.paied_price  / 100}}"></currency>
+	      	<currency style="float: right;height: 44px;color: #eab86a;" symbol="¥" value="{{order.paied_price / 100}}"></currency>
 	      </view>
       </view>
       <view class="clean"></view>

+ 18 - 1
pages/pay/pay.js

@@ -210,7 +210,24 @@ Page({
           that.pay()
         }
       } else if (that.data.curPayway === 'weixinpay') {
-        that.pay()
+      	if(that.data.useBalance && that.data.afterdec > 0){
+      		wx.showModal({
+		      title: '提示',
+		      content: '当前使用代金券抵扣 '+ (that.data.balanceInfo.total / 100)+' 后,还需支付 '+(that.data.afterdec / 100)+' 使用微信支付?' ,
+		      success: function (sm) {
+		        if (sm.confirm) {
+		            that.pay()
+		          } else if (sm.cancel) {
+		            console.log('用户点击取消')
+		            that.setData({
+			            payFlag: false
+			          })
+		          }
+		        }
+		      })
+      	}else{
+      		that.pay()
+      	}
       }
       // if (!that.data.userInfo.user.has_trade_pwd) {
       //   that.setPwdDialog()