Commit 8676ca210757b128c0c4154a6ea2237a3debbc72
1 parent
08006c50
1. 订单列表显示积分值
2. 再退款的时候,要把积分值带入
Showing
2 changed files
with
24 additions
and
12 deletions
pages/order/refund_order/refund_order.js
| ... | ... | @@ -11,6 +11,7 @@ Page({ |
| 11 | 11 | orderId: 0, |
| 12 | 12 | order_sn:"", |
| 13 | 13 | back_money: 0, |
| 14 | + back_integral: 0, | |
| 14 | 15 | reasonSelect: 0, |
| 15 | 16 | reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ], |
| 16 | 17 | refund_type:0, |
| ... | ... | @@ -42,6 +43,11 @@ Page({ |
| 42 | 43 | order_sn: ed.data.data.order_sn, |
| 43 | 44 | back_money: bm |
| 44 | 45 | }) |
| 46 | + //如果有积分的话 | |
| 47 | + if( ed.data.data.integral>0){ | |
| 48 | + th.setData({back_integral:ed.data.data.integral}); | |
| 49 | + } | |
| 50 | + | |
| 45 | 51 | wx.hideLoading(); |
| 46 | 52 | } |
| 47 | 53 | }) |
| ... | ... | @@ -77,19 +83,24 @@ Page({ |
| 77 | 83 | |
| 78 | 84 | glist = glist.substring(0, glist.length-1); |
| 79 | 85 | console.log(glist); |
| 86 | + var r_data={ | |
| 87 | + order_id: th.data.orderId, | |
| 88 | + order_sn: th.data.order_sn, | |
| 89 | + store_id:os.stoid, | |
| 90 | + user_id: th.data.user.user_id, | |
| 91 | + back_money: th.data.back_money, | |
| 92 | + reason: th.data.reasonList[th.data.reasonSelect], | |
| 93 | + goods_id_list: glist, | |
| 94 | + addtime: ut.gettimestamp(), | |
| 95 | + type:2, | |
| 96 | + refund_type: th.data.refund_type, | |
| 97 | + }; | |
| 98 | + | |
| 99 | + if(th.data.back_integral){ | |
| 100 | + r_data.back_integral=th.data.back_integral; | |
| 101 | + } | |
| 80 | 102 | rq.post("/api/weshop/order/returngoods/saveReturnGoods", { |
| 81 | - data: { | |
| 82 | - order_id: th.data.orderId, | |
| 83 | - order_sn: th.data.order_sn, | |
| 84 | - store_id:os.stoid, | |
| 85 | - user_id: th.data.user.user_id, | |
| 86 | - back_money: th.data.back_money, | |
| 87 | - reason: th.data.reasonList[th.data.reasonSelect], | |
| 88 | - goods_id_list: glist, | |
| 89 | - addtime: ut.gettimestamp(), | |
| 90 | - type:2, | |
| 91 | - refund_type: th.data.refund_type, | |
| 92 | - }, | |
| 103 | + data: r_data, | |
| 93 | 104 | success: function (e) { |
| 94 | 105 | wx.showToast({ |
| 95 | 106 | title: "已提交申请", | ... | ... |
pages/user/order_list/order_list.wxml
| ... | ... | @@ -117,6 +117,7 @@ |
| 117 | 117 | <view class="fs24 xc-wc">¥</view> |
| 118 | 118 | <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} |
| 119 | 119 | <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> |
| 120 | + <text wx:if="{{item.integral}}">+{{item.integral}}积分</text> | |
| 120 | 121 | </view> |
| 121 | 122 | </view> |
| 122 | 123 | <view wx:if="{{item.pt_tail_money>0}}" class="commodity_money flex baseline"> | ... | ... |