Authored by htoooth

Merge remote-tracking branch 'origin/release/1.0' into release/1.0

... ... @@ -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);
... ...
<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>
... ...
... ... @@ -74,7 +74,7 @@
a {
position: absolute;
top: 50%;
margin: -30px 0 0;
margin: -35px 0 0;
width: 40px;
height: 70px;
line-height: 70px;
... ...