...
|
...
|
@@ -1013,70 +1013,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';
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -1518,7 +1454,7 @@ function actionLoginInfo() { |
|
|
* 初始化函数
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.init = function() {
|
|
|
function init() {
|
|
|
actionNav(); //处理导航
|
|
|
actionTipPic(); //鼠标移入后查询
|
|
|
actionExeTemplate(); //处理模板
|
...
|
...
|
@@ -1531,7 +1467,6 @@ exports.init = function() { |
|
|
actionGetBannerAndNotice(); // 获取banner和服务器维护提示
|
|
|
actionBrandChange(); //切换品牌
|
|
|
actionAddKeyWords(); //跳转后增加关键字
|
|
|
actionFirstMenuClick(); //一级菜单点击(会设置cookie)
|
|
|
actionGoodsCarMouseEffect(); //鼠标滑入滑出效果
|
|
|
actionUpdateCartNum(); //更新购物车数量
|
|
|
actionLoopUpdCartNum(); //循环检测购物车数量
|
...
|
...
|
@@ -1542,5 +1477,5 @@ exports.init = function() { |
|
|
actionLoginInfo(); //获取登录信息
|
|
|
actionCover(); //初次登录弹框
|
|
|
actionAddKeyWords(); //增加关键字
|
|
|
};
|
|
|
|
|
|
}
|
|
|
init(); |
...
|
...
|
|