Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
80f0ccc55f596e8ed93724ebd6d8dffbd4fd9a0d
2 parents
f857d423
ad82fbe4
Merge remote-tracking branch 'origin/hotfix/xieweiguang'
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
103 additions
and
15 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/sass/category/_index.scss
static/sass/guang/_info-list.scss
static/sass/guang/_plus-star.scss
static/sass/product/_discount.scss
static/sass/product/_list.scss
static/sass/product/_new-arrival.scss
static/js/category/index.js
View file @
80f0ccc
...
...
@@ -32,9 +32,15 @@ var navHammer;
$
(
'#search-input'
).
focus
(
function
()
{
$
(
this
).
blur
();
});
$nav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
$
(
'.category-container'
).
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$nav
[
0
]);
navHammer
.
on
(
'tap'
,
function
(
e
)
{
navHammer
.
on
(
'tap
pressup
'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
index
=
$this
.
index
();
...
...
@@ -71,7 +77,7 @@ $categoryContainer.on('touchend', function(e) {
}
});
$categoryContainer
.
find
(
'.primary-level'
).
on
(
'touchstart'
,
'li'
,
function
()
{
$categoryContainer
.
find
(
'.primary-level'
).
on
(
'touchstart
touchend touchcancel
'
,
'li'
,
function
()
{
$primaryItem
.
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'li'
,
function
()
{
...
...
@@ -84,3 +90,11 @@ $categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
}).
on
(
'touchend touchcancel'
,
'li'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
$nav
.
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
target
.
parentNode
.
className
=
'bytouch '
+
target
.
parentNode
.
className
;
}).
on
(
'touchend touchcancel'
,
function
()
{
$nav
.
find
(
'li'
).
removeClass
(
'bytouch'
);
});
\ No newline at end of file
...
...
static/js/guang/home.js
View file @
80f0ccc
...
...
@@ -56,9 +56,12 @@ info.initInfosEvt($infoList);
};
});
}());
$nav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$nav
[
0
]);
navHammer
.
on
(
'tap'
,
function
(
e
)
{
navHammer
.
on
(
'tap pressup'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'.guang-nav-item'
),
$content
,
index
;
...
...
@@ -112,4 +115,12 @@ $(document).scroll(function() {
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
0.25
*
$c
.
height
())
{
loadMore
(
$c
,
state
[
curType
]);
}
});
$nav
.
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
target
.
className
=
'bytouch '
+
target
.
className
;
}).
on
(
'touchend touchcancel'
,
function
()
{
$nav
.
find
(
'li'
).
removeClass
(
'bytouch'
);
});
\ No newline at end of file
...
...
static/js/guang/plus-star/list.js
View file @
80f0ccc
...
...
@@ -20,9 +20,11 @@ mySwiper = new Swiper('.swiper-container', {
lazyLoading
:
true
,
pagination
:
'.swiper-pagination'
});
$
(
'#nav-tab'
).
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
document
.
getElementById
(
'nav-tab'
));
navHammer
.
on
(
'tap'
,
function
(
e
)
{
navHammer
.
on
(
'tap
pressup
'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
);
if
(
$this
.
hasClass
(
'focus'
))
{
...
...
@@ -33,4 +35,11 @@ navHammer.on('tap', function(e) {
$contents
.
toggleClass
(
'hide'
);
$
(
document
).
trigger
(
'scroll'
);
//Trigger lazyLoad
});
$
(
'#nav-tab'
).
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
target
.
className
=
'bytouch '
+
target
.
className
;
}).
on
(
'touchend touchcancel'
,
function
()
{
$navs
.
removeClass
(
'bytouch'
);
});
\ No newline at end of file
...
...
static/js/product/list.js
View file @
80f0ccc
...
...
@@ -281,8 +281,12 @@ writeSearch.bindWirteLocal($('#search-form'));
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$listNav
[
0
]);
navHammer
.
on
(
'tap'
,
function
(
e
)
{
navHammer
.
on
(
'tap
pressup
'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
nav
,
navType
,
...
...
@@ -443,4 +447,11 @@ if ($brandHeader.length > 0) {
}
//初始请求最新第一页数据
search
();
\ No newline at end of file
search
();
$listNav
.
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
target
.
parentNode
.
parentNode
.
className
=
'bytouch '
+
target
.
parentNode
.
parentNode
.
className
;
}).
on
(
'touchend touchcancel'
,
function
()
{
$listNav
.
find
(
'li'
).
removeClass
(
'bytouch'
);
});
...
...
static/js/product/newsale/discount.js
View file @
80f0ccc
...
...
@@ -263,8 +263,11 @@ lazyLoad($('.lazy'));
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
navHammer
=
new
Hammer
(
$listNav
[
0
]);
navHammer
.
on
(
'tap'
,
function
(
e
)
{
navHammer
.
on
(
'tap
pressup
'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
nav
,
navType
,
...
...
@@ -373,3 +376,11 @@ $(window).scroll(function() {
//初始请求最新第一页数据
search
();
$listNav
.
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
target
.
parentNode
.
parentNode
.
className
=
'bytouch '
+
target
.
parentNode
.
parentNode
.
className
;
}).
on
(
'touchend touchcancel'
,
function
()
{
$listNav
.
find
(
'li'
).
removeClass
(
'bytouch'
);
});
...
...
static/js/product/newsale/newarrival.js
View file @
80f0ccc
...
...
@@ -285,6 +285,10 @@ $.ajax({
});
lazyLoad
(
$
(
'.lazy'
));
$listNav
.
bind
(
'contextmenu'
,
function
(
e
)
{
return
false
;
});
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
//2.价格和折扣active状态时继续点击切换排序
...
...
@@ -292,7 +296,7 @@ lazyLoad($('.lazy'));
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
navHammer
=
new
Hammer
(
$listNav
[
0
]);
navHammer
.
on
(
'tap'
,
function
(
e
)
{
navHammer
.
on
(
'tap
pressup
'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
nav
,
navType
,
...
...
@@ -385,3 +389,11 @@ $(window).scroll(function() {
//初始请求最新第一页数据
search
();
$listNav
.
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
target
.
parentNode
.
className
=
'bytouch '
+
target
.
parentNode
.
className
;
}).
on
(
'touchend touchcancel'
,
function
()
{
$listNav
.
find
(
'li'
).
removeClass
(
'bytouch'
);
});
...
...
static/sass/category/_index.scss
View file @
80f0ccc
...
...
@@ -52,8 +52,14 @@
&
.focus
{
color
:
#000
;
}
&
.bytouch
{
background
:
#eee
;
}
}
span
{
display
:
block
;
width
:
100%
;
...
...
static/sass/guang/_info-list.scss
View file @
80f0ccc
...
...
@@ -59,6 +59,7 @@
height
:
80rem
/
$pxConvertRem
;
}
.guang-nav-item
{
float
:
left
;
color
:
#ccc
;
...
...
@@ -68,7 +69,11 @@
&
.focus
{
color
:
#000
;
}
}
}
.bytouch
{
background
:
#eee
;
}
.info-list-container
{
...
...
static/sass/guang/_plus-star.scss
View file @
80f0ccc
...
...
@@ -25,7 +25,9 @@
color
:
#000
;
}
}
.bytouch
{
background
:
#eee
;
}
.star-nav
{
border-right
:
1px
solid
#ccc
;
}
...
...
static/sass/product/_discount.scss
View file @
80f0ccc
...
...
@@ -43,7 +43,9 @@
text-align
:
center
;
font-size
:
14px
;
}
.bytouch
{
background
:
#eee
;
}
a
{
display
:
block
;
box-sizing
:
border-box
;
...
...
static/sass/product/_list.scss
View file @
80f0ccc
...
...
@@ -193,6 +193,9 @@
text-align
:
center
;
font-size
:
14px
;
}
.bytouch
{
background
:
#eee
;
}
a
{
display
:
block
;
...
...
static/sass/product/_new-arrival.scss
View file @
80f0ccc
...
...
@@ -34,7 +34,7 @@
.list-nav
{
border-top
:
2px
solid
#fff
;
border-bottom
:
1px
solid
#e6e6e6
;
>
li
{
float
:
left
;
width
:
25%
;
...
...
@@ -44,7 +44,9 @@
font-size
:
14px
;
color
:
#999
;
}
.bytouch
{
background
:
#eee
;
}
a
{
display
:
inline-block
;
box-sizing
:
border-box
;
...
...
Please
register
or
login
to post a comment