Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
whb
9 years ago
Commit
774bcd54e86fe25feb2fb2d0d884fb9357c98d17
1 parent
14ffbd16
index.js
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
81 deletions
web-static/dist/yohobuy/0.0.1/index-debug.js
web-static/dist/yohobuy/0.0.1/index.js
web-static/dist/yohobuy/0.0.1/index-debug.js
View file @
774bcd5
...
...
@@ -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'
);
});
});
...
...
web-static/dist/yohobuy/0.0.1/index.js
View file @
774bcd5
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment