Authored by 郭成尧

bug-fixed

... ... @@ -9,7 +9,7 @@
</div>
</section>
{{else}}
<section class="owner-info block" data-changeable="{{changeable}}" data-url="{{url}}">
<section class="owner-info block" data-changeable="{{false}}" data-url="{{url}}">
<span class="iconfont">&#xe637;</span>
<div class="beside-icon">
... ... @@ -122,6 +122,10 @@
{{/if}}
<div class="opt block">
{{!-- 申请退款 --}}
{{#if refundApply}}
<span class="btn btn-refund">申请退款</span>
{{/if}}
{{!-- 修改地址 --}}
{{#if addressModify}}
<a href="{{newUrl}}" class="btn">修改地址</a>
... ... @@ -160,11 +164,6 @@
<span class="btn btn-check-logistics">查看二维码</span>
</a>
{{/if}}
{{!-- 申请退款 --}}
{{#if refundApply}}
<span class="btn btn-refund">申请退款</span>
{{/if}}
{{/if}}
</div>
</div>
... ...
... ... @@ -13,9 +13,6 @@ var $ = require('yoho-jquery'),
var $navLi = $('#order-nav > li'),
$orderContainer = $('#order-container');
var $sureClose = $('.cancel'); // 删除订单按钮
var $sureRefund = $('.refund'); // 申请退款按钮
var $curContainer = $orderContainer.children('.orders:not(.hide)');// 保存当前显示的order-container
var winH = $(window).height();
... ... @@ -246,11 +243,28 @@ orderHammer.on('tap', function(e) {
});
} else if ($cur.closest('.cancel').length > 0) {
// 取消订单
// $reaMask.css('visibility', 'visible');
dialog.showDialog({
dialogText: '取消订单后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$reaMask.css('visibility', 'visible');
});
} else if ($cur.closest('.refund').length > 0) {
// 申请退款
// $refundReaMask.css('visibility', 'visible');
dialog.showDialog({
dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$refundReaMask.css('visibility', 'visible');
});
/**
* 埋点
... ... @@ -465,34 +479,6 @@ $reaMask.on('touchend', function(event) {
event.stopPropagation();
});
// 弹出取消订单提示框
$sureClose.on('click', function() {
dialog.showDialog({
dialogText: '取消订单后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$reaMask.css('visibility', 'visible');
});
});
// 弹出申请退款提示框
$sureRefund.on('click', function() {
dialog.showDialog({
dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
dialog.hideDialog();
$refundReaMask.css('visibility', 'visible');
});
});
// 申请退款
$refundReaMask.on('touchend', function(event) {
if (event.target.className !== 'refund-reason-mask') {
... ...