Showing
6 changed files
with
32 additions
and
20 deletions
1 | +{{#if src}} | ||
1 | <div class="item"> | 2 | <div class="item"> |
2 | <img class="item-pic" src="{{src}}" alt=""> | 3 | <img class="item-pic" src="{{src}}" alt=""> |
3 | <div class="item-info"> | 4 | <div class="item-info"> |
4 | - <div class=""> | ||
5 | - ABCDEFG ABCDEFG | ||
6 | - </div> | 5 | + <div class="">ABCDEFG ABCDEFG</div> |
7 | <div> | 6 | <div> |
8 | - <span class="new-price">¥ 199.00</span> | ||
9 | - <span class="price">¥ 299.00</span> | 7 | + <span class="new-price">¥199.00</span> |
8 | + <span class="price">¥299.00</span> | ||
10 | </div> | 9 | </div> |
11 | </div> | 10 | </div> |
12 | </div> | 11 | </div> |
12 | +{{/if}} |
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | <div class="section-title">{{../text}}</div> | 4 | <div class="section-title">{{../text}}</div> |
5 | <a class="section-more" href=""><i class="iconfont"></i></a> | 5 | <a class="section-more" href=""><i class="iconfont"></i></a> |
6 | </header> | 6 | </header> |
7 | + {{> reds-shop/margin-bottom}} | ||
7 | {{/isEqual}} | 8 | {{/isEqual}} |
8 | {{#isEqual module_type 'CarouselImage'}} | 9 | {{#isEqual module_type 'CarouselImage'}} |
9 | <div class="shop-swiper shop-swiper-{{../num}}"> | 10 | <div class="shop-swiper shop-swiper-{{../num}}"> |
@@ -18,6 +19,7 @@ | @@ -18,6 +19,7 @@ | ||
18 | </ul> | 19 | </ul> |
19 | <div class="swiper-pagination"></div> | 20 | <div class="swiper-pagination"></div> |
20 | </div> | 21 | </div> |
22 | + {{> reds-shop/margin-bottom}} | ||
21 | {{/isEqual}} | 23 | {{/isEqual}} |
22 | {{#isEqual module_type 'Video'}} | 24 | {{#isEqual module_type 'Video'}} |
23 | <div class="shop-video shop-section"> | 25 | <div class="shop-video shop-section"> |
@@ -33,27 +35,33 @@ | @@ -33,27 +35,33 @@ | ||
33 | <p class="text-line-2">{{../content}}</p> | 35 | <p class="text-line-2">{{../content}}</p> |
34 | </div> | 36 | </div> |
35 | </div> | 37 | </div> |
38 | + {{> reds-shop/margin-bottom}} | ||
36 | {{/isEqual}} | 39 | {{/isEqual}} |
37 | {{#isEqual module_type 'SingleImage'}} | 40 | {{#isEqual module_type 'SingleImage'}} |
38 | <div class="items-s1"> | 41 | <div class="items-s1"> |
39 | {{> reds-shop/item}} | 42 | {{> reds-shop/item}} |
40 | </div> | 43 | </div> |
44 | + {{> reds-shop/margin-bottom}} | ||
41 | {{/isEqual}} | 45 | {{/isEqual}} |
42 | {{#isEqual module_type 'DoubleImage'}} | 46 | {{#isEqual module_type 'DoubleImage'}} |
43 | - <div class="items-s2"> | ||
44 | - {{#each ../pics}} | ||
45 | - {{> reds-shop/item}} | ||
46 | - {{/each}} | ||
47 | - </div> | 47 | + <div class="items-s2"> |
48 | + {{#each ../pics}} | ||
49 | + {{> reds-shop/item}} | ||
50 | + {{/each}} | ||
51 | + </div> | ||
52 | + {{> reds-shop/margin-bottom}} | ||
48 | {{/isEqual}} | 53 | {{/isEqual}} |
49 | {{#isEqual module_type 'TripleImage'}} | 54 | {{#isEqual module_type 'TripleImage'}} |
50 | - <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}}"> | 55 | + {{log ../displayType}} |
56 | + <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}}"> | ||
51 | {{#each ../pics}} | 57 | {{#each ../pics}} |
52 | {{> reds-shop/item}} | 58 | {{> reds-shop/item}} |
53 | {{/each}} | 59 | {{/each}} |
54 | </div> | 60 | </div> |
61 | + {{> reds-shop/margin-bottom}} | ||
55 | {{/isEqual}} | 62 | {{/isEqual}} |
56 | {{#isEqual module_type 'SknList'}} | 63 | {{#isEqual module_type 'SknList'}} |
57 | <div class="index-goods-container" data-skns="{{../skns}}"></div> | 64 | <div class="index-goods-container" data-skns="{{../skns}}"></div> |
65 | + {{> reds-shop/margin-bottom}} | ||
58 | {{/isEqual}} | 66 | {{/isEqual}} |
59 | {{/each}} | 67 | {{/each}} |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | * @Author: Targaryen | 2 | * @Author: Targaryen |
3 | * @Date: 2017-03-23 11:31:51 | 3 | * @Date: 2017-03-23 11:31:51 |
4 | * @Last Modified by: Targaryen | 4 | * @Last Modified by: Targaryen |
5 | - * @Last Modified time: 2017-03-28 09:46:21 | 5 | + * @Last Modified time: 2017-03-28 10:12:24 |
6 | */ | 6 | */ |
7 | /* 红人店铺首页 */ | 7 | /* 红人店铺首页 */ |
8 | const Swiper2 = require('yoho-swiper2'); | 8 | const Swiper2 = require('yoho-swiper2'); |
@@ -49,11 +49,12 @@ $.each($goodsContainer, function(index, elem) { | @@ -49,11 +49,12 @@ $.each($goodsContainer, function(index, elem) { | ||
49 | /** | 49 | /** |
50 | * 店铺轮播图 | 50 | * 店铺轮播图 |
51 | */ | 51 | */ |
52 | -if ($('.shop-swiper').length > 0) { | 52 | +if ($('.shop-swiper')) { |
53 | let num = $('.shop-swiper').length; | 53 | let num = $('.shop-swiper').length; |
54 | 54 | ||
55 | for (let i = 1; i <= num; i++) { | 55 | for (let i = 1; i <= num; i++) { |
56 | new Swiper2('.shop-swiper-' + i, { | 56 | new Swiper2('.shop-swiper-' + i, { |
57 | + lazyLoading: true, | ||
57 | lazyLoadingInPrevNext: true, | 58 | lazyLoadingInPrevNext: true, |
58 | loop: true, | 59 | loop: true, |
59 | autoplay: 3000, | 60 | autoplay: 3000, |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | * @Author: Targaryen | 2 | * @Author: Targaryen |
3 | * @Date: 2017-03-23 17:12:53 | 3 | * @Date: 2017-03-23 17:12:53 |
4 | * @Last Modified by: Targaryen | 4 | * @Last Modified by: Targaryen |
5 | - * @Last Modified time: 2017-03-24 18:09:08 | 5 | + * @Last Modified time: 2017-03-28 10:38:11 |
6 | */ | 6 | */ |
7 | // 红人店铺首页 | 7 | // 红人店铺首页 |
8 | 8 | ||
@@ -73,9 +73,6 @@ | @@ -73,9 +73,6 @@ | ||
73 | 73 | ||
74 | .item-info { | 74 | .item-info { |
75 | height: 70px; | 75 | height: 70px; |
76 | - display: flex; | ||
77 | - justify-content: space-between; | ||
78 | - align-items: center; | ||
79 | background-color: rgba(0, 0, 0, 0.5); | 76 | background-color: rgba(0, 0, 0, 0.5); |
80 | } | 77 | } |
81 | } | 78 | } |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | * @Author: Targaryen | 2 | * @Author: Targaryen |
3 | * @Date: 2017-03-23 11:02:31 | 3 | * @Date: 2017-03-23 11:02:31 |
4 | * @Last Modified by: Targaryen | 4 | * @Last Modified by: Targaryen |
5 | - * @Last Modified time: 2017-03-28 09:45:12 | 5 | + * @Last Modified time: 2017-03-28 10:28:49 |
6 | */ | 6 | */ |
7 | /* 红人店铺数据处理 */ | 7 | /* 红人店铺数据处理 */ |
8 | 8 | ||
@@ -63,7 +63,8 @@ const _tools = { | @@ -63,7 +63,8 @@ const _tools = { | ||
63 | return { | 63 | return { |
64 | module_type: 'CarouselImage', | 64 | module_type: 'CarouselImage', |
65 | num: countCarouselImage, | 65 | num: countCarouselImage, |
66 | - pics: _picsHandle(moduleData) | 66 | + pics: _picsHandle(moduleData), |
67 | + isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false), | ||
67 | }; | 68 | }; |
68 | }, | 69 | }, |
69 | 70 | ||
@@ -100,11 +101,13 @@ const _tools = { | @@ -100,11 +101,13 @@ const _tools = { | ||
100 | * @param {*} moduleData | 101 | * @param {*} moduleData |
101 | */ | 102 | */ |
102 | tripleImage(moduleData) { | 103 | tripleImage(moduleData) { |
104 | + let displayType = _.get(moduleData, 'properties.displayType', 1); | ||
105 | + | ||
103 | return { | 106 | return { |
104 | module_type: 'TripleImage', | 107 | module_type: 'TripleImage', |
105 | pics: _picsHandle(moduleData), | 108 | pics: _picsHandle(moduleData), |
106 | isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false), | 109 | isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', false), |
107 | - displayType: _.get(moduleData, 'properties.displayType', 1), | 110 | + displayType: parseInt(displayType, 10), |
108 | }; | 111 | }; |
109 | }, | 112 | }, |
110 | 113 |
-
Please register or login to post a comment