Showing
4 changed files
with
62 additions
and
10 deletions
@@ -6,11 +6,10 @@ | @@ -6,11 +6,10 @@ | ||
6 | {{^}} | 6 | {{^}} |
7 | <img class="item-pic" src="{{src}}" alt=""> | 7 | <img class="item-pic" src="{{src}}" alt=""> |
8 | {{/if}} | 8 | {{/if}} |
9 | + | ||
10 | + {{#if showProductInfo}} | ||
9 | <div class="item-info"> | 11 | <div class="item-info"> |
10 | - <div class="">ABCDEFG ABCDEFG</div> | ||
11 | - <div> | ||
12 | - <span class="new-price">¥199.00</span> | ||
13 | - <span class="price">¥299.00</span> | ||
14 | - </div> | 12 | + <div>{{text}}</div> |
15 | </div> | 13 | </div> |
14 | + {{/if}} | ||
16 | </div> | 15 | </div> |
@@ -78,6 +78,16 @@ | @@ -78,6 +78,16 @@ | ||
78 | <div class="margin-bottom"></div> | 78 | <div class="margin-bottom"></div> |
79 | {{/if}} | 79 | {{/if}} |
80 | {{/isEqual}} | 80 | {{/isEqual}} |
81 | + {{#isEqual module_type 'FourImage'}} | ||
82 | + <div class="items-s4"> | ||
83 | + {{#each ../pics}} | ||
84 | + {{> reds-shop/item}} | ||
85 | + {{/each}} | ||
86 | + </div> | ||
87 | + {{#if ../isModuleMargin}} | ||
88 | + <div class="margin-bottom"></div> | ||
89 | + {{/if}} | ||
90 | + {{/isEqual}} | ||
81 | {{#isEqual module_type 'SknList'}} | 91 | {{#isEqual module_type 'SknList'}} |
82 | <div class="index-goods-container" data-skns="{{../skns}}"></div> | 92 | <div class="index-goods-container" data-skns="{{../skns}}"></div> |
83 | {{#if ../isModuleMargin}} | 93 | {{#if ../isModuleMargin}} |
@@ -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-28 17:08:45 | 5 | + * @Last Modified time: 2017-03-30 11:22:56 |
6 | */ | 6 | */ |
7 | // 红人店铺首页 | 7 | // 红人店铺首页 |
8 | 8 | ||
@@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
67 | 67 | ||
68 | .item { | 68 | .item { |
69 | width: 50%; | 69 | width: 50%; |
70 | - height: 234px; | 70 | + height: 375px; |
71 | float: left; | 71 | float: left; |
72 | } | 72 | } |
73 | 73 | ||
@@ -126,6 +126,24 @@ | @@ -126,6 +126,24 @@ | ||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | + .items-s4 { | ||
130 | + .item { | ||
131 | + float: left; | ||
132 | + width: 25%; | ||
133 | + height: 227.5px; | ||
134 | + } | ||
135 | + | ||
136 | + .item > a > img { | ||
137 | + height: 187.5px; | ||
138 | + } | ||
139 | + | ||
140 | + .item-info { | ||
141 | + text-align: center; | ||
142 | + color: #000; | ||
143 | + position: relative; | ||
144 | + } | ||
145 | + } | ||
146 | + | ||
129 | .items-small { | 147 | .items-small { |
130 | .item { | 148 | .item { |
131 | height: 250px; | 149 | height: 250px; |
@@ -169,7 +187,9 @@ | @@ -169,7 +187,9 @@ | ||
169 | 187 | ||
170 | .shop-swiper { | 188 | .shop-swiper { |
171 | position: relative; | 189 | position: relative; |
190 | + width: 750px; | ||
172 | height: 234px; | 191 | height: 234px; |
192 | + overflow: hidden; | ||
173 | 193 | ||
174 | ul { | 194 | ul { |
175 | width: 100%; | 195 | width: 100%; |
@@ -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 17:57:48 | 5 | + * @Last Modified time: 2017-03-30 11:29:07 |
6 | */ | 6 | */ |
7 | /* 红人店铺数据处理 */ | 7 | /* 红人店铺数据处理 */ |
8 | 8 | ||
@@ -43,10 +43,19 @@ const _picsHandle = (moduleData) => { | @@ -43,10 +43,19 @@ const _picsHandle = (moduleData) => { | ||
43 | let pics = []; | 43 | let pics = []; |
44 | 44 | ||
45 | _.forEach(_.get(moduleData, 'data', []), value => { | 45 | _.forEach(_.get(moduleData, 'data', []), value => { |
46 | + let showProductInfo = false; | ||
47 | + | ||
48 | + if (_.has(value, 'text') && value.text) { | ||
49 | + if (_.has(value, 'showProductInfo')) { | ||
50 | + showProductInfo = value.showProductInfo; | ||
51 | + } | ||
52 | + } | ||
53 | + | ||
46 | pics.push({ | 54 | pics.push({ |
47 | src: value.pic, | 55 | src: value.pic, |
48 | link: _linkhandle(value), | 56 | link: _linkhandle(value), |
49 | - text: value.text | 57 | + text: value.text, |
58 | + showProductInfo: showProductInfo | ||
50 | }); | 59 | }); |
51 | }); | 60 | }); |
52 | return pics; | 61 | return pics; |
@@ -89,7 +98,6 @@ const _tools = { | @@ -89,7 +98,6 @@ const _tools = { | ||
89 | * @param {*} moduleData | 98 | * @param {*} moduleData |
90 | */ | 99 | */ |
91 | carouselImage(moduleData) { | 100 | carouselImage(moduleData) { |
92 | - console.log(moduleData); | ||
93 | return { | 101 | return { |
94 | module_type: 'CarouselImage', | 102 | module_type: 'CarouselImage', |
95 | num: countCarouselImage, | 103 | num: countCarouselImage, |
@@ -144,6 +152,18 @@ const _tools = { | @@ -144,6 +152,18 @@ const _tools = { | ||
144 | }, | 152 | }, |
145 | 153 | ||
146 | /** | 154 | /** |
155 | + * 四张图片 | ||
156 | + * @param {*} moduleData | ||
157 | + */ | ||
158 | + fourImage(moduleData) { | ||
159 | + return { | ||
160 | + module_type: 'FourImage', | ||
161 | + pics: _picsHandle(moduleData), | ||
162 | + isModuleMargin: _.get(moduleData, 'properties.isModuleMargin', 0) | ||
163 | + }; | ||
164 | + }, | ||
165 | + | ||
166 | + /** | ||
147 | * 商品列表 | 167 | * 商品列表 |
148 | * @param {*} moduleData | 168 | * @param {*} moduleData |
149 | */ | 169 | */ |
@@ -196,6 +216,9 @@ const floor = (decoratorsData) => { | @@ -196,6 +216,9 @@ const floor = (decoratorsData) => { | ||
196 | case 'TripleImage': | 216 | case 'TripleImage': |
197 | finalData.push(_tools.tripleImage(value.module_data)); | 217 | finalData.push(_tools.tripleImage(value.module_data)); |
198 | break; | 218 | break; |
219 | + case 'FourImage': | ||
220 | + finalData.push(_tools.fourImage(value.module_data)); | ||
221 | + break; | ||
199 | case 'SknList': | 222 | case 'SknList': |
200 | finalData.push(_tools.sknList(value.module_data)); | 223 | finalData.push(_tools.sknList(value.module_data)); |
201 | break; | 224 | break; |
-
Please register or login to post a comment