Authored by 梁志锋

购物车修改

... ... @@ -12,12 +12,13 @@ var chosePanel = require('./chose-panel'),
dialog = require('../me/dialog'),
tip = require('../plugin/tip');
var $cartContent = $('.cart-content');
var $cartContent = $('.cart-content'),
cartType = $('#cartType').val(),
hasShowCartPresellTip = false;
var navHammer,
advanceBuyHammer,
freebieHammer,
cartType = $('#cartType').val();
freebieHammer;
var hasChecked = $('.cart-content:not(.hide) .icon-cb-checked').length > 0 ? true : false; //是否有选中商品
... ... @@ -67,6 +68,11 @@ require('./good');
lazyLoad($('img.lazy'));
if (typeof window.cookie === 'function' && 'y' === window.cookie('_hasShowCartPresellTip')) {
$('#presell-tip').addClass('hide');
hasShowCartPresellTip = true;
}
if ('advance' === cartType) {
$cartContent.toggleClass('hide');
$('presell-cart-nav').addClass('active');
... ... @@ -102,9 +108,12 @@ if ($('.cart-nav').length > 0) {
$(window).trigger('scroll');
});
if(!hasShowCartPresellTip) {
setTimeout(function() {
$('#presell-tip').addClass('hide');
window.setCookie('_hasShowCartPresellTip', 'y');
}, 3000);
}
}
if ($('.advance-buy').length > 0) {
... ... @@ -121,14 +130,6 @@ if ($('.freebie').length > 0) {
});
}
//$('.advance-buy').on('touchend', function() {
// window.location.href = '/cart/index/advanceBuy?cartType=' + cartType;
//});
//
//$('.freebie').on('touchend', function() {
// window.location.href = '/cart/index/gift?cartType=' + cartType;
//});
$('.btn-balance').on('touchend', function() {
if (shouldSelectGift()) {
showChooseGifDialog();
... ...