Merge branch 'release/4.9.2' of git.yoho.cn:fe/yohobuywap-node into release/4.9.2
Showing
9 changed files
with
121 additions
and
51 deletions
@@ -134,6 +134,11 @@ const _getChannelResource = (params) => { | @@ -134,6 +134,11 @@ const _getChannelResource = (params) => { | ||
134 | cache: true | 134 | cache: true |
135 | }).then(result => { | 135 | }).then(result => { |
136 | if (result && result.code === 200) { | 136 | if (result && result.code === 200) { |
137 | + for (let item of result.data.list) { | ||
138 | + item.template_name === 'single_image' && | ||
139 | + item.data.length === 1 && | ||
140 | + (item.singleOne = true); | ||
141 | + } | ||
137 | return resourcesProcess(result.data.list); | 142 | return resourcesProcess(result.data.list); |
138 | } else { | 143 | } else { |
139 | logger.error('index resouce is not 200'); | 144 | logger.error('index resouce is not 200'); |
@@ -42,15 +42,7 @@ module.exports = { | @@ -42,15 +42,7 @@ module.exports = { | ||
42 | retries: 0 | 42 | retries: 0 |
43 | }, | 43 | }, |
44 | interfaceShunt: { | 44 | interfaceShunt: { |
45 | - useInterfaceShunt: false, | ||
46 | - tencentServers: { | ||
47 | - api: ['123.206.1.98', '123.206.2.80'], | ||
48 | - service: ['123.206.1.98', '123.206.2.80'] | ||
49 | - }, | ||
50 | - awsServers: { | ||
51 | - api: 'app-java-168863769.cn-north-1.elb.amazonaws.com.cn', | ||
52 | - service: 'service-yoho-579825100.cn-north-1.elb.amazonaws.com.cn' | ||
53 | - } | 45 | + open: false |
54 | }, | 46 | }, |
55 | loggers: { | 47 | loggers: { |
56 | infoFile: { | 48 | infoFile: { |
@@ -103,15 +95,8 @@ if (isProduction) { | @@ -103,15 +95,8 @@ if (isProduction) { | ||
103 | useOneapm: true, | 95 | useOneapm: true, |
104 | useCache: true, | 96 | useCache: true, |
105 | interfaceShunt: { | 97 | interfaceShunt: { |
106 | - useInterfaceShunt: false, | ||
107 | - tencentServers: { | ||
108 | - api: ['123.206.1.98', '123.206.2.80'], | ||
109 | - service: ['123.206.1.98', '123.206.2.80'] | ||
110 | - }, | ||
111 | - awsServers: { | ||
112 | - api: 'app-java-168863769.cn-north-1.elb.amazonaws.com.cn', | ||
113 | - service: 'service-yoho-579825100.cn-north-1.elb.amazonaws.com.cn' | ||
114 | - } | 98 | + open: true, |
99 | + url: 'http://123.206.2.55/strategy' | ||
115 | } | 100 | } |
116 | }); | 101 | }); |
117 | } else if (isTest) { | 102 | } else if (isTest) { |
1 | -{{#data}} | ||
2 | - <div class="banner-center"> | ||
3 | - <a href="{{url}}"> | ||
4 | - <img class="lazy" data-original="{{image src 640 200}}" alt=""> | ||
5 | - </a> | ||
6 | - </div> | ||
7 | -{{/data}} | ||
1 | +<div class="banner-center banner-center-swiper"> | ||
2 | + {{#if singleOne}} | ||
3 | + {{#data}} | ||
4 | + <div class="banner-list"> | ||
5 | + <a href="{{url}}"> | ||
6 | + <img src="{{image src 640 200}}" alt=""> | ||
7 | + </a> | ||
8 | + </div> | ||
9 | + {{/data}} | ||
10 | + {{else}} | ||
11 | + <ul class="banner-list swiper-wrapper clearfix"> | ||
12 | + {{#data}} | ||
13 | + <li class="swiper-slide"> | ||
14 | + <a href="{{url}}"> | ||
15 | + <img src="{{image src 640 200}}" alt=""> | ||
16 | + </a> | ||
17 | + </li> | ||
18 | + {{/data}} | ||
19 | + </ul> | ||
20 | + {{/if}} | ||
21 | +</div> |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | "uuid": "^2.0.2", | 56 | "uuid": "^2.0.2", |
57 | "winston": "^2.2.0", | 57 | "winston": "^2.2.0", |
58 | "winston-daily-rotate-file": "^1.2.0", | 58 | "winston-daily-rotate-file": "^1.2.0", |
59 | - "yoho-node-lib": "0.0.43" | 59 | + "yoho-node-lib": "0.0.46" |
60 | }, | 60 | }, |
61 | "devDependencies": { | 61 | "devDependencies": { |
62 | "autoprefixer": "^6.3.7", | 62 | "autoprefixer": "^6.3.7", |
@@ -284,9 +284,12 @@ function get_websocket_server(type) { | @@ -284,9 +284,12 @@ function get_websocket_server(type) { | ||
284 | var arr = data.data[0].split(':'); | 284 | var arr = data.data[0].split(':'); |
285 | var ip = arr[0]; | 285 | var ip = arr[0]; |
286 | var port = arr[1]; | 286 | var port = arr[1]; |
287 | + var protocol = 'ws' | ||
288 | + // var protocol = location.protocol === 'https:' ? 'wss' :'ws' | ||
287 | 289 | ||
288 | if (is_live) { | 290 | if (is_live) { |
289 | - ip = 'ws://' + ip; | 291 | + |
292 | + ip = protocol + '://' + ip; | ||
290 | link_to_websocket_server(ip, port); | 293 | link_to_websocket_server(ip, port); |
291 | } | 294 | } |
292 | } | 295 | } |
@@ -108,6 +108,17 @@ if ($('.banner-swiper').find('li').size() > 1) { | @@ -108,6 +108,17 @@ if ($('.banner-swiper').find('li').size() > 1) { | ||
108 | }); | 108 | }); |
109 | } | 109 | } |
110 | 110 | ||
111 | +// single_image的轮播 | ||
112 | +if ($('.banner-center-swiper').find('li').size() > 1) { | ||
113 | + new Swiper('.banner-center-swiper', { | ||
114 | + loop: true, | ||
115 | + autoplay: 3000, | ||
116 | + autoplayDisableOnInteraction: false, | ||
117 | + paginationClickable: true, | ||
118 | + slideElement: 'li', | ||
119 | + }); | ||
120 | +} | ||
121 | + | ||
111 | // 热门品牌滑动 | 122 | // 热门品牌滑动 |
112 | new Swiper('.brands-swiper', { | 123 | new Swiper('.brands-swiper', { |
113 | grabCursor: true, | 124 | grabCursor: true, |
@@ -33,28 +33,36 @@ $border: #e0e0e0; | @@ -33,28 +33,36 @@ $border: #e0e0e0; | ||
33 | position: absolute; | 33 | position: absolute; |
34 | top: 30px; | 34 | top: 30px; |
35 | left: 30px; | 35 | left: 30px; |
36 | - height: 35px; | ||
37 | - padding: 0 10px; | ||
38 | - border: 2px solid $white; | ||
39 | - border-radius: 20px; | 36 | + height: 70px; |
37 | + padding: 0 20px; | ||
38 | + border: 4px solid $white; | ||
39 | + border-radius: 40px; | ||
40 | color: $white; | 40 | color: $white; |
41 | - font-size: 22px; | 41 | + font-size: 44px; |
42 | text-align: center; | 42 | text-align: center; |
43 | - line-height: 1.5; | 43 | + line-height: 70px; |
44 | + -webkit-transform: scale(0.5); | ||
45 | + transform: scale(0.5); | ||
46 | + -webkit-transform-origin: 0 0; | ||
47 | + transform-origin: 0 0; | ||
44 | } | 48 | } |
45 | 49 | ||
46 | .living { | 50 | .living { |
47 | position: absolute; | 51 | position: absolute; |
48 | top: 30px; | 52 | top: 30px; |
49 | left: 30px; | 53 | left: 30px; |
50 | - height: 35px; | ||
51 | - width: 70px; | 54 | + height: 70px; |
55 | + width: 140px; | ||
52 | background: $red; | 56 | background: $red; |
53 | - border-radius: 15px; | 57 | + border-radius: 40px; |
54 | color: $white; | 58 | color: $white; |
55 | - font-size: 22px; | 59 | + font-size: 44px; |
56 | text-align: center; | 60 | text-align: center; |
57 | - line-height: 1.5; | 61 | + line-height: 70px; |
62 | + -webkit-transform: scale(0.5); | ||
63 | + transform: scale(0.5); | ||
64 | + -webkit-transform-origin: 0 0; | ||
65 | + transform-origin: 0 0; | ||
58 | } | 66 | } |
59 | 67 | ||
60 | &_tag { | 68 | &_tag { |
@@ -196,14 +204,18 @@ $border: #e0e0e0; | @@ -196,14 +204,18 @@ $border: #e0e0e0; | ||
196 | position: absolute; | 204 | position: absolute; |
197 | top: 30px; | 205 | top: 30px; |
198 | left: 30px; | 206 | left: 30px; |
199 | - height: 35px; | ||
200 | - width: 70px; | 207 | + height: 70px; |
208 | + width: 140px; | ||
201 | background: $red; | 209 | background: $red; |
202 | - border-radius: 20px; | 210 | + border-radius: 40px; |
203 | color: $white; | 211 | color: $white; |
204 | - font-size: 22px; | 212 | + font-size: 44px; |
205 | text-align: center; | 213 | text-align: center; |
206 | - line-height: 1.5; | 214 | + line-height: 70px; |
215 | + -webkit-transform: scale(0.5); | ||
216 | + transform: scale(0.5); | ||
217 | + -webkit-transform-origin: 0 0; | ||
218 | + transform-origin: 0 0; | ||
207 | } | 219 | } |
208 | 220 | ||
209 | .main-intro { | 221 | .main-intro { |
@@ -294,14 +306,18 @@ $border: #e0e0e0; | @@ -294,14 +306,18 @@ $border: #e0e0e0; | ||
294 | position: absolute; | 306 | position: absolute; |
295 | top: 20px; | 307 | top: 20px; |
296 | left: 220px; | 308 | left: 220px; |
297 | - height: 35px; | ||
298 | - width: 70px; | ||
299 | - border: 2px solid $black; | ||
300 | - border-radius: 20px; | ||
301 | - font-size: 22px; | ||
302 | - line-height: 1.5; | 309 | + height: 70px; |
310 | + width: 140px; | ||
311 | + border: 4px solid $black; | ||
312 | + border-radius: 40px; | ||
313 | + font-size: 44px; | ||
314 | + line-height: 70px; | ||
303 | text-align: center; | 315 | text-align: center; |
304 | color: $black; | 316 | color: $black; |
317 | + -webkit-transform: scale(0.5); | ||
318 | + transform: scale(0.5); | ||
319 | + -webkit-transform-origin: 0 0; | ||
320 | + transform-origin: 0 0; | ||
305 | } | 321 | } |
306 | 322 | ||
307 | .pre-time { | 323 | .pre-time { |
@@ -2,9 +2,45 @@ | @@ -2,9 +2,45 @@ | ||
2 | margin: 30px 0 0; | 2 | margin: 30px 0 0; |
3 | height: 200px; | 3 | height: 200px; |
4 | overflow: hidden; | 4 | overflow: hidden; |
5 | + | ||
5 | img { | 6 | img { |
6 | display: block; | 7 | display: block; |
7 | width: 100%; | 8 | width: 100%; |
8 | height: 100%; | 9 | height: 100%; |
9 | } | 10 | } |
10 | } | 11 | } |
12 | + | ||
13 | +.banner-center-swiper { | ||
14 | + background: #fff; | ||
15 | + width: 100%; | ||
16 | + height: 200px; | ||
17 | + border-top: 1px solid #e0e0e0; | ||
18 | + overflow: hidden; | ||
19 | + | ||
20 | + .banner-list { | ||
21 | + position: relative; | ||
22 | + height: 200px; | ||
23 | + | ||
24 | + li { | ||
25 | + float: left; | ||
26 | + width: 100%; | ||
27 | + height: 200px; | ||
28 | + | ||
29 | + a { | ||
30 | + position: relative; | ||
31 | + display: block; | ||
32 | + width: 100%; | ||
33 | + height: 100%; | ||
34 | + line-height: 200px; | ||
35 | + font-size: 0; | ||
36 | + } | ||
37 | + | ||
38 | + img { | ||
39 | + display: inline-block; | ||
40 | + max-width: 100%; | ||
41 | + max-height: 100%; | ||
42 | + vertical-align: middle; | ||
43 | + } | ||
44 | + } | ||
45 | + } | ||
46 | +} |
-
Please register or login to post a comment