Commit 7b9eae3d162324fb0d1adffc4c72ed7036f64390

Authored by yvan.ni
1 parent 901f5b7f

退款是,要控制按钮不能连续点击

pages/order/refund_order/refund_order.js
... ... @@ -14,6 +14,7 @@ Page({
14 14 reasonSelect: 0,
15 15 reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ],
16 16 refund_type:0,
  17 + isloading:0,
17 18 },
18 19 onLoad: function(t) {
19 20 var th=this;
... ... @@ -48,6 +49,8 @@ Page({
48 49  
49 50 //------提交退款申请-------
50 51 refundOrder: function(e) {
  52 + if(this.data.isloading) return false;
  53 + this.data.isloading=1;
51 54 var th = this;
52 55 //----获取订单的所有商品-----
53 56 rq.get('/api/weshop/ordergoods/list',{
... ...
pages/user/return_goods/return_goods.js
... ... @@ -23,6 +23,7 @@ Page({
23 23 popState: !0,
24 24 description: "",
25 25 refund_type:0,
  26 + isloading:0,
26 27 },
27 28 onLoad: function(e) {
28 29 var a = this;
... ... @@ -124,8 +125,11 @@ Page({
124 125 });
125 126 },
126 127  
  128 +
127 129 /*-------------提交退款申请--------------*/
128 130 submiApply: function() {
  131 + if(this.data.isloading) return false;
  132 + this.data.isloading=1;
129 133 var t = this,th=t;
130 134 this.checkSubmit(function() {
131 135 t.uploadPhotos(function() {
... ...