Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
沈志敏
8 years ago
Commit
8f1bc10ff19b810438a0e883d5a6a355a0efc38c
2 parents
fa90862f
b64f6ffc
Merge branch 'release/wap-optim' of git.yoho.cn:fe/yohobuywap-node into release/wap-optim
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
34 deletions
apps/product/views/action/newshop/shop-classics.hbs
public/js/product/shop.classics.page.js
public/js/product/shop/coupon.js
public/scss/product/shop/_shop-index.css
public/scss/shop.css
apps/product/views/action/newshop/shop-classics.hbs
View file @
8f1bc10
{{#
shopIndex
}}
<div
class=
"shop-index yoho-page scroll-wrapper"
id=
"wrapper"
>
<div
class=
"shop-index yoho-page scroll-wrapper
new-shop
"
id=
"wrapper"
>
<div
id=
"scroller"
>
<div
id=
"nav-top"
>
...
...
@@ -54,9 +54,7 @@
<div
id=
"home-page"
class=
"main"
>
<div
id=
"nav-main"
class=
"nav-main"
>
<!-- 优惠卷 -->
{{#if
shopCoupons
}}
{{>
shop
/
shop-coupon
}}
{{/if}}
<div
class=
"coupon-group"
></div>
<!-- 大导航 -->
{{#if
brandList
}}
...
...
public/js/product/shop.classics.page.js
View file @
8f1bc10
...
...
@@ -115,7 +115,7 @@ var defaultOpt = require('../common/query-param');
channel
:
defaultOpt
.
channel
},
success
:
function
(
data
)
{
$
goodsContainer
.
append
(
data
);
$
(
'.shop-index'
).
after
(
data
);
// 初始化filter&注册filter回调
filter
.
initFilter
({
...
...
@@ -344,10 +344,13 @@ function tabChange(dom, index) {
// 首页导航
(
function
(
nav
,
posNav
,
main
)
{
var
scrollToNav1
=
function
()
{
window
.
scrollTo
(
0
,
$
(
'#nav'
).
offset
().
top
+
5
);
setTimeout
(
function
(){
window
.
scrollTo
(
0
,
$
(
'#nav'
).
offset
().
top
+
5
);
},
100
)
};
$
(
nav
+
' li, '
+
posNav
+
' li'
).
not
(
'li.all-goods'
).
on
(
'touchstart'
,
function
()
{
var
isPos
=
$
(
this
).
parent
().
attr
(
'id'
)
===
'pos-nav'
;
var
index
=
$
(
this
).
index
(),
activeTab
=
$
(
this
).
attr
(
'tab'
);
...
...
@@ -362,17 +365,17 @@ function tabChange(dom, index) {
$
(
'#'
+
activeTab
).
fadeIn
();
if
(
activeTab
===
'new-arrival'
)
{
toTop
=
true
;
newData
(
scrollToNav1
);
newData
(
isPos
?
scrollToNav1
:
function
()
{}
);
viewType
=
2
;
}
else
if
(
activeTab
===
'popularity'
)
{
toTop
=
true
;
hotData
(
scrollToNav1
);
hotData
(
isPos
?
scrollToNav1
:
function
()
{}
);
viewType
=
3
;
}
else
if
(
activeTab
===
'home-page'
)
{
$nav1
.
removeClass
(
'fixed-top absolute'
);
$nav2
.
removeClass
(
'fixed-top absolute'
);
viewType
=
1
;
scrollToNav1
();
isPos
&&
scrollToNav1
();
}
scH
=
$
(
'#scroller'
).
outerHeight
();
});
...
...
@@ -742,6 +745,7 @@ $newList.on('touchstart', 'li', function(e) {
},
function
()
{
});
}
e
.
stopPropagation
();
});
...
...
@@ -753,7 +757,9 @@ $(document).on('touchstart', function(e) {
}
});
function
subNavScrollTo
()
{
window
.
scrollTo
(
0
,
$
(
'#list-nav'
).
offset
().
top
+
5
);
setTimeout
(
function
()
{
window
.
scrollTo
(
0
,
$
(
'#list-nav'
).
offset
().
top
+
5
);
},
100
)
}
$subNav
.
on
(
'touchend touchcancel'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'li'
),
...
...
@@ -910,7 +916,6 @@ $subNav.on('touchend touchcancel', function(e) {
url
:
'/product/search/search'
,
nextPage
:
false
},
function
()
{
subNavScrollTo
();
});
}
}
...
...
public/js/product/shop/coupon.js
View file @
8f1bc10
...
...
@@ -10,7 +10,7 @@ shopCoupon = {
common
:
{
appVersion
:
window
.
queryString
.
app_version
||
window
.
queryString
.
appVersion
,
uid
:
window
.
queryString
.
uid
,
shopId
:
parseInt
(
$
(
'.shop-id'
).
val
(),
10
)
||
null
,
shopId
:
parseInt
(
$
(
'.shop-id'
).
val
()
||
$
(
'.shopId'
).
val
()
,
10
)
||
null
,
brandId
:
parseInt
(
$
(
'.brand-header'
).
data
(
'id'
),
10
)
||
null
,
couponTemplate
:
require
(
'product/shop/coupon.hbs'
)
},
...
...
public/scss/product/shop/_shop-index.css
View file @
8f1bc10
.shop-index
{
/*
position: absolute;
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
overflow: hidden;*/
#pos-nav,
#pos-list
{
position
:
fixed
;
left
:
0
;
top
:
0
;
overflow
:
hidden
;
&.new-shop
{
position
:
initial
;
overflow
:
initial
;
#pos-nav,
#pos-list
{
position
:
fixed
;
left
:
0
;
top
:
0
;
}
.nav
{
li
{
height
:
100%
;
line-height
:
100%
;
margin-top
:
0px
;
border-left
:
none
;
.text
{
display
:
block
;
width
:
100%
;
border-left
:
1px
solid
#e0e0e0
;
margin-top
:
30px
;
height
:
28px
;
}
&
:first-child
{
.text
{
border-left
:
none
;
}
}
}
}
.shop-foot-wrapper
{
position
:
fixed
;
left
:
0
;
}
}
.nav-main
{
margin-bottom
:
30px
;
}
...
...
@@ -90,25 +120,18 @@
li{
display
:
block
;
height
:
100%
;
line-height
:
100%
;
height
:
28px
;
float
:
left
;
line-height
:
28px
;
width
:
24.7%
;
text-align
:
center
;
border-left
:
1px
solid
#e0e0e0
;
margin-top
:
30px
;
border-sizing
:
border-box
;
color
:
#b0b0b0
;
.text
{
display
:
block
;
width
:
100%
;
border-left
:
1px
solid
#e0e0e0
;
margin-top
:
30px
;
height
:
28px
;
}
&:first-child
{
border-left
:
none
;
.text
{
border-left
:
none
;
}
}
a
{
...
...
@@ -417,9 +440,8 @@
}
.shop-foot-wrapper
{
position
:
fixed
;
position
:
absolute
;
bottom
:
0
;
left
:
0
;
display
:
table
;
width
:
100%
;
height
:
88px
;
...
...
@@ -623,9 +645,9 @@
}
.shop-index
+
.filter-mask
{
margin-top
:
1px
;
.filter-body
{
top
:
1px
;
overflow
:
auto
;
}
...
...
@@ -634,8 +656,17 @@
}
&
.call-by-fix
{
top
:
78px
;
}
}
.new-shop
+
.filter-mask
{
margin-top
:
initial
;
position
:
fixed
;
top
:
46px
;
&.call-by-fix
{
top
:
80px
;
position
:
fixed
;
left
:
0
;
}
}
}
\ No newline at end of file
...
...
public/scss/shop.css
View file @
8f1bc10
...
...
@@ -22,4 +22,7 @@
@import
"product/search/list"
;
@import
"product/sale/sale"
;
@import
"product/shop/shop-index"
;
@import
"product/shop/shop-prodfile"
;
@import
"product/shop/product-category"
;
@import
"product/shop/shop-index-coupon"
;
@import
"home/hot-category"
;
...
...
Please
register
or
login
to post a comment