Authored by whb

index css js

... ... @@ -486,7 +486,7 @@ function actionGoodsCart() {
}, function() {
$(this).css('background-color', '#fff');
});
}, 'json');
}, 'jsonp');
}
function getText(obj) {
... ... @@ -535,13 +535,11 @@ function actionGoodsCart() {
var params = '';
if (typeof (domain) === undefined || domain === '') {
console.log('请设置请求的api地址');
return false;
}
params = $.extend(defaults, options);
params.page = params.page || 1;
if (params.method === '') {
console.log('请设置请求的URL');
return false;
}
try {
... ... @@ -1082,7 +1080,8 @@ function actionTipPic() {
function closeCover(){
function closeCover() {
var $cover = $('#cover');
$cover.remove();
... ... @@ -1093,58 +1092,97 @@ function closeCover(){
*/
function actionCover() {
var gender = cookieMap._Gender;
var newMask = '';
var windowheight = '';
var selfheight = '';
var containertop;
var length = '';
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");
window.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) {
newMask = document.createElement('div');
newMask.id = 'cover';
newMask.innerHTML=data;
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;
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: container_top + 'px'
top: containertop + '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').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();
});
$('#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();
$('#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();
});
$('.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();
$('.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();
});
$('.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');
$('.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
});
});
$('.lifestyle img, .lifestyle .go').bind('click', function(event){
setCookie('_Channel','lifestyle',{path : '/',domain : '.yohobuy.com',expires : 7});
getSource('弹窗','LIEFSTYLE','homepage_lifestyle');
analy( 'guide_lifestyle');
$('.lifestyle img, .lifestyle .go').bind('click', function(event) {
window.setCookie('_Channel', 'lifestyle', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
});
//防止冒泡事件
$('#cover .guide-box').bind('click', function(event){
$('#cover .guide-box').bind('click', function(event) {
event.stopPropagation();
});
});
});
}
}
/**
... ... @@ -1774,8 +1812,7 @@ function init() {
actionCover(); //初次登录弹框
}
init();
init();
});
define("js/product/entry", ["jquery","handlebars","source-map","lazyload"], function(require, exports, module){
/**
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.