...
|
...
|
@@ -15,6 +15,7 @@ var dispatchModeHammer, |
|
|
dispatchTimeHammer,
|
|
|
$invoice = $('.invoice'),
|
|
|
$price = $('.price-cal'),
|
|
|
payType,
|
|
|
priceTmpl = Handlebars.compile($('#tmpl-price').html());
|
|
|
|
|
|
lazyLoad();
|
...
|
...
|
@@ -109,7 +110,24 @@ function submitOrder() { |
|
|
yohoCoin: orderInfo('yohoCoin')
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
console.log(res);
|
|
|
var url;
|
|
|
|
|
|
if (!res) {
|
|
|
tip.show('网络出错');
|
|
|
return;
|
|
|
}
|
|
|
if (res.code === 200) {
|
|
|
if (payType === 2) {
|
|
|
|
|
|
// 货到付款的进入订单页面
|
|
|
url = '/home/orderDetail?order_code=' + res.data.order_code;
|
|
|
} else {
|
|
|
url = '/home/pay?order_code=' + res.data.order_code;
|
|
|
}
|
|
|
window.location.href = url;
|
|
|
} else {
|
|
|
tip.show(res.messege || '网络出错');
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
tip.show('网络出错');
|
|
|
});
|
...
|
...
|
@@ -155,7 +173,10 @@ $('#msg').find('input').on('blur', function() { |
|
|
});
|
|
|
|
|
|
$('.pay-mode').on('click', 'li', function() {
|
|
|
orderInfo('paymentTypeId', $(this).data('pay-id'));
|
|
|
orderInfo('paymentType', $(this).data('pay-type'));
|
|
|
var $this = $(this);
|
|
|
|
|
|
orderInfo('paymentTypeId', $this.data('pay-id'));
|
|
|
orderInfo('paymentType', $this.data('pay-type'));
|
|
|
payType = $this.data('pay-type');
|
|
|
submitOrder();
|
|
|
}); |
...
|
...
|
|