Commit 14741ff5313cbbaed3465ef472ec1660dc7f964e
1 parent
8b6d72ec
支付成功页面修改,提交订单确认页面
Showing
3 changed files
with
11 additions
and
5 deletions
pages/cart/cart2/cart2.js
... | ... | @@ -789,6 +789,7 @@ Page({ |
789 | 789 | //--------------如果使用余额--------------------- |
790 | 790 | if (th.data.bn_use_money == 1) { |
791 | 791 | if (amoney> order_m) { |
792 | + order_m = order_m.toFixed(2); | |
792 | 793 | th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price }) |
793 | 794 | }else{ |
794 | 795 | order_m =parseFloat(order_m - amoney); | ... | ... |
pages/payment/pay_success/pay_success.js
... | ... | @@ -11,6 +11,7 @@ Page({ |
11 | 11 | order:null, |
12 | 12 | type:1, |
13 | 13 | allmoney:0, |
14 | + user_money:0, | |
14 | 15 | order_sn:"", |
15 | 16 | pick:null, |
16 | 17 | }, |
... | ... | @@ -40,9 +41,10 @@ Page({ |
40 | 41 | for(var i in res.data.data.pageData){ |
41 | 42 | var item=res.data.data.pageData[i]; |
42 | 43 | allmoney+=item.order_amount; |
44 | + user_money += item.user_money; | |
43 | 45 | } |
44 | 46 | order=res.data.data.pageData[0]; |
45 | - th.setData({order:order,type:2,allmoney:allmoney,order_sn:order_sn}) | |
47 | + th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money}) | |
46 | 48 | }) |
47 | 49 | } |
48 | 50 | //--获取门店-- | ... | ... |
pages/payment/pay_success/pay_success.wxml
... | ... | @@ -2,7 +2,6 @@ |
2 | 2 | <view> |
3 | 3 | <!-- 支付成功提示 --> |
4 | 4 | <view class="payradio"> |
5 | - | |
6 | 5 | <!-- 提示框 --> |
7 | 6 | <view class="Success_box flex-center"> |
8 | 7 | <view> |
... | ... | @@ -22,17 +21,21 @@ |
22 | 21 | </view> |
23 | 22 | |
24 | 23 | <!-- 实付金额 --> |
24 | + | |
25 | 25 | <view class="payitem flex"> |
26 | 26 | <view>实付金额 :</view> |
27 | 27 | <!-- {{filters.toFix()}} --> |
28 | 28 | <view class="pay_money" wx:if="{{type==1}}">{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money)}}元</view> |
29 | - <view class="pay_money" wx:else>{{allmoney}}元</view> | |
29 | + <view class="pay_money" wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view> | |
30 | 30 | </view> |
31 | 31 | |
32 | 32 | <!-- 支付方式 --> |
33 | 33 | <view class="payitem flex"> |
34 | - <view>支付方式 :</view> | |
35 | - <view>微信支付</view> | |
34 | + <view>支付方式 :</view> | |
35 | + <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view> | |
36 | + <view wx:elif="{{allmoney>0}}">微信支付,余额支付</view> | |
37 | + <view wx:elif="{{user_money>0}}">微信支付,余额支付</view> | |
38 | + <view wx:else>免单</view> | |
36 | 39 | </view> |
37 | 40 | |
38 | 41 | </view> | ... | ... |