Showing
5 changed files
with
66 additions
and
49 deletions
@@ -69,7 +69,11 @@ const index = (req) => { | @@ -69,7 +69,11 @@ const index = (req) => { | ||
69 | ctyList: [] | 69 | ctyList: [] |
70 | }, | 70 | }, |
71 | firstLook: { | 71 | firstLook: { |
72 | - name: '精彩抢先看' | 72 | + name: '精彩抢先看', |
73 | + lookBanner: { | ||
74 | + list: [] | ||
75 | + }, | ||
76 | + lookTwoImg: [] | ||
73 | } | 77 | } |
74 | }; | 78 | }; |
75 | 79 | ||
@@ -95,9 +99,14 @@ const index = (req) => { | @@ -95,9 +99,14 @@ const index = (req) => { | ||
95 | Object.assign(respData.recommond.dataList, dataList); | 99 | Object.assign(respData.recommond.dataList, dataList); |
96 | 100 | ||
97 | _.forEach(result[1].data.ads, ads => { | 101 | _.forEach(result[1].data.ads, ads => { |
102 | + //banner | ||
98 | if (ads.template_name === 'focus') { | 103 | if (ads.template_name === 'focus') { |
99 | Object.assign(respData.slide.list, ads.data); | 104 | Object.assign(respData.slide.list, ads.data); |
100 | } | 105 | } |
106 | + //精彩想先看,左轮播右2图 | ||
107 | + if (ads.template_name === 'NL2R') { | ||
108 | + Object.assign(respData.firstLook.lookTwoImg, ads.data.right); | ||
109 | + } | ||
101 | }); | 110 | }); |
102 | } | 111 | } |
103 | 112 | ||
@@ -139,16 +148,6 @@ const index = (req) => { | @@ -139,16 +148,6 @@ const index = (req) => { | ||
139 | // 列表数据 | 148 | // 列表数据 |
140 | Object.assign(respData.newProduct, _proListHandler(result[3].data, Object.assign({}, params, {channel: channel}) )); | 149 | Object.assign(respData.newProduct, _proListHandler(result[3].data, Object.assign({}, params, {channel: channel}) )); |
141 | } | 150 | } |
142 | - | ||
143 | - respData.firstLook = { | ||
144 | - name: '精彩抢先看', | ||
145 | - leftUrl: '', | ||
146 | - leftSrc: '//img13.static.yhbimg.com/goodsimg/2016/11/08/16/0209f4293037c2c5ca85bf67991b691c9a.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90', | ||
147 | - rtUrl: '', | ||
148 | - rtSrc: '//img13.static.yhbimg.com/goodsimg/2016/11/08/16/0209f4293037c2c5ca85bf67991b691c9a.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90', | ||
149 | - rbUrl: '', | ||
150 | - rbSrc: '//img13.static.yhbimg.com/goodsimg/2016/11/08/16/0209f4293037c2c5ca85bf67991b691c9a.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90' | ||
151 | - }; | ||
152 | return respData; | 151 | return respData; |
153 | }); | 152 | }); |
154 | }; | 153 | }; |
@@ -52,38 +52,39 @@ | @@ -52,38 +52,39 @@ | ||
52 | </div> | 52 | </div> |
53 | {{/newBrand}} | 53 | {{/newBrand}} |
54 | {{#firstLook}} | 54 | {{#firstLook}} |
55 | - <!--<div class="firstLook-floor clearfix">--> | ||
56 | - <!--{{> common/floor-header}}--> | ||
57 | - <!--<div class="left-one">--> | ||
58 | - <!--<a class="first-left-img" href="{{leftUrl}}" target="_blank">--> | ||
59 | - <!--<img class="lazy" data-original="{{image leftSrc 785 420}}" style="display: block; opacity: 1;">--> | ||
60 | - <!--</a>--> | ||
61 | - <!--</div>--> | ||
62 | - <!--<div class="right-two">--> | ||
63 | - <!--<a class="first-right-img" href="{{rtUrl}}" target="_blank">--> | ||
64 | - <!--<img class="lazy" data-original="{{image rtSrc 355 205}}" style="display: block; opacity: 1;">--> | ||
65 | - <!--</a>--> | ||
66 | - <!--<a class="first-right-img" href="{{rbUrl}}" target="_blank">--> | ||
67 | - <!--<img class="lazy" data-original="{{image rbSrc 355 205}}" style="display: block; opacity: 1;">--> | ||
68 | - <!--</a>--> | ||
69 | - <!--</div>--> | ||
70 | - <!--</div>--> | ||
71 | - <div class="slider-wrap clearfix"> | ||
72 | - <div class="slider-left pull-left"> | 55 | + <div class="firstLook-floor clearfix"> |
56 | + {{> common/floor-header}} | ||
57 | + {{#lookBanner}} | ||
58 | + <div class="left-one"> | ||
73 | <div class="slide-wrapper"> | 59 | <div class="slide-wrapper"> |
74 | <ul> | 60 | <ul> |
75 | - {{#largeSlideImg}} | ||
76 | - <li> | ||
77 | - <a href="{{url}}"><img src="{{img}}"></a> | 61 | + {{# list}} |
62 | + <li style="{{#if bgColor}}background:{{bgColor}}{{/if}}"> | ||
63 | + <a href="{{url}}" target= "_blank"> | ||
64 | + {{#if @first}} | ||
65 | + <img src="{{image src 785 420}}"> | ||
66 | + {{^}} | ||
67 | + <img class="lazy" data-original="{{image src 785 420}}" alt=""> | ||
68 | + {{/if}} | ||
69 | + </a> | ||
70 | + {{# tips}} | ||
71 | + <div class="slide-tips"> | ||
72 | + <div class="g-mark"></div> | ||
73 | + <p>{{.}}</p> | ||
74 | + </div> | ||
75 | + {{/ tips}} | ||
78 | </li> | 76 | </li> |
79 | - {{/largeSlideImg}} | 77 | + {{/ list}} |
80 | </ul> | 78 | </ul> |
81 | </div> | 79 | </div> |
82 | </div> | 80 | </div> |
83 | - <div class="slider-right pull-right"> | ||
84 | - {{#oneRowTwoColImages}} | ||
85 | - <a href="{{url}}" class="slider-item"><img src="{{img}}"></a> | ||
86 | - {{/oneRowTwoColImages}} | 81 | + {{/lookBanner}} |
82 | + <div class="right-two"> | ||
83 | + {{#lookTwoImg}} | ||
84 | + <a class="first-right-img" href="{{url}}" target="_blank"> | ||
85 | + <img class="lazy" data-original="{{image src 355 205}}" style="display: block; opacity: 1;"> | ||
86 | + </a> | ||
87 | + {{/lookTwoImg}} | ||
87 | </div> | 88 | </div> |
88 | </div> | 89 | </div> |
89 | {{/firstLook}} | 90 | {{/firstLook}} |
@@ -18,8 +18,8 @@ module.exports = { | @@ -18,8 +18,8 @@ module.exports = { | ||
18 | domains: { | 18 | domains: { |
19 | favApi: 'http://192.168.102.31:8092/brower', | 19 | favApi: 'http://192.168.102.31:8092/brower', |
20 | 20 | ||
21 | - api: 'http://api-test2.yohops.com:9999/', | ||
22 | - service: 'http://service-test2.yohops.com:9999/', | 21 | + api: 'http://api-test3.yohops.com:9999/', |
22 | + service: 'http://service-test3.yohops.com:9999/', | ||
23 | 23 | ||
24 | // api: 'http://api.yoho.cn/', | 24 | // api: 'http://api.yoho.cn/', |
25 | // service: 'http://service.yoho.cn/', | 25 | // service: 'http://service.yoho.cn/', |
@@ -10,7 +10,7 @@ require('../plugins/slider'); | @@ -10,7 +10,7 @@ require('../plugins/slider'); | ||
10 | require('yoho-jquery-pjax'); | 10 | require('yoho-jquery-pjax'); |
11 | 11 | ||
12 | $('.slide-container').slider(); | 12 | $('.slide-container').slider(); |
13 | - | 13 | +$('.left-one').slider(); |
14 | var recSwiper = new Swiper('.rec-swiper', { | 14 | var recSwiper = new Swiper('.rec-swiper', { |
15 | pagination: '.swiper-pagination', | 15 | pagination: '.swiper-pagination', |
16 | paginationClickable: true, | 16 | paginationClickable: true, |
@@ -74,17 +74,25 @@ | @@ -74,17 +74,25 @@ | ||
74 | .firstLook-floor { | 74 | .firstLook-floor { |
75 | .left-one { | 75 | .left-one { |
76 | width: 785px; | 76 | width: 785px; |
77 | + height: 420px; | ||
78 | + position: relative; | ||
77 | margin-right: 10px; | 79 | margin-right: 10px; |
78 | float: left; | 80 | float: left; |
79 | 81 | ||
80 | - .first-left-img { | 82 | + .slide-wrapper { |
81 | height: 420px; | 83 | height: 420px; |
82 | - display: block; | 84 | + } |
83 | 85 | ||
84 | - > img { | ||
85 | - width: 100%; | ||
86 | - height: 100%; | ||
87 | - } | 86 | + .slide-wrapper li a { |
87 | + width: 100%; | ||
88 | + } | ||
89 | + | ||
90 | + .slide-switch a.prev { | ||
91 | + margin-left: -392px; | ||
92 | + } | ||
93 | + | ||
94 | + .slide-switch a.next { | ||
95 | + margin-right: -392px; | ||
88 | } | 96 | } |
89 | } | 97 | } |
90 | 98 | ||
@@ -357,9 +365,18 @@ | @@ -357,9 +365,18 @@ | ||
357 | .firstLook-floor { | 365 | .firstLook-floor { |
358 | .left-one { | 366 | .left-one { |
359 | width: 675px; | 367 | width: 675px; |
368 | + height: 361px; | ||
369 | + | ||
370 | + .slide-wrapper { | ||
371 | + height: 361px; | ||
372 | + } | ||
373 | + | ||
374 | + .slide-switch a.prev { | ||
375 | + margin-left: -328px; | ||
376 | + } | ||
360 | 377 | ||
361 | - .first-left-img { | ||
362 | - height: 584px; | 378 | + .slide-switch a.next { |
379 | + margin-right: -328px; | ||
363 | } | 380 | } |
364 | } | 381 | } |
365 | 382 | ||
@@ -367,7 +384,7 @@ | @@ -367,7 +384,7 @@ | ||
367 | width: 305px; | 384 | width: 305px; |
368 | 385 | ||
369 | .first-right-img { | 386 | .first-right-img { |
370 | - height: 287px; | 387 | + height: 176px; |
371 | } | 388 | } |
372 | } | 389 | } |
373 | } | 390 | } |
-
Please register or login to post a comment