Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
9 years ago
Commit
b71856c69f68002ad697169e8d8f4447ad195e4a
2 parents
d336ced8
2724485c
Merge remote-tracking branch 'origin/release/1.0' into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
apps/channel/models/index.js
apps/channel/views/partial/ad-banner.hbs
public/scss/channel/_home.css
apps/channel/models/index.js
View file @
b71856c
...
...
@@ -118,6 +118,12 @@ const _getStyleIcon = d => {
};
};
const
_getAdBanner
=
d
=>
{
return
{
adBanner
:
d
};
};
/**
* 获取咨询楼层数据
* @param {Object} d 接口返回的楼层数据
...
...
@@ -161,7 +167,8 @@ const floorMap = {
NEW
:
_getNewArrivals
,
CLASSIC
:
_getClassicBrands
,
STYLE
:
_getStyleIcon
,
EDITORIAL
:
_getEditorial
EDITORIAL
:
_getEditorial
,
adBanner
:
_getAdBanner
};
/**
...
...
@@ -205,6 +212,10 @@ const _processFloorData = d => {
let
floorTitle
;
let
floorData
;
if
(
!
data
.
data
)
{
return
false
;
}
// 处理banner
if
(
_isBannerFloor
(
data
))
{
floorData
=
floorMap
.
slider
(
data
.
data
);
...
...
@@ -222,6 +233,8 @@ const _processFloorData = d => {
if
(
floorMap
[
floorTitle
])
{
floorData
=
floorMap
[
floorTitle
](
data
.
data
.
list
);
}
}
else
if
(
data
.
templateName
===
'single_image'
)
{
floorData
=
floorMap
.
adBanner
(
data
.
data
);
}
floorList
.
push
(
floorData
);
...
...
apps/channel/views/partial/ad-banner.hbs
View file @
b71856c
<div
class=
"ad-banner"
>
{{#
adBanner
}}
<a
href=
"
{{
url
}}
"
>
<img
class=
"lazy-img"
data-original=
"
{{
image
img
1150
160
}}
"
alt=
"
"
>
<img
class=
"lazy-img"
data-original=
"
{{
image
src
1150
160
}}
"
title=
"
{{
title
}}
"
alt=
"
{{
alt
}}
"
>
</a>
{{/
adBanner
}}
</div>
...
...
public/scss/channel/_home.css
View file @
b71856c
...
...
@@ -74,7 +74,7 @@
a
{
position
:
absolute
;
top
:
50%
;
margin
:
-3
0
px
0
0
;
margin
:
-3
5
px
0
0
;
width
:
40px
;
height
:
70px
;
line-height
:
70px
;
...
...
Please
register
or
login
to post a comment