...
|
...
|
@@ -47,13 +47,11 @@ handlebars.registerHelper('notzero', function(v1, options) { |
|
|
});
|
|
|
|
|
|
function getSource(column, postition, event) {
|
|
|
try {
|
|
|
dataLayer.push({
|
|
|
louceng: column,
|
|
|
weizhi: postition,
|
|
|
event: event
|
|
|
});
|
|
|
} catch (e) {}
|
|
|
dataLayer.push({
|
|
|
louceng: column,
|
|
|
weizhi: postition,
|
|
|
event: event
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function closeCover() {
|
...
|
...
|
@@ -459,94 +457,92 @@ $subNav.on({ |
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionCover() {
|
|
|
var gender = window.cookie('_Gender');
|
|
|
// var gender = window.cookie('_Gender');
|
|
|
var newMask = '';
|
|
|
var windowheight = '';
|
|
|
var selfheight = '';
|
|
|
var containertop;
|
|
|
var length = '';
|
|
|
|
|
|
if (true) {
|
|
|
$.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'
|
|
|
$.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
|
|
|
});
|
|
|
$('#cover').bind('click', function(event) {
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
closeCover();
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
$('#cover .guide-box .close').bind('click', function(event) {
|
|
|
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();
|
|
|
closeCover();
|
|
|
});
|
|
|
$('#cover .guide-box .close').bind('click', function() {
|
|
|
getSource('弹窗', 'CLOSE', 'homepage_man');
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
$('.boys img , .boys .go').bind('click', function(event) {
|
|
|
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();
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
$('.girls img, .girls .go').bind('click', function(event) {
|
|
|
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
|
|
|
});
|
|
|
closeCover();
|
|
|
});
|
|
|
$('.boys img , .boys .go').bind('click', function() {
|
|
|
getSource('弹窗', 'BOYS', 'homepage_man');
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
$('.lifestyle img, .lifestyle .go').bind('click', function(event) {
|
|
|
window.setCookie('_Channel', 'lifestyle', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
$('#cover .guide-box').bind('click', function(event) {
|
|
|
event.stopPropagation();
|
|
|
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(e) {
|
|
|
e.stopPropagation();
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// actionCover(); |
|
|
actionCover(); |
...
|
...
|
|