Authored by biao

1.删除购物车物品后,页面刷新不请求为你优选。2.减小购物车中商品数字的大小. code review by LZF

... ... @@ -22,14 +22,34 @@ var navHammer,
freebieHammer,
switchChose = false;
require('./good');
//require('./good');
if ($('.cart-zero').length > 0) {
function isCookiesEnabled() {
var cookieEnabled = (navigator.cookieEnabled) ? true : false;
if (typeof navigator.cookieEnabled === 'undefined' && !cookieEnabled) {
document.cookie = 'testcookie';
cookieEnabled = (document.cookie.indexOf('testcookie') !== -1) ? true : false;
}
return (cookieEnabled);
}
function needLoadRecommandForYou() {
return isCookiesEnabled() ?
$('.shopping-cart-good').length <= 0 && window.cookie('yoho-cart-refreshByDelete') !== 'true' :
$('.shopping-cart-good').length <= 0;
}
if (needLoadRecommandForYou()) {
require('../product/recommend-for-you');
} else {
require('./good');
}
window.setCookie('yoho-cart-refreshByDelete', false);
ellipsis.init();
function cartContentShow() {
... ...
... ... @@ -108,6 +108,7 @@ $('.icon-del').on('touchstart', function(e) {
});
orderInfo('couponCode', null);
orderInfo('couponName', null);
window.setCookie('yoho-cart-refreshByDelete', true);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
} else {
tip.show(data.message);
... ...
... ... @@ -123,10 +123,10 @@
}
.count {
font-size: 28rem / $pxConvertRem;
font-size: 20rem / $pxConvertRem;
color: #999;
display: inline-block;
width: 19%;
width: 22%;
position: absolute;
text-align: center;
}
... ...