Authored by 郭成尧

style-adjust

{{#if src}}
<div class="item">
<img class="item-pic" src="{{src}}" alt="">
<div class="item-info">
<div class="">
ABCDEFG ABCDEFG
</div>
<div class="">ABCDEFG ABCDEFG</div>
<div>
<span class="new-price">¥ 199.00</span>
<span class="price">¥ 299.00</span>
<span class="new-price">¥199.00</span>
<span class="price">¥299.00</span>
</div>
</div>
</div>
{{/if}}
... ...
{{#if ../isModuleMargin}}
<div class="margin-bottom"></div>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@
<div class="section-title">{{../text}}</div>
<a class="section-more" href=""><i class="iconfont">&#xe606;</i></a>
</header>
{{> reds-shop/margin-bottom}}
{{/isEqual}}
{{#isEqual module_type 'CarouselImage'}}
<div class="shop-swiper shop-swiper-{{../num}}">
... ... @@ -18,6 +19,7 @@
</ul>
<div class="swiper-pagination"></div>
</div>
{{> reds-shop/margin-bottom}}
{{/isEqual}}
{{#isEqual module_type 'Video'}}
<div class="shop-video shop-section">
... ... @@ -33,27 +35,33 @@
<p class="text-line-2">{{../content}}</p>
</div>
</div>
{{> reds-shop/margin-bottom}}
{{/isEqual}}
{{#isEqual module_type 'SingleImage'}}
<div class="items-s1">
{{> reds-shop/item}}
</div>
{{> reds-shop/margin-bottom}}
{{/isEqual}}
{{#isEqual module_type 'DoubleImage'}}
<div class="items-s2">
{{#each ../pics}}
{{> reds-shop/item}}
{{/each}}
</div>
<div class="items-s2">
{{#each ../pics}}
{{> reds-shop/item}}
{{/each}}
</div>
{{> reds-shop/margin-bottom}}
{{/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}}">
{{log ../displayType}}
<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>
{{> reds-shop/margin-bottom}}
{{/isEqual}}
{{#isEqual module_type 'SknList'}}
<div class="index-goods-container" data-skns="{{../skns}}"></div>
{{> reds-shop/margin-bottom}}
{{/isEqual}}
{{/each}}
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:31:51
* @Last Modified by: Targaryen
* @Last Modified time: 2017-03-28 09:46:21
* @Last Modified time: 2017-03-28 10:12:24
*/
/* 红人店铺首页 */
const Swiper2 = require('yoho-swiper2');
... ... @@ -49,11 +49,12 @@ $.each($goodsContainer, function(index, elem) {
/**
* 店铺轮播图
*/
if ($('.shop-swiper').length > 0) {
if ($('.shop-swiper')) {
let num = $('.shop-swiper').length;
for (let i = 1; i <= num; i++) {
new Swiper2('.shop-swiper-' + i, {
lazyLoading: true,
lazyLoadingInPrevNext: true,
loop: true,
autoplay: 3000,
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 17:12:53
* @Last Modified by: Targaryen
* @Last Modified time: 2017-03-24 18:09:08
* @Last Modified time: 2017-03-28 10:38:11
*/
// 红人店铺首页
... ... @@ -73,9 +73,6 @@
.item-info {
height: 70px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: rgba(0, 0, 0, 0.5);
}
}
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:02:31
* @Last Modified by: Targaryen
* @Last Modified time: 2017-03-28 09:45:12
* @Last Modified time: 2017-03-28 10:28:49
*/
/* 红人店铺数据处理 */
... ... @@ -63,7 +63,8 @@ const _tools = {
return {
module_type: 'CarouselImage',
num: countCarouselImage,
pics: _picsHandle(moduleData)
pics: _picsHandle(moduleData),
isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false),
};
},
... ... @@ -100,11 +101,13 @@ const _tools = {
* @param {*} moduleData
*/
tripleImage(moduleData) {
let displayType = _.get(moduleData, 'properties.displayType', 1);
return {
module_type: 'TripleImage',
pics: _picsHandle(moduleData),
isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false),
displayType: _.get(moduleData, 'properties.displayType', 1),
displayType: parseInt(displayType, 10),
};
},
... ...