...
|
...
|
@@ -8944,6 +8944,10 @@ function showChooseGifDialog() { |
|
|
}, function() {
|
|
|
window.location.href = cartContentShow().find('.freebie > a').attr('href');
|
|
|
}, function() {
|
|
|
var info = window.cookie('order-info');
|
|
|
if (info) {
|
|
|
window.setCookie('order-info', '');
|
|
|
}
|
|
|
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -9019,6 +9023,7 @@ if ($('.freebie').length > 0) { |
|
|
|
|
|
$('.btn-balance').on('touchend', function() {
|
|
|
lowStockCount = 0;
|
|
|
var info = window.cookie('order-info');
|
|
|
if (shouldLowStocks()) {
|
|
|
tip.show('所选商品中有' + lowStockCount + '种库存不足的商品');
|
|
|
return false;
|
...
|
...
|
@@ -9030,6 +9035,9 @@ $('.btn-balance').on('touchend', function() { |
|
|
}
|
|
|
|
|
|
if (hasChecked()) {
|
|
|
if (info) {
|
|
|
window.setCookie('order-info', '');
|
|
|
}
|
|
|
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
|
|
|
} else {
|
|
|
tip.show('请先勾选商品');
|
...
|
...
|
@@ -9158,7 +9166,7 @@ $('.icon-del').on('touchstart', function(e) { |
|
|
autoHide: true,
|
|
|
fast: true
|
|
|
});
|
|
|
window.setCookie('order-info', '');
|
|
|
//window.setCookie('order-info', '');
|
|
|
window.setCookie('_yoho-cart-refreshByDelete', true);
|
|
|
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
|
|
|
} else {
|
...
|
...
|
@@ -9423,11 +9431,8 @@ $('.invoice').on('touchend', '.checkbox', function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
function orderCompute(firstEnter) {
|
|
|
function orderCompute() {
|
|
|
var yohoCoin = orderInfo('yohoCoin');
|
|
|
if (firstEnter) {
|
|
|
yohoCoin = 0;
|
|
|
}
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
url: '/cart/index/orderCompute',
|
...
|
...
|
@@ -9465,9 +9470,6 @@ function orderCompute(firstEnter) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
// 进入页面计算一次价格
|
|
|
//orderCompute(1);
|
|
|
|
|
|
function submitOrder() {
|
|
|
var invoiceText = $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
|
|
|
msg = $('#msg').find('input').val() || orderInfo('msg');
|
...
|
...
|
@@ -9624,7 +9626,7 @@ require("js/common"); |
|
|
function init() {
|
|
|
info = {
|
|
|
uid: window.getUid(),
|
|
|
deliveryId: 1,
|
|
|
deliveryId: $('.dispatch-mode .chosed').data('id') || 1,
|
|
|
deliveryTimeId: 1,
|
|
|
paymentTypeId: 1,
|
|
|
yohoCoin: 0,
|
...
|
...
|
@@ -9645,7 +9647,7 @@ try { |
|
|
info = JSON.parse(info);
|
|
|
|
|
|
// 2015/12/31 hf: fixes bug to 购物车页面调用该JS, 会导致有YOHO币,值却没有传给服务端. 因此需要再设置一下
|
|
|
// info.yohoCoin = $('.coin').data('yoho-coin') || 0;
|
|
|
//info['yohoCoin'] = $('.coin').data('yoho-coin') || 0;
|
|
|
} catch (e) {
|
|
|
init();
|
|
|
}
|
...
|
...
|
|