...
|
...
|
@@ -42,7 +42,7 @@ var logoAngle = 0, |
|
|
loopTime = 500,
|
|
|
reg = /^[\^\!\+\-\(\)\:\[\]\\\{\}\~\*\?\|\&\;\/]{0,}$/g;
|
|
|
|
|
|
var dataLayer = [];
|
|
|
// var dataLayer = [];
|
|
|
|
|
|
var cartTimer;
|
|
|
|
...
|
...
|
@@ -127,19 +127,19 @@ handlebars.registerHelper('gt', function(v1, v2, options) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
function getSource(column, postition, event) {
|
|
|
dataLayer.push({
|
|
|
louceng: column,
|
|
|
weizhi: postition,
|
|
|
event: event
|
|
|
});
|
|
|
}
|
|
|
// function getSource(column, postition, event) {
|
|
|
// dataLayer.push({
|
|
|
// louceng: column,
|
|
|
// weizhi: postition,
|
|
|
// event: event
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
function closeCover() {
|
|
|
var $cover = $('#cover');
|
|
|
// function closeCover() {
|
|
|
// var $cover = $('#cover');
|
|
|
|
|
|
$cover.remove();
|
|
|
}
|
|
|
// $cover.remove();
|
|
|
// }
|
|
|
|
|
|
// 设置头部banner
|
|
|
function setTopBanner(data) {
|
...
|
...
|
@@ -816,100 +816,100 @@ $subNav.on({ |
|
|
* 首次进入有弹窗
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionCover() {
|
|
|
var gender = window.cookie('_Gender');
|
|
|
var newMask = '';
|
|
|
var windowheight = '';
|
|
|
var selfheight = '';
|
|
|
var containertop;
|
|
|
var length = '';
|
|
|
|
|
|
if (window.location.href === document.location.protocol + '//www.yohobuy.com/' &&
|
|
|
(typeof gender === 'undefined' || gender === '' || gender === null)) {
|
|
|
$.get('/guide', function(data) {
|
|
|
newMask = document.createElement('div');
|
|
|
newMask.id = 'cover';
|
|
|
newMask.innerHTML = data;
|
|
|
document.body.appendChild(newMask);
|
|
|
windowheight = $(window).height();
|
|
|
selfheight = $('.guide-box').height();
|
|
|
containertop = windowheight / 2 - selfheight / 2;
|
|
|
length = $('.guide-box .clear').find('li').length;
|
|
|
$('.guide-box').css({
|
|
|
width: (200 * length) + 'px',
|
|
|
top: containertop + 'px'
|
|
|
});
|
|
|
$('#cover').bind('click', function() {
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
closeCover();
|
|
|
});
|
|
|
$('#cover .guide-box .close').bind('click', function() {
|
|
|
getSource('弹窗', 'CLOSE', 'homepage_man');
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
closeCover();
|
|
|
});
|
|
|
$('.boys img , .boys .go').bind('click', function() {
|
|
|
getSource('弹窗', 'BOYS', 'homepage_man');
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
closeCover();
|
|
|
});
|
|
|
$('.girls img, .girls .go').bind('click', function() {
|
|
|
getSource('弹窗', 'GIRLS', 'homepage_woman');
|
|
|
window.setCookie('_Gender', '2,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
window.setCookie('_Channel', 'girls', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
});
|
|
|
$('.lifestyle img, .lifestyle .go').bind('click', function() {
|
|
|
window.setCookie('_Channel', 'lifestyle', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
|
|
|
});
|
|
|
$('#cover .guide-box').bind('click', function(event) {
|
|
|
event.stopPropagation();
|
|
|
});
|
|
|
});
|
|
|
$('#cover .guide-box').bind('click', function(e) {
|
|
|
e.stopPropagation();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
// function actionCover() {
|
|
|
// var gender = window.cookie('_Gender');
|
|
|
// var newMask = '';
|
|
|
// var windowheight = '';
|
|
|
// var selfheight = '';
|
|
|
// var containertop;
|
|
|
// var length = '';
|
|
|
|
|
|
// if (window.location.href === document.location.protocol + '//www.yohobuy.com/' &&
|
|
|
// (typeof gender === 'undefined' || gender === '' || gender === null)) {
|
|
|
// $.get('/guide', function(data) {
|
|
|
// newMask = document.createElement('div');
|
|
|
// newMask.id = 'cover';
|
|
|
// newMask.innerHTML = data;
|
|
|
// document.body.appendChild(newMask);
|
|
|
// windowheight = $(window).height();
|
|
|
// selfheight = $('.guide-box').height();
|
|
|
// containertop = windowheight / 2 - selfheight / 2;
|
|
|
// length = $('.guide-box .clear').find('li').length;
|
|
|
// $('.guide-box').css({
|
|
|
// width: (200 * length) + 'px',
|
|
|
// top: containertop + 'px'
|
|
|
// });
|
|
|
// $('#cover').bind('click', function() {
|
|
|
// window.setCookie('_Gender', '1,3', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 90
|
|
|
// });
|
|
|
// window.setCookie('_Channel', 'boys', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 7
|
|
|
// });
|
|
|
// closeCover();
|
|
|
// });
|
|
|
// $('#cover .guide-box .close').bind('click', function() {
|
|
|
// getSource('弹窗', 'CLOSE', 'homepage_man');
|
|
|
// window.setCookie('_Gender', '1,3', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 90
|
|
|
// });
|
|
|
// window.setCookie('_Channel', 'boys', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 7
|
|
|
// });
|
|
|
// closeCover();
|
|
|
// });
|
|
|
// $('.boys img , .boys .go').bind('click', function() {
|
|
|
// getSource('弹窗', 'BOYS', 'homepage_man');
|
|
|
// window.setCookie('_Gender', '1,3', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 90
|
|
|
// });
|
|
|
// window.setCookie('_Channel', 'boys', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 7
|
|
|
// });
|
|
|
// closeCover();
|
|
|
// });
|
|
|
// $('.girls img, .girls .go').bind('click', function() {
|
|
|
// getSource('弹窗', 'GIRLS', 'homepage_woman');
|
|
|
// window.setCookie('_Gender', '2,3', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 90
|
|
|
// });
|
|
|
// window.setCookie('_Channel', 'girls', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 7
|
|
|
// });
|
|
|
// });
|
|
|
// $('.lifestyle img, .lifestyle .go').bind('click', function() {
|
|
|
// window.setCookie('_Channel', 'lifestyle', {
|
|
|
// path: '/',
|
|
|
// domain: '.yohobuy.com',
|
|
|
// expires: 7
|
|
|
// });
|
|
|
// getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
|
|
|
// });
|
|
|
// $('#cover .guide-box').bind('click', function(event) {
|
|
|
// event.stopPropagation();
|
|
|
// });
|
|
|
// });
|
|
|
// $('#cover .guide-box').bind('click', function(e) {
|
|
|
// e.stopPropagation();
|
|
|
// });
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
window.submitSearch = submitSearch;
|
|
|
|
...
|
...
|
@@ -988,6 +988,6 @@ $(function() { |
|
|
});
|
|
|
});
|
|
|
|
|
|
actionCover();
|
|
|
// actionCover(); //首次进入去除弹框
|
|
|
actionAddKeyWords();
|
|
|
|
...
|
...
|
|