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
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
1e274bfa2ed8ab33abacbad2377c0d0097faa109
1 parent
393a5801
源流优选 tab li样式
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
9 deletions
apps/guang/controllers/plusstar.js
apps/guang/views/action/plusstar/resources-template.hbs
public/js/guang/plusstar-index.page.js
public/scss/common/_good.css
apps/guang/controllers/plusstar.js
View file @
1e274bf
...
...
@@ -7,17 +7,30 @@
const
mRoot
=
'../models'
;
const
plusstarModel
=
require
(
`
$
{
mRoot
}
/plusstar`
)
;
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
// 头部model
/**
* 潮流优选首页
*/
exports
.
index
=
(
req
,
res
,
next
)
=>
{
let
isApp
=
req
.
query
.
app_version
||
req
.
query
.
appVersion
||
false
;
let
parameter
=
{};
let
title
=
'潮流优选'
;
if
(
isApp
===
false
)
{
parameter
=
{
pageHeader
:
headerModel
.
setNav
({
navTitle
:
title
}),
pageFooter
:
true
};
}
plusstarModel
.
getAllChannels
({}).
then
(
result
=>
{
res
.
render
(
'plusstar/index'
,
{
res
.
render
(
'plusstar/index'
,
Object
.
assign
(
{
page
:
'plusstar-index'
,
result
:
result
,
title
:
'潮流优选'
});
title
:
title
},
parameter
));
}).
catch
(
next
);
};
...
...
apps/guang/views/action/plusstar/resources-template.hbs
View file @
1e274bf
...
...
@@ -51,7 +51,7 @@
</a>
</div>
<div
class=
"goods"
>
<div
class=
"goods
clearfix
"
>
<!--商品--->
{{#
each
result
.
goods
.
data
}}
{{>
common
/
goods
}}
...
...
public/js/guang/plusstar-index.page.js
View file @
1e274bf
...
...
@@ -11,10 +11,18 @@ lazyLoad($('img.lazy'));
plusstar
=
{
init
:
function
()
{
var
that
=
this
,
$liDom
;
var
that
=
this
,
$liDom
,
$tabUlDom
;
$tabUlDom
=
$
(
'.plusstar-page .tab-nav ul'
);
$tabUlDom
.
find
(
'li'
).
css
({
width
:
100
/
$tabUlDom
.
find
(
'li'
).
length
+
'%'
});
// 事情委托机制
$
(
'.plusstar-page .tab-nav ul'
)
.
bind
(
'click'
,
function
(
event
)
{
$
tabUlDom
.
bind
(
'click'
,
function
(
event
)
{
$liDom
=
$
(
event
.
target
).
closest
(
'li'
);
if
(
$liDom
.
hasClass
(
'focus'
))
{
...
...
@@ -38,7 +46,7 @@ plusstar = {
$liDom
=
$
(
'.plusstar-page .tab-nav ul li:eq(0)'
);
break
;
}
$
(
'.plusstar-page .tab-nav ul'
)
.
find
(
'li'
).
removeClass
(
'focus'
);
$
tabUlDom
.
find
(
'li'
).
removeClass
(
'focus'
);
$liDom
.
addClass
(
'focus'
);
that
.
tabNav
(
$liDom
.
data
(
'code'
));
...
...
public/scss/common/_good.css
View file @
1e274bf
...
...
@@ -117,13 +117,16 @@
.good-detail-text
{
.name
a
{
display
:
block
;
margin
:
15px
0
10px
;
min-height
:
50px
;
color
:
#444
;
font-size
:
22px
;
line-height
:
30px
;
padding
:
5px
0
;
/* 商品标题限制行数的bug修复 增加元素的clientHeight */
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
}
.price
{
...
...
Please
register
or
login
to post a comment