Showing
5 changed files
with
49 additions
and
79 deletions
@@ -61,33 +61,3 @@ | @@ -61,33 +61,3 @@ | ||
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | - | ||
65 | -{{!-- 申请退款确认框 --}} | ||
66 | -<div class="ymodal ymodal-alert" id="refundModal"> | ||
67 | - <div class="ymodal-dialog"> | ||
68 | - <div class="ymodal-content"> | ||
69 | - <div class="ymodal-body"> | ||
70 | - 申请退款后,本单享有的优惠可能会一并取消,确定申请吗? | ||
71 | - </div> | ||
72 | - <div class="modal-btn"> | ||
73 | - <button class="dis-miss-btn" data-dismiss="ymodal">返回</button> | ||
74 | - <button id="sureRefund">确定</button> | ||
75 | - </div> | ||
76 | - </div> | ||
77 | - </div> | ||
78 | -</div> | ||
79 | - | ||
80 | -{{!-- 取消订单确认框 --}} | ||
81 | -<div class="ymodal ymodal-alert" id="closeModal"> | ||
82 | - <div class="ymodal-dialog"> | ||
83 | - <div class="ymodal-content"> | ||
84 | - <div class="ymodal-body"> | ||
85 | - 取消订单后,本单享有的优惠可能会一并取消,确定申请吗? | ||
86 | - </div> | ||
87 | - <div class="modal-btn"> | ||
88 | - <button class="dis-miss-btn" data-dismiss="ymodal">返回</button> | ||
89 | - <button id="sureClose">确定</button> | ||
90 | - </div> | ||
91 | - </div> | ||
92 | - </div> | ||
93 | -</div> |
@@ -143,7 +143,7 @@ | @@ -143,7 +143,7 @@ | ||
143 | {{/unless}} | 143 | {{/unless}} |
144 | 144 | ||
145 | {{#if unpaid}} | 145 | {{#if unpaid}} |
146 | - <span class="btn btn-cancel" data-toggle="ymodal" data-target="#closeModal">取消订单</span> | 146 | + <span class="btn btn-cancel">取消订单</span> |
147 | {{#if payUrl}} | 147 | {{#if payUrl}} |
148 | <a class="btn btn-pay" href="{{payUrl}}">立即付款</a> | 148 | <a class="btn btn-pay" href="{{payUrl}}">立即付款</a> |
149 | {{/if}} | 149 | {{/if}} |
@@ -163,7 +163,7 @@ | @@ -163,7 +163,7 @@ | ||
163 | 163 | ||
164 | {{!-- 申请退款 --}} | 164 | {{!-- 申请退款 --}} |
165 | {{#if refundApply}} | 165 | {{#if refundApply}} |
166 | - <span class="btn btn-refund" data-toggle="ymodal" data-target="#refundModal">申请退款</span> | 166 | + <span class="btn btn-refund">申请退款</span> |
167 | {{/if}} | 167 | {{/if}} |
168 | {{/if}} | 168 | {{/if}} |
169 | </div> | 169 | </div> |
@@ -201,37 +201,6 @@ | @@ -201,37 +201,6 @@ | ||
201 | </div> | 201 | </div> |
202 | </div> | 202 | </div> |
203 | 203 | ||
204 | -{{!-- 申请退款确认框 --}} | ||
205 | -<div class="ymodal ymodal-alert" id="refundModal"> | ||
206 | - <div class="ymodal-dialog"> | ||
207 | - <div class="ymodal-content"> | ||
208 | - <div class="ymodal-body"> | ||
209 | - 申请退款后,本单享有的优惠可能会一并取消,确定申请吗? | ||
210 | - </div> | ||
211 | - <div class="modal-btn"> | ||
212 | - <button class="dis-miss-btn" data-dismiss="ymodal">返回</button> | ||
213 | - <button id="sureRefund">确定</button> | ||
214 | - </div> | ||
215 | - </div> | ||
216 | - </div> | ||
217 | -</div> | ||
218 | - | ||
219 | -{{!-- 取消订单确认框 --}} | ||
220 | -<div class="ymodal ymodal-alert" id="closeModal"> | ||
221 | - <div class="ymodal-dialog"> | ||
222 | - <div class="ymodal-content"> | ||
223 | - <div class="ymodal-body"> | ||
224 | - 取消订单后,本单享有的优惠可能会一并取消,确定申请吗? | ||
225 | - </div> | ||
226 | - <div class="modal-btn"> | ||
227 | - <button class="dis-miss-btn" data-dismiss="ymodal">返回</button> | ||
228 | - <button id="sureClose">确定</button> | ||
229 | - </div> | ||
230 | - </div> | ||
231 | - </div> | ||
232 | -</div> | ||
233 | - | ||
234 | - | ||
235 | <script>_ozprm = "orderid={{orderCode}}&ordertotal={{orderTotal}}";</script> | 204 | <script>_ozprm = "orderid={{orderCode}}&ordertotal={{orderTotal}}";</script> |
236 | <script type="text/javascript" src="//static.yohobuy.com/m/v1/js/AG_Tracking.js"></script> | 205 | <script type="text/javascript" src="//static.yohobuy.com/m/v1/js/AG_Tracking.js"></script> |
237 | <script type="text/javascript"> | 206 | <script type="text/javascript"> |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | 40 | ||
41 | {{!-- 申请退款 --}} | 41 | {{!-- 申请退款 --}} |
42 | {{#if refundApply}} | 42 | {{#if refundApply}} |
43 | - <span class="btn refund" data-toggle="ymodal" data-target="#refundModal">申请退款</span> | 43 | + <span class="btn refund">申请退款</span> |
44 | {{/if}} | 44 | {{/if}} |
45 | 45 | ||
46 | {{!-- 修改地址 --}} | 46 | {{!-- 修改地址 --}} |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | <span class="hours">{{leftTime}}</span> | 64 | <span class="hours">{{leftTime}}</span> |
65 | </li> | 65 | </li> |
66 | </ul> | 66 | </ul> |
67 | - <span class="btn cancel" data-toggle="ymodal" data-target="#closeModal">取消订单</span> | 67 | + <span class="btn cancel">取消订单</span> |
68 | {{#if payUrl}} | 68 | {{#if payUrl}} |
69 | <a class="locHref" href="{{payUrl}}"> | 69 | <a class="locHref" href="{{payUrl}}"> |
70 | <span class="btn pay">立即付款</span> | 70 | <span class="btn pay">立即付款</span> |
@@ -13,9 +13,8 @@ var $ = require('yoho-jquery'), | @@ -13,9 +13,8 @@ var $ = require('yoho-jquery'), | ||
13 | var $navLi = $('#order-nav > li'), | 13 | var $navLi = $('#order-nav > li'), |
14 | $orderContainer = $('#order-container'); | 14 | $orderContainer = $('#order-container'); |
15 | 15 | ||
16 | -var $sureClose = $('#sureClose'); // 确定删除订单 | ||
17 | -var $sureRefund = $('#sureRefund'); // 确定申请退款 | ||
18 | -var $disMissBtn = $('.dis-miss-btn'); // 返回 | 16 | +var $sureClose = $('.cancel'); // 删除订单按钮 |
17 | +var $sureRefund = $('.refund'); // 申请退款按钮 | ||
19 | 18 | ||
20 | var $curContainer = $orderContainer.children('.orders:not(.hide)');// 保存当前显示的order-container | 19 | var $curContainer = $orderContainer.children('.orders:not(.hide)');// 保存当前显示的order-container |
21 | 20 | ||
@@ -468,14 +467,30 @@ $reaMask.on('touchend', function(event) { | @@ -468,14 +467,30 @@ $reaMask.on('touchend', function(event) { | ||
468 | 467 | ||
469 | // 弹出取消订单提示框 | 468 | // 弹出取消订单提示框 |
470 | $sureClose.on('click', function() { | 469 | $sureClose.on('click', function() { |
471 | - $disMissBtn.trigger('click'); | ||
472 | - $reaMask.css('visibility', 'visible'); | 470 | + dialog.showDialog({ |
471 | + dialogText: '取消订单后,本单享有的优惠可能会一并取消,确定申请吗?', | ||
472 | + hasFooter: { | ||
473 | + leftBtnText: '返回', | ||
474 | + rightBtnText: '确定' | ||
475 | + } | ||
476 | + }, function() { | ||
477 | + dialog.hideDialog(); | ||
478 | + $reaMask.css('visibility', 'visible'); | ||
479 | + }); | ||
473 | }); | 480 | }); |
474 | 481 | ||
475 | // 弹出申请退款提示框 | 482 | // 弹出申请退款提示框 |
476 | $sureRefund.on('click', function() { | 483 | $sureRefund.on('click', function() { |
477 | - $disMissBtn.trigger('click'); | ||
478 | - $refundReaMask.css('visibility', 'visible'); | 484 | + dialog.showDialog({ |
485 | + dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', | ||
486 | + hasFooter: { | ||
487 | + leftBtnText: '返回', | ||
488 | + rightBtnText: '确定' | ||
489 | + } | ||
490 | + }, function() { | ||
491 | + dialog.hideDialog(); | ||
492 | + $refundReaMask.css('visibility', 'visible'); | ||
493 | + }); | ||
479 | }); | 494 | }); |
480 | 495 | ||
481 | // 申请退款 | 496 | // 申请退款 |
@@ -22,9 +22,8 @@ var orderId = $('#order-detail').data('id'), | @@ -22,9 +22,8 @@ var orderId = $('#order-detail').data('id'), | ||
22 | optHammer, | 22 | optHammer, |
23 | $createTime = new Date($('.createTime').text() * 1000); | 23 | $createTime = new Date($('.createTime').text() * 1000); |
24 | 24 | ||
25 | -var $sureClose = $('#sureClose'); // 确定删除订单 | ||
26 | -var $sureRefund = $('#sureRefund'); // 确定申请退款 | ||
27 | -var $disMissBtn = $('.dis-miss-btn'); // 返回 | 25 | +var $sureClose = $('.btn-cancel'); // 取消订单按钮 |
26 | +var $sureRefund = $('.btn-refund'); // 申请退款按钮 | ||
28 | 27 | ||
29 | 28 | ||
30 | require('home/order-detail-index.page.css'); | 29 | require('home/order-detail-index.page.css'); |
@@ -351,14 +350,31 @@ $refundReaMask.on('touchend', function(event) { | @@ -351,14 +350,31 @@ $refundReaMask.on('touchend', function(event) { | ||
351 | 350 | ||
352 | // 弹出取消订单提示框 | 351 | // 弹出取消订单提示框 |
353 | $sureClose.on('click', function() { | 352 | $sureClose.on('click', function() { |
354 | - $disMissBtn.trigger('click'); | ||
355 | - $reaMask.css('visibility', 'visible'); | 353 | + dialog.showDialog({ |
354 | + dialogText: '取消订单后,本单享有的优惠可能会一并取消,确定申请吗?', | ||
355 | + hasFooter: { | ||
356 | + leftBtnText: '返回', | ||
357 | + rightBtnText: '确定' | ||
358 | + } | ||
359 | + }, function() { | ||
360 | + dialog.hideDialog(); | ||
361 | + $reaMask.css('visibility', 'visible'); | ||
362 | + }); | ||
363 | + | ||
356 | }); | 364 | }); |
357 | 365 | ||
358 | // 弹出申请退款提示框 | 366 | // 弹出申请退款提示框 |
359 | $sureRefund.on('click', function() { | 367 | $sureRefund.on('click', function() { |
360 | - $disMissBtn.trigger('click'); | ||
361 | - $refundReaMask.css('visibility', 'visible'); | 368 | + dialog.showDialog({ |
369 | + dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', | ||
370 | + hasFooter: { | ||
371 | + leftBtnText: '返回', | ||
372 | + rightBtnText: '确定' | ||
373 | + } | ||
374 | + }, function() { | ||
375 | + dialog.hideDialog(); | ||
376 | + $refundReaMask.css('visibility', 'visible'); | ||
377 | + }); | ||
362 | }); | 378 | }); |
363 | 379 | ||
364 | function formatDate(objD) { | 380 | function formatDate(objD) { |
-
Please register or login to post a comment