...
|
...
|
@@ -205,13 +205,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 {
|
...
|
...
|
@@ -752,7 +750,8 @@ function actionTipPic() { |
|
|
|
|
|
|
|
|
|
|
|
function closeCover(){
|
|
|
|
|
|
function closeCover() {
|
|
|
var $cover = $('#cover');
|
|
|
|
|
|
$cover.remove();
|
...
|
...
|
@@ -763,57 +762,96 @@ 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) {
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 90
|
|
|
});
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
$('#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');
|
|
|
$('#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');
|
|
|
$('.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();
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
...
|
...
|
|