Authored by 梁志锋

Merge branch 'fix/issue' into 'develop'

优化购物车商品删空后的页面颜色。

See merge request !77
... ... @@ -10,11 +10,13 @@ var $ = require('jquery'),
var chosePanel = require('./chose-panel'),
dialog = require('../me/dialog'),
loading = require('../plugin/loading'),
tip = require('../plugin/tip');
var $cartContent = $('.cart-content'),
cartType = $('#cartType').val(),
$cartNav = $('.cart-nav'),
$cartPage = $('.shopping-cart-page'),
hasShowCartPresellTip = false;
var navHammer,
... ... @@ -22,19 +24,30 @@ var navHammer,
freebieHammer,
switchChose = false;
var isRefreshByDelete = window.cookie('_yoho-cart-refreshByDelete') === 'true' ? true : false;
loading.showLoadingMask();
function needLoadRecommandForYou() {
return window.isCookiesEnabled() ?
$('.cart-goods').length <= 0 && window.cookie('_yoho-cart-refreshByDelete') !== 'true' :
$('.cart-goods').length <= 0 && !isRefreshByDelete :
$('.cart-goods').length <= 0;
}
if (needLoadRecommandForYou()) {
require('../product/recommend-for-you');
} else {
if (isRefreshByDelete) {
$('body').css('background-color', '#f0f0f0');
}
require('./good');
}
$cartPage.css('display', 'block');
loading.hideLoadingMask();
window.setCookie('_yoho-cart-refreshByDelete', false);
ellipsis.init();
... ...
... ... @@ -8,6 +8,7 @@
margin-bottom: 120rem / $pxConvertRem;
overflow-x: hidden;
background: #f0f0f0;
display: none;
.yoho-tip {
z-index: 4;
... ...