diff --git a/pages/order/refund_order/refund_order.js b/pages/order/refund_order/refund_order.js index 7adf67e..d35f385 100644 --- a/pages/order/refund_order/refund_order.js +++ b/pages/order/refund_order/refund_order.js @@ -12,28 +12,32 @@ Page({ order_sn:"", back_money: 0, reasonSelect: 0, - reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ] + reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ], + return_type:0, }, onLoad: function(t) { - var th = this; - e.getUserInfo(function(e) { - console.log('onload'); - console.log(e); - th.setData({ - orderId: t.order_id, - user: e - }), - rq.get("/api/weshop/order/get/" + os.stoid + "/" + t.order_id,{ - success:function(ed){ - var bm = ed.data.data.order_amount + ed.data.data.user_money - + ed.data.data.pt_tail_money - th.setData({ - order_sn: ed.data.data.order_sn, - back_money: bm - }) - } - }) - }); + var th=this; + getApp().getConfig2(function (em) { + th.data.return_type = em.return_type; + e.getUserInfo(function(e) { + console.log('onload'); + console.log(e); + th.setData({ + orderId: t.order_id, + user: e, + }), + rq.get("/api/weshop/order/get/" + os.stoid + "/" + t.order_id,{ + success:function(ed){ + var bm = ed.data.data.order_amount + ed.data.data.user_money + + ed.data.data.pt_tail_money + th.setData({ + order_sn: ed.data.data.order_sn, + back_money: bm + }) + } + }) + }); + }) }, //------提交退款申请------- @@ -63,6 +67,7 @@ Page({ goods_id_list: glist, addtime: ut.gettimestamp(), type:2, + return_type: th.data.return_type, }, success: function (e) { wx.showToast({ diff --git a/pages/user/return_goods/return_goods.js b/pages/user/return_goods/return_goods.js index dd02ad0..f9d4ed1 100644 --- a/pages/user/return_goods/return_goods.js +++ b/pages/user/return_goods/return_goods.js @@ -21,18 +21,25 @@ Page({ causeList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了" ], checkCauseIndex: -1, popState: !0, - description: "" + description: "", + return_type:0, }, onLoad: function(e) { var a = this; + + getApp().getConfig2(function (em) { + a.data.return_type = em.return_type; + }); + this.setData({ recId: e.rec_id }), this.requestReturnGoods(e), t.getConfig(function(t) { a.setData({ - "config.address": t.store_address, - "config.phone": t.store_tel, + "config.address": t.store_address, + "config.phone": t.store_tel, }); }); + }, requestReturnGoods: function(t) { var e = this; @@ -147,6 +154,7 @@ Page({ goods_id: th.data.order.goods_id, addtime: ut.gettimestamp(), type:2, + return_type: th.data.return_type, }, success: function(t) { wx.showToast({