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
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
f044efcfdd8655a8347c3cb6ebc8cf22df23f070
2 parents
f1c96f3f
506936bc
Merge remote-tracking branch 'origin/hotfix/xieweiguang'
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
25 deletions
static/js/category/index.js
static/js/guang/home.js
static/js/guang/plus-star/list.js
static/js/product/list.js
static/js/product/newsale/discount.js
static/js/product/newsale/newarrival.js
static/js/category/index.js
View file @
f044efc
...
...
@@ -4,8 +4,7 @@
* @date: 2015/10/14
*/
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
);
var
$
=
require
(
'jquery'
);
var
$nav
=
$
(
'.category-nav'
),
$categoryContainer
=
$
(
'.category-container'
),
...
...
@@ -15,7 +14,6 @@ var $nav = $('.category-nav'),
var
$curContent
=
$contents
.
not
(
'.hide'
);
var
navHammer
;
//初始化container高度
(
function
()
{
...
...
@@ -39,8 +37,7 @@ $('.category-container').bind('contextmenu', function(e) {
return
false
;
});
navHammer
=
new
Hammer
(
$nav
[
0
]);
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
$nav
.
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
index
=
$this
.
index
();
...
...
static/js/guang/home.js
View file @
f044efc
...
...
@@ -5,7 +5,6 @@
*/
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
),
Swiper
=
require
(
'yoho.iswiper'
);
var
info
=
require
(
'./info'
),
...
...
@@ -25,7 +24,7 @@ var $infoList = $('#info-list'),
var
state
=
{};
var
mySwiper
,
navHammer
;
var
mySwiper
;
if
(
$loadMoreInfo
.
length
>
0
)
{
$loading
=
$loadMoreInfo
.
children
(
'.loading'
);
...
...
@@ -59,8 +58,7 @@ info.initInfosEvt($infoList);
$nav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$nav
[
0
]);
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
$nav
.
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'.guang-nav-item'
),
$content
,
...
...
static/js/guang/plus-star/list.js
View file @
f044efc
...
...
@@ -5,14 +5,13 @@
*/
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
),
lazyLoad
=
require
(
'yoho.lazyload'
),
Swiper
=
require
(
'yoho.iswiper'
);
var
$navs
=
$
(
'#nav-tab > li'
),
$contents
=
$
(
'#ps-content > .content'
);
var
mySwiper
,
navHammer
;
var
mySwiper
;
lazyLoad
(
$
(
'img.lazy'
));
...
...
@@ -23,8 +22,7 @@ mySwiper = new Swiper('.swiper-container', {
$
(
'#nav-tab'
).
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
document
.
getElementById
(
'nav-tab'
));
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
$
(
'#nav-tab'
).
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
);
if
(
$this
.
hasClass
(
'focus'
))
{
...
...
static/js/product/list.js
View file @
f044efc
...
...
@@ -70,7 +70,6 @@ var $listNav = $('#list-nav'),
},
$pre
=
$listNav
.
find
(
'.active'
),
//纪录进入筛选前的active项,初始为选中项
searching
,
navHammer
,
btnIntroHammer
,
introHammer
,
brandColHammer
;
...
...
@@ -285,8 +284,8 @@ writeSearch.bindWirteLocal($('#search-form'));
$listNav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$listNav
[
0
]);
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
$listNav
.
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
nav
,
navType
,
...
...
static/js/product/newsale/discount.js
View file @
f044efc
...
...
@@ -6,7 +6,6 @@
var
$
=
require
(
'jquery'
),
Swiper
=
require
(
'yoho.iswiper'
),
Hammer
=
require
(
'yoho.hammer'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
var
swiper
;
...
...
@@ -62,7 +61,6 @@ var $listNav = $('#list-nav'),
}
},
$pre
=
$listNav
.
find
(
'.active'
),
//纪录进入筛选前的active项,初始为选中项
navHammer
,
searching
;
require
(
'../suspend-cart'
);
//悬浮购物车
...
...
@@ -266,8 +264,8 @@ lazyLoad($('.lazy'));
$listNav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$listNav
[
0
]);
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
$listNav
.
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
nav
,
navType
,
...
...
static/js/product/newsale/newarrival.js
View file @
f044efc
...
...
@@ -6,7 +6,6 @@
var
$
=
require
(
'jquery'
),
Swiper
=
require
(
'yoho.iswiper'
),
Hammer
=
require
(
'yoho.hammer'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
var
swiper
,
...
...
@@ -72,7 +71,6 @@ var $listNav = $('#list-nav'),
}
},
$pre
=
$listNav
.
find
(
'.active'
),
//纪录进入筛选前的active项,初始为选中项
navHammer
,
searching
;
require
(
'../suspend-cart'
);
//悬浮购物车
...
...
@@ -295,8 +293,8 @@ $listNav.bind('contextmenu', function(e) {
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
navHammer
=
new
Hammer
(
$listNav
[
0
]);
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
// navHammer = new Hammer($listNav[0]);
$listNav
.
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
nav
,
navType
,
...
...
@@ -373,7 +371,7 @@ navHammer.on('tap pressup', function(e) {
search
();
}
}
e
.
s
rcEvent
.
s
topPropagation
();
e
.
stopPropagation
();
});
$
(
window
).
scroll
(
function
()
{
...
...
Please
register
or
login
to post a comment