Authored by 郭成尧

tich-tip-callback-support

... ... @@ -247,7 +247,11 @@ function orderCompute() {
});
}
function submitOrder() {
/**
* submit order
* @param times
*/
function submitOrder(times) {
var invoiceText = $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
msg = $('#msg').find('input').val() || orderInfo('msg');
... ... @@ -290,8 +294,8 @@ function submitOrder() {
paymentType: orderInfo('paymentType'), //支付方式
couponCode: orderInfo('couponCode'),
yohoCoin: orderInfo('yohoCoin'),
skuList: isLimitGood() ? orderInfo('skuList') : undefined
skuList: isLimitGood() ? orderInfo('skuList') : undefined,
times: times || 1
}
}).then(function(res) {
var url;
... ... @@ -468,7 +472,9 @@ $subBlock.on('touchstart', 'li', function() {
}
});
/**
* submit order first
*/
$('.bill a').on('touchstart', function() {
if (isTickets) {
ticketsConfirm();
... ... @@ -479,7 +485,8 @@ $('.bill a').on('touchstart', function() {
orderInfo('paymentType', $('.payment-type .icon-cb-radio').data('id'));
payType = $('.payment-type .icon-cb-radio').data('id');
submitOrder();
submitOrder(1);
richTip.setCallback(submitOrder, 2);
});
function phoneHidden(phone) {
... ...
... ... @@ -7,6 +7,14 @@ var $tip = $('#yoho-order-bg'),
$tipMsg = $tip.find('.order-tip-msg'),
$tipBtns = $tip.find('.order-tip-btn-group');
var touchCallback,
params;
function setCallback(t, p) {
touchCallback = t;
params = p;
}
/**
* 跳转还是消失控制
*/
... ... @@ -15,6 +23,10 @@ var $tip = $('#yoho-order-bg'),
if ('SPAN' !== event.target.tagName) {
$tip.hide();
} else {
if (touchCallback) {
touchCallback(params);
}
setTimeout(function() {
$tip.hide();
}, 5);
... ... @@ -68,4 +80,5 @@ function show(con, btn) {
$tip.show();
}
exports.setCallback = setCallback;
exports.show = show;
\ No newline at end of file
... ...
... ... @@ -219,6 +219,12 @@ iframe[height="0"] {
float: left;
display: inline-block;
padding-top: 24px;
span {
display: block;
width: 100%;
height: 100%;
}
}
a:first-child {
... ...