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
梁志锋
9 years ago
Commit
00215b434fe24d6938cd4e789322e8e458130e30
1 parent
ce66bb9c
merge beta/wap分支
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
26 deletions
static/js/cart/chose-panel.js
static/js/home/home.js
static/js/me/logistic.js
static/sass/home/_side-nav.scss
static/sass/layout/_header.scss
static/js/cart/chose-panel.js
View file @
00215b4
...
...
@@ -236,6 +236,8 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) {
//点击蒙版消失
hide
();
return
false
;
});
$yohoPage
.
on
(
'touchstart'
,
'.color-list .block'
,
function
()
{
...
...
@@ -410,7 +412,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return
;
}
//TODO status change
if
(
$
(
'#chose-btn-sure'
).
html
()
===
'已售罄'
)
{
return
;
}
...
...
static/js/home/home.js
View file @
00215b4
...
...
@@ -29,16 +29,8 @@ $('.nav-btn').on('touchstart', function(event) {
$mobileWrap
.
addClass
(
'menu-open'
);
$overlay
.
show
().
css
(
'opacity'
,
0.3
);
$sideNav
.
addClass
(
'on'
);
event
.
preventDefault
();
event
.
stopPropagation
();
openSideNav
=
true
;
//设置boy高宽,页面不能上下滑动
$
(
'body'
).
css
({
height
:
$
(
window
).
height
(),
overflow
:
'hidden'
});
setTimeout
(
function
()
{
$sideNav
.
css
(
'pointer-events'
,
'auto'
);
},
400
);
...
...
@@ -50,13 +42,9 @@ function hideSideBar() {
openSideNav
=
false
;
if
(
$mobileWrap
.
hasClass
(
'menu-open'
))
{
$mobileWrap
.
removeClass
(
'menu-open'
);
$
(
'.overlay'
)
.
hide
();
$
overlay
.
hide
();
$
(
'.sub-nav'
).
removeClass
(
'show'
);
$sideNav
.
removeClass
(
'on'
);
$
(
'body'
).
css
({
height
:
'auto'
,
overflow
:
'auto'
});
}
}
...
...
@@ -65,6 +53,10 @@ $('.overlay').on('touchstart', function(e) {
return
false
;
});
$sideNav
.
on
(
'touchmove'
,
function
(
e
)
{
return
false
;
});
//点击一级导航,弹出二级导航
$sideNav
.
on
(
'touchstart'
,
'li'
,
function
(
e
)
{
if
(
$
(
this
).
find
(
'.sub-nav'
).
size
()
>
0
)
{
...
...
@@ -80,9 +72,13 @@ $sideNav.on('touchstart', 'li', function(e) {
//返回一级导航,收起二级导航
$subNav
.
each
(
function
()
{
$
(
this
).
find
(
'li'
).
eq
(
0
).
on
(
'touchstart'
,
function
()
{
$
(
this
).
find
(
'li'
).
eq
(
0
).
on
(
'touchend'
,
function
()
{
$sideNav
.
css
(
'pointer-events'
,
'none'
);
setTimeout
(
function
()
{
$sideNav
.
css
(
'pointer-events'
,
'auto'
);
},
400
);
$
(
'.sub-nav'
).
removeClass
(
'show'
);
return
false
;
});
}).
on
(
'touchstart'
,
function
(
e
)
{
if
(
e
.
currentTarget
!==
e
.
target
)
{
...
...
@@ -93,6 +89,7 @@ $subNav.each(function() {
// 侧边栏点击背景色变化
function
highlight
(
$elem
)
{
$elem
.
find
(
'li'
).
on
(
'touchstart'
,
function
()
{
$elem
.
find
(
'.highlight'
).
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
...
...
static/js/me/logistic.js
View file @
00215b4
...
...
@@ -32,4 +32,3 @@ $(window).scrollTop(1).scrollTop(0);
...
...
static/sass/home/_side-nav.scss
View file @
00215b4
...
...
@@ -14,7 +14,7 @@
@include
transition
(
all
.3s
);
>
ul
{
margin-bottom
:
20
rem
/
$pxConvertRem
;
margin-bottom
:
16
rem
/
$pxConvertRem
;
background
:
#fff
;
border-top
:
1px
solid
#e0e0e0
;
border-bottom
:
1px
solid
#e0e0e0
;
...
...
@@ -22,8 +22,8 @@
li
{
position
:
relative
;
height
:
80rem
/
$pxConvertRem
;
line-height
:
80rem
/
$pxConvertRem
;
height
:
64rem
/
$pxConvertRem
;
line-height
:
64rem
/
$pxConvertRem
;
background
:
#fff
;
&
:after
{
...
...
@@ -45,21 +45,27 @@
a
{
display
:
block
;
height
:
100%
;
padding-left
:
110
rem
/
$pxConvertRem
;
padding-left
:
92
rem
/
$pxConvertRem
;
color
:
#444
;
}
em
{
font-weight
:
bold
;
font-size
:
2
6
rem
/
$pxConvertRem
;
font-size
:
2
4
rem
/
$pxConvertRem
;
}
.title
{
display
:
inline-block
;
font-size
:
36rem
/
$pxConvertRem
;
vertical-align
:
bottom
;
padding-left
:
20rem
/
$pxConvertRem
;
// 此处字体小于 12px, 先扩大,再scale缩小
@include
transform
(
scale
(
0
.5
));
-webkit-transform-origin
:
0
50%
0
;
-moz-transform-origin
:
0
50%
0
;
-ms-transform-origin
:
0
50%
0
;
transform-origin
:
0
50%
0
;
}
.nav-icon
,
.nav-img
{
...
...
@@ -92,8 +98,8 @@
.first
{
li
{
height
:
100rem
/
$pxConvertRem
;
line-height
:
100rem
/
$pxConvertRem
;
height
:
80rem
/
$pxConvertRem
;
line-height
:
80rem
/
$pxConvertRem
;
border-bottom
:
1px
solid
#e0e0e0
;
&
:last-child
{
...
...
@@ -105,7 +111,7 @@
}
em
{
font-size
:
3
6
rem
/
$pxConvertRem
;
font-size
:
3
2
rem
/
$pxConvertRem
;
}
.nav-img
,
.nav-icon
{
...
...
static/sass/layout/_header.scss
View file @
00215b4
...
...
@@ -130,6 +130,7 @@
z-index
:
2
;
position
:
relative
;
&
.boys
{
@include
background-image
(
linear-gradient
(
#323232
,
#414141
));
}
...
...
@@ -160,9 +161,9 @@
i
{
width
:
100%
;
height
:
40%
;
overflow
:
hidden
;
display
:
block
;
color
:
#fff
;
margin-bottom
:
8rem
/
$pxConvertRem
;
}
span
{
width
:
100%
;
...
...
Please
register
or
login
to post a comment