...
|
...
|
@@ -1158,11 +1158,6 @@ function actionCover() { |
|
|
var containertop;
|
|
|
var length = '';
|
|
|
|
|
|
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');
|
...
|
...
|
@@ -1348,70 +1343,6 @@ function actionExeCookieMap() { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 一级菜单点击(会设置cookie)
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionFirstMenuClick() {
|
|
|
var $cookieGender;
|
|
|
|
|
|
$('.first-nav-item').click(function() {
|
|
|
$cookieGender = window.cookie('_Gender');
|
|
|
if (typeof $cookieGender !== 'undefined' && $cookieGender !== '') {
|
|
|
window.setCookie('_Gender', 1, {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
}
|
|
|
if ($(this).find('.name-cn a').text() === '男生') {
|
|
|
window.setCookie('_Gender', '1,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
window.setCookie('_Channel', 'boys', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
}
|
|
|
if ($(this).find('.name-cn a').text() === '女生') {
|
|
|
window.setCookie('_Gender', '2,3', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
window.setCookie('_Channel', 'girls', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
}
|
|
|
if ($(this).find('.name-cn a').text() === '创意生活') {
|
|
|
window.setCookie('_Channel', 'lifestyle', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
}
|
|
|
if ($(this).find('.name-cn a').text() === '潮童') {
|
|
|
window.setCookie('_Channel', 'kids', {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com',
|
|
|
expires: 7
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('#backToOld').click(function() {
|
|
|
window.setCookie('_New', 1, {
|
|
|
path: '/',
|
|
|
domain: '.yohobuy.com'
|
|
|
});
|
|
|
location.href = 'http://www.yohobuy.com';
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -1853,7 +1784,7 @@ function actionLoginInfo() { |
|
|
* 初始化函数
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.init = function() {
|
|
|
function init() {
|
|
|
actionNav(); //处理导航
|
|
|
actionTipPic(); //鼠标移入后查询
|
|
|
actionExeTemplate(); //处理模板
|
...
|
...
|
@@ -1866,7 +1797,6 @@ exports.init = function() { |
|
|
actionGetBannerAndNotice(); // 获取banner和服务器维护提示
|
|
|
actionBrandChange(); //切换品牌
|
|
|
actionAddKeyWords(); //跳转后增加关键字
|
|
|
actionFirstMenuClick(); //一级菜单点击(会设置cookie)
|
|
|
actionGoodsCarMouseEffect(); //鼠标滑入滑出效果
|
|
|
actionUpdateCartNum(); //更新购物车数量
|
|
|
actionLoopUpdCartNum(); //循环检测购物车数量
|
...
|
...
|
@@ -1877,8 +1807,8 @@ exports.init = function() { |
|
|
actionLoginInfo(); //获取登录信息
|
|
|
actionCover(); //初次登录弹框
|
|
|
actionAddKeyWords(); //增加关键字
|
|
|
};
|
|
|
|
|
|
}
|
|
|
init();
|
|
|
|
|
|
});
|
|
|
define("js/simple-header", ["jquery"], function(require, exports, module){
|
...
|
...
|
@@ -1978,9 +1908,10 @@ function actionLoginInfo() { |
|
|
* 初始化函数
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.init = function() {
|
|
|
function init() {
|
|
|
actionLoginInfo(); //获取登录信息
|
|
|
};
|
|
|
}
|
|
|
init();
|
|
|
|
|
|
|
|
|
});
|
...
|
...
|
@@ -2640,7 +2571,7 @@ $goodInfoMain.on('click', '.col-btn', function() { |
|
|
url: '/product/list/changeFavorite',
|
|
|
data: {
|
|
|
skn: $this.closest('.good-info').data('skn'),
|
|
|
isFavorite: !$this.hasClass('coled')
|
|
|
isFavorite: $this.hasClass('coled')
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
if (res.code === 200) {
|
...
|
...
|
@@ -2653,21 +2584,22 @@ $goodInfoMain.on('click', '.col-btn', function() { |
|
|
|
|
|
// 左侧导航
|
|
|
$productListNav.click(function(event) {
|
|
|
var $this = $(this);
|
|
|
|
|
|
if (!$(event.target).hasClass('product-list-nav')) {
|
|
|
if (!$this.hasClass('product-list-nav')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if ($(this).hasClass('active')) {
|
|
|
if ($this.hasClass('active')) {
|
|
|
|
|
|
$(this).find('.sort-child-list').stop(true, true).slideUp();
|
|
|
$this.find('.sort-child-list').stop(true, true).slideUp();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$(this).find('.sort-child-list').stop(true, true).slideDown();
|
|
|
$this.find('.sort-child-list').stop(true, true).slideDown();
|
|
|
}
|
|
|
|
|
|
$(this).toggleClass('active');
|
|
|
$this.toggleClass('active');
|
|
|
});
|
|
|
|
|
|
});
|
...
|
...
|
|