Commit 4da76168324f5d04a48374177c6c8128f7736b85

Authored by yvan.ni
1 parent 0e0c2148

要退款中提示优化

pages/user/return_goods_info/return_goods_info.js
... ... @@ -11,6 +11,7 @@ Page({
11 11 resourceUrl: r.imghost,
12 12 return_goods: null,
13 13 goods: null,
  14 + loading:0, //是不是在处理中,避免重复点击
14 15 },
15 16 onLoad: function(e) {
16 17 if (e.order_id!=undefined){
... ... @@ -130,8 +131,14 @@ Page({
130 131 });
131 132 },
132 133 cancelReturn: function() {
  134 +
  135 +
133 136 var e = this,
134   - id = this.data.return_goods.id;
  137 + id = this.data.return_goods.id;
  138 +
  139 + if(this.data.loading) return false;
  140 + this.data.loading=1;
  141 +
135 142 wx.showModal({
136 143 title: "确定取消售后服务?",
137 144 success: function(r) {
... ... @@ -143,14 +150,18 @@ Page({
143 150 remark:'客户取消'
144 151 },
145 152 success: function(r) {
  153 +
146 154 if(r.data.code==0){
147 155 getApp().showWarning('取消成功');
148 156 setTimeout(function(){
149 157 wx.setStorageSync("user:return_goods_list:update", !0), e.requestReturnGoods(id);
150 158 },1000)
151   - }
152   -
153   -
  159 + }else{
  160 +
  161 + e.data.loading=0;
  162 + s.m_toast(r.data.msg);
  163 + }
  164 +
154 165 }
155 166 });
156 167 }
... ...