sale二期增加奥莱入口,折扣专区小图不展示折扣类别
Showing
4 changed files
with
33 additions
and
9 deletions
@@ -144,7 +144,7 @@ exports.handleSaleBannerData = (origin) => { | @@ -144,7 +144,7 @@ exports.handleSaleBannerData = (origin) => { | ||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /** | 146 | /** |
147 | - * 处理首页 banner 小图 只取前三张 | 147 | + * 处理首页 banner 小图 threePicture楼层和small_pic楼层都去一遍,产品确认只会有一个接口有数据 |
148 | * @param origin 要处理的原始数据 | 148 | * @param origin 要处理的原始数据 |
149 | * @returns {Array} | 149 | * @returns {Array} |
150 | */ | 150 | */ |
@@ -153,9 +153,11 @@ exports.handleSaleBannerSmallData = (origin) => { | @@ -153,9 +153,11 @@ exports.handleSaleBannerSmallData = (origin) => { | ||
153 | let count = 0; | 153 | let count = 0; |
154 | 154 | ||
155 | _.forEach(origin, function(value) { | 155 | _.forEach(origin, function(value) { |
156 | + | ||
156 | if (value.template_name === 'threePicture') { | 157 | if (value.template_name === 'threePicture') { |
157 | _.forEach(value.data, function(picList) { | 158 | _.forEach(value.data, function(picList) { |
158 | if (count++ < 3) { | 159 | if (count++ < 3) { |
160 | + console.log(count); | ||
159 | let smallPic = { | 161 | let smallPic = { |
160 | link: picList.url, | 162 | link: picList.url, |
161 | icon: picList.src, | 163 | icon: picList.src, |
@@ -167,6 +169,23 @@ exports.handleSaleBannerSmallData = (origin) => { | @@ -167,6 +169,23 @@ exports.handleSaleBannerSmallData = (origin) => { | ||
167 | } | 169 | } |
168 | }); | 170 | }); |
169 | } | 171 | } |
172 | + if (count === 0) { | ||
173 | + if (value.template_name === 'small_pic') { | ||
174 | + _.forEach(value.data, function(picList) { | ||
175 | + if (count++ < 4) { | ||
176 | + let smallPic = { | ||
177 | + link: picList.url, | ||
178 | + icon: picList.src, | ||
179 | + title: picList.title, | ||
180 | + desc: picList.alt | ||
181 | + }; | ||
182 | + | ||
183 | + dest.push(smallPic); | ||
184 | + } | ||
185 | + }); | ||
186 | + } | ||
187 | + } | ||
188 | + | ||
170 | }); | 189 | }); |
171 | 190 | ||
172 | return dest; | 191 | return dest; |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <a class="item pull-left" href="{{link}}" target= "_blank"> | 32 | <a class="item pull-left" href="{{link}}" target= "_blank"> |
33 | <img class="pic" src="{{image img 350 350}}"> | 33 | <img class="pic" src="{{image img 350 350}}"> |
34 | <div class="detail"> | 34 | <div class="detail"> |
35 | - <div class="title">{{title}}{{discount}}{{discountText}}</div> | 35 | + <div class="title">{{title}}</div> |
36 | <div class="time">{{time}}</div> | 36 | <div class="time">{{time}}</div> |
37 | </div> | 37 | </div> |
38 | </a> | 38 | </a> |
@@ -389,3 +389,13 @@ $('.senior-sub').on('click', '.multi-select', function() { | @@ -389,3 +389,13 @@ $('.senior-sub').on('click', '.multi-select', function() { | ||
389 | }).on('mouseleave', function() { | 389 | }).on('mouseleave', function() { |
390 | hideSeniorPanel(); | 390 | hideSeniorPanel(); |
391 | }); | 391 | }); |
392 | + | ||
393 | +// 资源位三张四张样式调整 | ||
394 | +(function rejustActivityEntryDisplay() { | ||
395 | + var activityEntryNumb = $('.activity-entry').find('a').length, | ||
396 | + activityItemWidth = (1150 - (activityEntryNumb - 1) * 10) / activityEntryNumb; | ||
397 | + | ||
398 | + $('.activity-entry .entry-item').css('width', activityItemWidth); | ||
399 | + | ||
400 | +}()); | ||
401 | + |
@@ -85,18 +85,13 @@ | @@ -85,18 +85,13 @@ | ||
85 | 85 | ||
86 | .activity-entry { | 86 | .activity-entry { |
87 | margin: 10px 0; | 87 | margin: 10px 0; |
88 | - width: 1170px; | 88 | + width: 1150px; |
89 | 89 | ||
90 | .entry-item { | 90 | .entry-item { |
91 | display: block; | 91 | display: block; |
92 | - width: 376px; | ||
93 | margin-right: 10px; | 92 | margin-right: 10px; |
94 | background: #f5f5f5; | 93 | background: #f5f5f5; |
95 | - | ||
96 | - &.first, | ||
97 | - &.last { | ||
98 | - width: 376px; | ||
99 | - } | 94 | + height: 88px; |
100 | 95 | ||
101 | &.last { | 96 | &.last { |
102 | margin-right: 0; | 97 | margin-right: 0; |
-
Please register or login to post a comment