...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2017-03-23 11:02:31
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2017-03-28 17:57:48
|
|
|
* @Last Modified time: 2017-03-30 11:29:07
|
|
|
*/
|
|
|
/* 红人店铺数据处理 */
|
|
|
|
...
|
...
|
@@ -43,10 +43,19 @@ const _picsHandle = (moduleData) => { |
|
|
let pics = [];
|
|
|
|
|
|
_.forEach(_.get(moduleData, 'data', []), value => {
|
|
|
let showProductInfo = false;
|
|
|
|
|
|
if (_.has(value, 'text') && value.text) {
|
|
|
if (_.has(value, 'showProductInfo')) {
|
|
|
showProductInfo = value.showProductInfo;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
pics.push({
|
|
|
src: value.pic,
|
|
|
link: _linkhandle(value),
|
|
|
text: value.text
|
|
|
text: value.text,
|
|
|
showProductInfo: showProductInfo
|
|
|
});
|
|
|
});
|
|
|
return pics;
|
...
|
...
|
@@ -89,7 +98,6 @@ const _tools = { |
|
|
* @param {*} moduleData
|
|
|
*/
|
|
|
carouselImage(moduleData) {
|
|
|
console.log(moduleData);
|
|
|
return {
|
|
|
module_type: 'CarouselImage',
|
|
|
num: countCarouselImage,
|
...
|
...
|
@@ -144,6 +152,18 @@ const _tools = { |
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 四张图片
|
|
|
* @param {*} moduleData
|
|
|
*/
|
|
|
fourImage(moduleData) {
|
|
|
return {
|
|
|
module_type: 'FourImage',
|
|
|
pics: _picsHandle(moduleData),
|
|
|
isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', 0)
|
|
|
};
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 商品列表
|
|
|
* @param {*} moduleData
|
|
|
*/
|
...
|
...
|
@@ -196,6 +216,9 @@ const floor = (decoratorsData) => { |
|
|
case 'TripleImage':
|
|
|
finalData.push(_tools.tripleImage(value.module_data));
|
|
|
break;
|
|
|
case 'FourImage':
|
|
|
finalData.push(_tools.fourImage(value.module_data));
|
|
|
break;
|
|
|
case 'SknList':
|
|
|
finalData.push(_tools.sknList(value.module_data));
|
|
|
break;
|
...
|
...
|
|