Authored by 郭成尧

pics

... ... @@ -45,71 +45,7 @@
{{!--shop-tab: 首页--}}
<div id="red-index" class="tab-panel red-shop-index active">
<div class="shop-coupon coupon-group"></div>
{{#each decoratorsData}}
{{#isEqual module_type 'Title'}}
<header class="section-header">
<i class="section-more iconfont">&#xe606;</i>
<h4 class="section-title">{{../text}}</h4>
</header>
{{/isEqual}}
{{#isEqual module_type 'CarouselImage'}}
<div class="shop-swiper shop-swiper-{{../num}}">
<ul class="swiper-wrapper">
{{#each ../pics}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{src}}" alt="">
</a>
</li>
{{/each}}
</ul>
<div class="swiper-pagination"></div>
</div>
{{/isEqual}}
{{#isEqual module_type 'Video'}}
<div class="shop-video shop-section">
<div class="video-player" style="background-image: url({{../pic}})">
<div class="video-poster">
<div class="video-meta-customers">
<i class="iconfont">&#xe602;</i>&nbsp;&nbsp;<span>13145</span>
</div>
</div>
</div>
<div class="video-intro">
<h6 class="video-title">{{../title}}</h6>
<p class="text-line-2">{{../content}}</p>
</div>
</div>
{{/isEqual}}
{{#isEqual module_type 'SingleImage'}}
<div class="items-s1">
<div class="item">
<img class="item-pic" src="{{../pic}}" alt="">
</div>
</div>
{{/isEqual}}
{{#isEqual module_type 'DoubleImage'}}
<div class="items-s2">
{{#each ../pics}}
<div class="item">
<img class="item-pic" src="{{src}}" alt="">
</div>
{{/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}}
{{> reds-shop/modules}}
</div>
{{!--shop-tab: 全部商品--}}
<div id="all-goods" class="tab-panel">
... ...
<div class="item">
<img class="item-pic" src="http://img1.gamersky.com/image2016/12/20161224_zl_91_3/gamersky_02origin_03_201612241718D33.jpg" alt="">
<img class="item-pic" src="{{src}}" alt="">
<div class="item-info">
<div class="">
ABCDEFG ABCDEFG
... ...
{{#each decoratorsData}}
{{#isEqual module_type 'Title'}}
<header class="section-header">
<i class="section-more iconfont">&#xe606;</i>
<h4 class="section-title">{{../text}}</h4>
</header>
{{/isEqual}}
{{#isEqual module_type 'CarouselImage'}}
<div class="shop-swiper shop-swiper-{{../num}}">
<ul class="swiper-wrapper">
{{#each ../pics}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{src}}" alt="">
</a>
</li>
{{/each}}
</ul>
<div class="swiper-pagination"></div>
</div>
{{/isEqual}}
{{#isEqual module_type 'Video'}}
<div class="shop-video shop-section">
<div class="video-player" style="background-image: url({{../pic}})">
<div class="video-poster">
<div class="video-meta-customers">
<i class="iconfont">&#xe602;</i>&nbsp;&nbsp;<span>13145</span>
</div>
</div>
</div>
<div class="video-intro">
<h6 class="video-title">{{../title}}</h6>
<p class="text-line-2">{{../content}}</p>
</div>
</div>
{{/isEqual}}
{{#isEqual module_type 'SingleImage'}}
<div class="items-s1">
{{> reds-shop/item}}
</div>
{{/isEqual}}
{{#isEqual module_type 'DoubleImage'}}
<div class="items-s2">
{{#each ../pics}}
{{> reds-shop/item}}
{{/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}}
{{> reds-shop/item}}
{{/each}}
</div>
{{/isEqual}}
{{#isEqual module_type 'SknList'}}
{{/isEqual}}
{{/each}}
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:02:31
* @Last Modified by: Targaryen
* @Last Modified time: 2017-03-24 11:18:28
* @Last Modified time: 2017-03-24 11:39:15
*/
/* 红人店铺数据处理 */
... ... @@ -107,8 +107,23 @@ const _tools = {
displayType: _.get(moduleData, 'properties.displayType', 1),
};
},
/**
* 商品列表
* @param {*} moduleData
*/
sknList(moduleData) {
return moduleData;
let skns = '';
_.forEach(_.get(moduleData, 'data', []), value => {
skns += value + ',';
});
console.log(skns);
return {
module_type: 'SknList',
skns: skns,
};
}
};
... ...