Merge branch 'feature/refundApply' into 'release/5.5'
模态框添加 See merge request !364
Showing
4 changed files
with
64 additions
and
18 deletions
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | 申请退款后,本单享有的优惠可能会一并取消,确定申请吗? | 70 | 申请退款后,本单享有的优惠可能会一并取消,确定申请吗? |
71 | </div> | 71 | </div> |
72 | <div class="modal-btn"> | 72 | <div class="modal-btn"> |
73 | - <button id="disMissBtn" data-dismiss="ymodal">返回</button> | 73 | + <button class="dis-miss-btn" data-dismiss="ymodal">返回</button> |
74 | <button id="sureRefund">确定</button> | 74 | <button id="sureRefund">确定</button> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
@@ -209,7 +209,7 @@ | @@ -209,7 +209,7 @@ | ||
209 | 申请退款后,本单享有的优惠可能会一并取消,确定申请吗? | 209 | 申请退款后,本单享有的优惠可能会一并取消,确定申请吗? |
210 | </div> | 210 | </div> |
211 | <div class="modal-btn"> | 211 | <div class="modal-btn"> |
212 | - <button id="disMissBtn" data-dismiss="ymodal">返回</button> | 212 | + <button class="dis-miss-btn" data-dismiss="ymodal">返回</button> |
213 | <button id="sureRefund">确定</button> | 213 | <button id="sureRefund">确定</button> |
214 | </div> | 214 | </div> |
215 | </div> | 215 | </div> |
@@ -388,16 +388,28 @@ $reaMask.find('.box-cmp').on('touchend', function() { | @@ -388,16 +388,28 @@ $reaMask.find('.box-cmp').on('touchend', function() { | ||
388 | reasonId: reasonId | 388 | reasonId: reasonId |
389 | } | 389 | } |
390 | }).then(function(res) { | 390 | }).then(function(res) { |
391 | - $reaMask.fadeOut(); | 391 | + $reaMask.css('visibility', 'visible'); |
392 | if ($.type(res) !== 'object') { | 392 | if ($.type(res) !== 'object') { |
393 | return; | 393 | return; |
394 | } | 394 | } |
395 | + | ||
396 | + if (res.code === 200) { | ||
397 | + dialog.showDialog({ | ||
398 | + dialogText: '您的取消订单申请已提交,请耐心等待', | ||
399 | + hasFooter: { | ||
400 | + leftBtnText: '返回', | ||
401 | + rightBtnText: '确定' | ||
402 | + } | ||
403 | + }, function() { | ||
404 | + window.location.href = '/home/orders'; | ||
405 | + }); | ||
406 | + | ||
407 | + return false; | ||
408 | + } | ||
409 | + | ||
395 | if (res.message) { | 410 | if (res.message) { |
396 | tip.show(res.message); | 411 | tip.show(res.message); |
397 | } | 412 | } |
398 | - setTimeout(function() { | ||
399 | - window.location.href = '/home/orders'; | ||
400 | - }, 2000); | ||
401 | }).fail(function() { | 413 | }).fail(function() { |
402 | tip.show('网络错误'); | 414 | tip.show('网络错误'); |
403 | }); | 415 | }); |
@@ -418,16 +430,28 @@ $refundReaMask.find('.box-cmp').on('touchend', function() { | @@ -418,16 +430,28 @@ $refundReaMask.find('.box-cmp').on('touchend', function() { | ||
418 | reasonId: reasonId | 430 | reasonId: reasonId |
419 | } | 431 | } |
420 | }).then(function(res) { | 432 | }).then(function(res) { |
421 | - $refundReaMask.fadeOut(); | 433 | + $refundReaMask.css('visibility', 'hidden'); |
422 | if ($.type(res) !== 'object') { | 434 | if ($.type(res) !== 'object') { |
423 | return; | 435 | return; |
424 | } | 436 | } |
437 | + | ||
438 | + if (res.code === 200) { | ||
439 | + dialog.showDialog({ | ||
440 | + dialogText: '您的退款申请已提交,请耐心等待退款', | ||
441 | + hasFooter: { | ||
442 | + leftBtnText: '返回', | ||
443 | + rightBtnText: '确定' | ||
444 | + } | ||
445 | + }, function() { | ||
446 | + window.location.href = '/home/orders'; | ||
447 | + }); | ||
448 | + | ||
449 | + return false; | ||
450 | + } | ||
451 | + | ||
425 | if (res.message) { | 452 | if (res.message) { |
426 | tip.show(res.message); | 453 | tip.show(res.message); |
427 | } | 454 | } |
428 | - setTimeout(function() { | ||
429 | - window.location.href = '/home/orders'; | ||
430 | - }, 2000); | ||
431 | }).fail(function() { | 455 | }).fail(function() { |
432 | tip.show('网络错误'); | 456 | tip.show('网络错误'); |
433 | }); | 457 | }); |
@@ -262,16 +262,27 @@ $reaMask.find('.box-cmp').on('touchend', function() { | @@ -262,16 +262,27 @@ $reaMask.find('.box-cmp').on('touchend', function() { | ||
262 | reasonId: reasonId | 262 | reasonId: reasonId |
263 | } | 263 | } |
264 | }).then(function(res) { | 264 | }).then(function(res) { |
265 | - $reaMask.fadeOut(); | 265 | + $reaMask.css('visibility', 'visible'); |
266 | if ($.type(res) !== 'object') { | 266 | if ($.type(res) !== 'object') { |
267 | return; | 267 | return; |
268 | } | 268 | } |
269 | + | ||
270 | + if (res.code === 200) { | ||
271 | + dialog.showDialog({ | ||
272 | + dialogText: '您的取消订单申请已提交,请耐心等待', | ||
273 | + hasFooter: { | ||
274 | + leftBtnText: '返回', | ||
275 | + rightBtnText: '确定' | ||
276 | + } | ||
277 | + }, function() { | ||
278 | + window.location.href = '/home/orders'; | ||
279 | + }); | ||
280 | + | ||
281 | + return false; | ||
282 | + } | ||
269 | if (res.message) { | 283 | if (res.message) { |
270 | tip.show(res.message); | 284 | tip.show(res.message); |
271 | } | 285 | } |
272 | - setTimeout(function() { | ||
273 | - window.location.href = '/home/orders'; | ||
274 | - }, 2000); | ||
275 | }).fail(function() { | 286 | }).fail(function() { |
276 | tip.show('网络错误'); | 287 | tip.show('网络错误'); |
277 | }); | 288 | }); |
@@ -292,16 +303,27 @@ $refundReaMask.find('.box-cmp').on('touchend', function() { | @@ -292,16 +303,27 @@ $refundReaMask.find('.box-cmp').on('touchend', function() { | ||
292 | reasonId: reasonId | 303 | reasonId: reasonId |
293 | } | 304 | } |
294 | }).then(function(res) { | 305 | }).then(function(res) { |
295 | - $refundReaMask.fadeOut(); | 306 | + $refundReaMask.css('visibility', 'visible'); |
296 | if ($.type(res) !== 'object') { | 307 | if ($.type(res) !== 'object') { |
297 | return; | 308 | return; |
298 | } | 309 | } |
310 | + | ||
311 | + if (res.code === 200) { | ||
312 | + dialog.showDialog({ | ||
313 | + dialogText: '您的退款申请已提交,请耐心等待退款', | ||
314 | + hasFooter: { | ||
315 | + leftBtnText: '返回', | ||
316 | + rightBtnText: '确定' | ||
317 | + } | ||
318 | + }, function() { | ||
319 | + window.location.href = '/home/orders'; | ||
320 | + }); | ||
321 | + | ||
322 | + return false; | ||
323 | + } | ||
299 | if (res.message) { | 324 | if (res.message) { |
300 | tip.show(res.message); | 325 | tip.show(res.message); |
301 | } | 326 | } |
302 | - setTimeout(function() { | ||
303 | - window.location.href = '/home/orders'; | ||
304 | - }, 2000); | ||
305 | }).fail(function() { | 327 | }).fail(function() { |
306 | tip.show('网络错误'); | 328 | tip.show('网络错误'); |
307 | }); | 329 | }); |
-
Please register or login to post a comment