Authored by 郭成尧

Merge branch 'feature/refundApply' into 'release/5.5'

模态框添加



See merge request !364
... ... @@ -70,7 +70,7 @@
申请退款后,本单享有的优惠可能会一并取消,确定申请吗?
</div>
<div class="modal-btn">
<button id="disMissBtn" data-dismiss="ymodal">返回</button>
<button class="dis-miss-btn" data-dismiss="ymodal">返回</button>
<button id="sureRefund">确定</button>
</div>
</div>
... ...
... ... @@ -209,7 +209,7 @@
申请退款后,本单享有的优惠可能会一并取消,确定申请吗?
</div>
<div class="modal-btn">
<button id="disMissBtn" data-dismiss="ymodal">返回</button>
<button class="dis-miss-btn" data-dismiss="ymodal">返回</button>
<button id="sureRefund">确定</button>
</div>
</div>
... ...
... ... @@ -388,16 +388,28 @@ $reaMask.find('.box-cmp').on('touchend', function() {
reasonId: reasonId
}
}).then(function(res) {
$reaMask.fadeOut();
$reaMask.css('visibility', 'visible');
if ($.type(res) !== 'object') {
return;
}
if (res.code === 200) {
dialog.showDialog({
dialogText: '您的取消订单申请已提交,请耐心等待',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
window.location.href = '/home/orders';
});
return false;
}
if (res.message) {
tip.show(res.message);
}
setTimeout(function() {
window.location.href = '/home/orders';
}, 2000);
}).fail(function() {
tip.show('网络错误');
});
... ... @@ -418,16 +430,28 @@ $refundReaMask.find('.box-cmp').on('touchend', function() {
reasonId: reasonId
}
}).then(function(res) {
$refundReaMask.fadeOut();
$refundReaMask.css('visibility', 'hidden');
if ($.type(res) !== 'object') {
return;
}
if (res.code === 200) {
dialog.showDialog({
dialogText: '您的退款申请已提交,请耐心等待退款',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
window.location.href = '/home/orders';
});
return false;
}
if (res.message) {
tip.show(res.message);
}
setTimeout(function() {
window.location.href = '/home/orders';
}, 2000);
}).fail(function() {
tip.show('网络错误');
});
... ...
... ... @@ -262,16 +262,27 @@ $reaMask.find('.box-cmp').on('touchend', function() {
reasonId: reasonId
}
}).then(function(res) {
$reaMask.fadeOut();
$reaMask.css('visibility', 'visible');
if ($.type(res) !== 'object') {
return;
}
if (res.code === 200) {
dialog.showDialog({
dialogText: '您的取消订单申请已提交,请耐心等待',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
window.location.href = '/home/orders';
});
return false;
}
if (res.message) {
tip.show(res.message);
}
setTimeout(function() {
window.location.href = '/home/orders';
}, 2000);
}).fail(function() {
tip.show('网络错误');
});
... ... @@ -292,16 +303,27 @@ $refundReaMask.find('.box-cmp').on('touchend', function() {
reasonId: reasonId
}
}).then(function(res) {
$refundReaMask.fadeOut();
$refundReaMask.css('visibility', 'visible');
if ($.type(res) !== 'object') {
return;
}
if (res.code === 200) {
dialog.showDialog({
dialogText: '您的退款申请已提交,请耐心等待退款',
hasFooter: {
leftBtnText: '返回',
rightBtnText: '确定'
}
}, function() {
window.location.href = '/home/orders';
});
return false;
}
if (res.message) {
tip.show(res.message);
}
setTimeout(function() {
window.location.href = '/home/orders';
}, 2000);
}).fail(function() {
tip.show('网络错误');
});
... ...