Authored by 郭成尧

dialog-change

... ... @@ -61,33 +61,3 @@
</div>
</div>
</div>
{{!-- 申请退款确认框 --}}
<div class="ymodal ymodal-alert" id="refundModal">
<div class="ymodal-dialog">
<div class="ymodal-content">
<div class="ymodal-body">
申请退款后,本单享有的优惠可能会一并取消,确定申请吗?
</div>
<div class="modal-btn">
<button class="dis-miss-btn" data-dismiss="ymodal">返回</button>
<button id="sureRefund">确定</button>
</div>
</div>
</div>
</div>
{{!-- 取消订单确认框 --}}
<div class="ymodal ymodal-alert" id="closeModal">
<div class="ymodal-dialog">
<div class="ymodal-content">
<div class="ymodal-body">
取消订单后,本单享有的优惠可能会一并取消,确定申请吗?
</div>
<div class="modal-btn">
<button class="dis-miss-btn" data-dismiss="ymodal">返回</button>
<button id="sureClose">确定</button>
</div>
</div>
</div>
</div>
... ...
... ... @@ -143,7 +143,7 @@
{{/unless}}
{{#if unpaid}}
<span class="btn btn-cancel" data-toggle="ymodal" data-target="#closeModal">取消订单</span>
<span class="btn btn-cancel">取消订单</span>
{{#if payUrl}}
<a class="btn btn-pay" href="{{payUrl}}">立即付款</a>
{{/if}}
... ... @@ -163,7 +163,7 @@
{{!-- 申请退款 --}}
{{#if refundApply}}
<span class="btn btn-refund" data-toggle="ymodal" data-target="#refundModal">申请退款</span>
<span class="btn btn-refund">申请退款</span>
{{/if}}
{{/if}}
</div>
... ... @@ -201,37 +201,6 @@
</div>
</div>
{{!-- 申请退款确认框 --}}
<div class="ymodal ymodal-alert" id="refundModal">
<div class="ymodal-dialog">
<div class="ymodal-content">
<div class="ymodal-body">
申请退款后,本单享有的优惠可能会一并取消,确定申请吗?
</div>
<div class="modal-btn">
<button class="dis-miss-btn" data-dismiss="ymodal">返回</button>
<button id="sureRefund">确定</button>
</div>
</div>
</div>
</div>
{{!-- 取消订单确认框 --}}
<div class="ymodal ymodal-alert" id="closeModal">
<div class="ymodal-dialog">
<div class="ymodal-content">
<div class="ymodal-body">
取消订单后,本单享有的优惠可能会一并取消,确定申请吗?
</div>
<div class="modal-btn">
<button class="dis-miss-btn" data-dismiss="ymodal">返回</button>
<button id="sureClose">确定</button>
</div>
</div>
</div>
</div>
<script>_ozprm = "orderid={{orderCode}}&ordertotal={{orderTotal}}";</script>
<script type="text/javascript" src="//static.yohobuy.com/m/v1/js/AG_Tracking.js"></script>
<script type="text/javascript">
... ...
... ... @@ -40,7 +40,7 @@
{{!-- 申请退款 --}}
{{#if refundApply}}
<span class="btn refund" data-toggle="ymodal" data-target="#refundModal">申请退款</span>
<span class="btn refund">申请退款</span>
{{/if}}
{{!-- 修改地址 --}}
... ... @@ -64,7 +64,7 @@
<span class="hours">{{leftTime}}</span>
</li>
</ul>
<span class="btn cancel" data-toggle="ymodal" data-target="#closeModal">取消订单</span>
<span class="btn cancel">取消订单</span>
{{#if payUrl}}
<a class="locHref" href="{{payUrl}}">
<span class="btn pay">立即付款</span>
... ...
... ... @@ -13,9 +13,8 @@ var $ = require('yoho-jquery'),
var $navLi = $('#order-nav > li'),
$orderContainer = $('#order-container');
var $sureClose = $('#sureClose'); // 确定删除订单
var $sureRefund = $('#sureRefund'); // 确定申请退款
var $disMissBtn = $('.dis-miss-btn'); // 返回
var $sureClose = $('.cancel'); // 删除订单按钮
var $sureRefund = $('.refund'); // 申请退款按钮
var $curContainer = $orderContainer.children('.orders:not(.hide)');// 保存当前显示的order-container
... ... @@ -468,14 +467,30 @@ $reaMask.on('touchend', function(event) {
// 弹出取消订单提示框
$sureClose.on('click', function() {
$disMissBtn.trigger('click');
$reaMask.css('visibility', 'visible');
dialog.showDialog({
dialogText: '取消订单后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$reaMask.css('visibility', 'visible');
});
});
// 弹出申请退款提示框
$sureRefund.on('click', function() {
$disMissBtn.trigger('click');
$refundReaMask.css('visibility', 'visible');
dialog.showDialog({
dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$refundReaMask.css('visibility', 'visible');
});
});
// 申请退款
... ...
... ... @@ -22,9 +22,8 @@ var orderId = $('#order-detail').data('id'),
optHammer,
$createTime = new Date($('.createTime').text() * 1000);
var $sureClose = $('#sureClose'); // 确定删除订单
var $sureRefund = $('#sureRefund'); // 确定申请退款
var $disMissBtn = $('.dis-miss-btn'); // 返回
var $sureClose = $('.btn-cancel'); // 取消订单按钮
var $sureRefund = $('.btn-refund'); // 申请退款按钮
require('home/order-detail-index.page.css');
... ... @@ -351,14 +350,31 @@ $refundReaMask.on('touchend', function(event) {
// 弹出取消订单提示框
$sureClose.on('click', function() {
$disMissBtn.trigger('click');
$reaMask.css('visibility', 'visible');
dialog.showDialog({
dialogText: '取消订单后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$reaMask.css('visibility', 'visible');
});
});
// 弹出申请退款提示框
$sureRefund.on('click', function() {
$disMissBtn.trigger('click');
$refundReaMask.css('visibility', 'visible');
dialog.showDialog({
dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$refundReaMask.css('visibility', 'visible');
});
});
function formatDate(objD) {
... ...