...
|
...
|
@@ -22,23 +22,10 @@ var navHammer, |
|
|
freebieHammer,
|
|
|
switchChose = false;
|
|
|
|
|
|
//require('./good');
|
|
|
|
|
|
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' :
|
|
|
return window.isCookiesEnabled() ?
|
|
|
$('.shopping-cart-good').length <= 0 && window.cookie('_yoho-cart-refreshByDelete') !== 'true' :
|
|
|
$('.shopping-cart-good').length <= 0;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -48,7 +35,7 @@ if (needLoadRecommandForYou()) { |
|
|
require('./good');
|
|
|
}
|
|
|
|
|
|
window.setCookie('yoho-cart-refreshByDelete', false);
|
|
|
window.setCookie('_yoho-cart-refreshByDelete', false);
|
|
|
|
|
|
ellipsis.init();
|
|
|
|
...
|
...
|
|