Authored by 郭成尧

TripleImage

... ... @@ -97,6 +97,18 @@
{{/each}}
</div>
{{/isEqual}}
{{#isEqual module_type 'TripleImage'}}
<div class="{{#isEqual ../displayType '1'}}items-3-2 items-3-2-left{{/isEqual}}
{{#isEqual ../displayType '2'}}items-3-2 items-3-2-right{{/isEqual}}
{{#isEqual ../displayType '3'}}items-3-3{{/isEqual}}
{{#isEqual ../displayType '4'}}items-3-3 items-small{{/isEqual}}">
{{#each ../pics}}
<div class="item">
<img class="item-pic" src="{{src}}" alt="">
</div>
{{/each}}
</div>
{{/isEqual}}
{{/each}}
</div>
{{!--shop-tab: 全部商品--}}
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 17:12:53
* @Last Modified by: Targaryen
* @Last Modified time: 2017-03-24 11:07:28
* @Last Modified time: 2017-03-24 11:23:25
*/
// 红人店铺首页
... ... @@ -136,6 +136,7 @@
}
.items-3-2 {
width: 100%;
font-size: 18px;
overflow: hidden;
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:02:31
* @Last Modified by: Targaryen
* @Last Modified time: 2017-03-24 11:08:38
* @Last Modified time: 2017-03-24 11:18:28
*/
/* 红人店铺数据处理 */
... ... @@ -11,6 +11,21 @@ const _ = require('lodash');
let countCarouselImage = 0; // 轮播图模块统计
/**
* 图片处理
* @param {*} moduleData
*/
const _picsHandle = (moduleData) => {
let pics = [];
_.forEach(_.get(moduleData, 'data', []), value => {
pics.push({
src: value.pic
});
});
return pics;
};
/**
* 红人店铺楼层数据处理工具
*/
const _tools = {
... ... @@ -45,18 +60,10 @@ const _tools = {
* @param {*} moduleData
*/
carouselImage(moduleData) {
let pics = [];
_.forEach(_.get(moduleData, 'data', []), value => {
pics.push({
src: value.pic
});
});
return {
module_type: 'CarouselImage',
num: countCarouselImage,
pics: pics
pics: _picsHandle(moduleData)
};
},
... ... @@ -81,22 +88,24 @@ const _tools = {
* @param {*} moduleData
*/
doubleImage(moduleData) {
let pics = [];
_.forEach(_.get(moduleData, 'data', []), value => {
pics.push({
src: value.pic
});
});
return {
module_type: 'DoubleImage',
pics: pics,
pics: _picsHandle(moduleData),
isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false),
};
},
/**
* 三张图片
* @param {*} moduleData
*/
tripleImage(moduleData) {
return moduleData;
return {
module_type: 'TripleImage',
pics: _picsHandle(moduleData),
isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false),
displayType: _.get(moduleData, 'properties.displayType', 1),
};
},
sknList(moduleData) {
return moduleData;
... ...