...
|
...
|
@@ -750,6 +750,73 @@ function actionTipPic() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function closeCover(){
|
|
|
var $cover = $('#cover');
|
|
|
|
|
|
$cover.remove();
|
|
|
}
|
|
|
/**
|
|
|
* 首次进入有弹窗
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionCover() {
|
|
|
var gender = cookieMap._Gender;
|
|
|
|
|
|
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
|
|
|
if(typeof gender == 'undefined' || gender == '' || gender == null){
|
|
|
$.get('http://www.yohobuy.com/index/guide', function(data){
|
|
|
var newMask = document.createElement("div");
|
|
|
newMask.id = 'cover';
|
|
|
newMask.innerHTML=data;
|
|
|
document.body.appendChild(newMask);
|
|
|
var window_height = $(window).height();
|
|
|
var self_height = $('.guide-box').height();
|
|
|
var container_top = window_height / 2 - self_height / 2;
|
|
|
var length=$('.guide-box .clear').find("li").length;
|
|
|
$('.guide-box').css({
|
|
|
width: (200 * length) + 'px',
|
|
|
top: container_top + 'px'
|
|
|
});
|
|
|
$('#cover').bind('click', function(event){
|
|
|
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
|
|
|
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
|
|
|
closeCover();
|
|
|
});
|
|
|
$('#cover .guide-box .close').bind('click', function(event){
|
|
|
getSource('弹窗','CLOSE','homepage_man');
|
|
|
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
|
|
|
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
|
|
|
analy('guide_close');
|
|
|
closeCover();
|
|
|
});
|
|
|
$('.boys img , .boys .go').bind('click', function(event){
|
|
|
getSource('弹窗','BOYS','homepage_man');
|
|
|
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
|
|
|
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
|
|
|
analy( 'guide_boys');
|
|
|
closeCover();
|
|
|
});
|
|
|
$('.girls img, .girls .go').bind('click', function(event){
|
|
|
getSource('弹窗','GIRLS','homepage_woman');
|
|
|
setCookie('_Gender','2,3',{path : '/',domain : '.yohobuy.com',expires : 90});
|
|
|
setCookie('_Channel','girls',{path : '/',domain : '.yohobuy.com',expires : 7});
|
|
|
analy( 'guide_girls');
|
|
|
});
|
|
|
$('.lifestyle img, .lifestyle .go').bind('click', function(event){
|
|
|
setCookie('_Channel','lifestyle',{path : '/',domain : '.yohobuy.com',expires : 7});
|
|
|
getSource('弹窗','LIEFSTYLE','homepage_lifestyle');
|
|
|
analy( 'guide_lifestyle');
|
|
|
});
|
|
|
//防止冒泡事件
|
|
|
$('#cover .guide-box').bind('click', function(event){
|
|
|
event.stopPropagation();
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 查询跳转后保留关键字
|
|
|
* @return {[type]} [description]
|
...
|
...
|
@@ -1200,7 +1267,7 @@ function actionExeTemplate() { |
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionSearch() {
|
|
|
var searchDomain = 'http://search.yohobuy.com/product/search/suggest';
|
|
|
var searchDomain = 'http://search.yohobuy.com/api/suggest';
|
|
|
|
|
|
$('#query_key').search(searchDomain);
|
|
|
}
|
...
|
...
|
@@ -1374,6 +1441,7 @@ function init() { |
|
|
actionListenDelCarGoods(); //监听购物车删除
|
|
|
actionListenCartMore(); //
|
|
|
actionLoginInfo(); //获取登录信息
|
|
|
actionCover(); //初次登录弹框
|
|
|
}
|
|
|
|
|
|
init(); |
...
|
...
|
|