Showing
3 changed files
with
10 additions
and
5 deletions
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <div class="swiper-slide"> | 20 | <div class="swiper-slide"> |
21 | <a href="{{url}}"> | 21 | <a href="{{url}}"> |
22 | {{#if @first}} | 22 | {{#if @first}} |
23 | - <img src="{{image2 img width=200 height=100}}"> | 23 | + <img src="{{image2 img width=200 height=100 q=60}}"> |
24 | {{^}} | 24 | {{^}} |
25 | <img class="swiper-lazy" data-src="{{img}}"> | 25 | <img class="swiper-lazy" data-src="{{img}}"> |
26 | {{/if}} | 26 | {{/if}} |
1 | {{#data}} | 1 | {{#data}} |
2 | <div class="best-week"> | 2 | <div class="best-week"> |
3 | {{> ../common/floor-header-more}} | 3 | {{> ../common/floor-header-more}} |
4 | - | 4 | + |
5 | <ul class="six-lines-floor clearfix"> | 5 | <ul class="six-lines-floor clearfix"> |
6 | {{# list}} | 6 | {{# list}} |
7 | <li> | 7 | <li> |
8 | <a href="{{url}}"> | 8 | <a href="{{url}}"> |
9 | <div class="img-box"> | 9 | <div class="img-box"> |
10 | - <img class="lazy" data-original="{{image src 320 154}}" alt=""> | 10 | + <img class="lazy" data-original="{{image2 src w=320 h=154 q=60}}" alt=""> |
11 | </div> | 11 | </div> |
12 | </a> | 12 | </a> |
13 | </li> | 13 | </li> |
14 | {{/ list}} | 14 | {{/ list}} |
15 | </ul> | 15 | </ul> |
16 | </div> | 16 | </div> |
17 | -{{/data}} | ||
17 | +{{/data}} |
@@ -13,6 +13,11 @@ module.exports = { | @@ -13,6 +13,11 @@ module.exports = { | ||
13 | let params = opts.hash; | 13 | let params = opts.hash; |
14 | let urls = url.split('?'); | 14 | let urls = url.split('?'); |
15 | let query = urls[1] || ''; | 15 | let query = urls[1] || ''; |
16 | + let uri = urls[0]; | ||
17 | + | ||
18 | + if (uri.indexOf('http:') === 0) { | ||
19 | + uri = uri.replace('http:', ''); | ||
20 | + } | ||
16 | 21 | ||
17 | if (query) { | 22 | if (query) { |
18 | query = query.replace(/{width}/g, params.w).replace(/{height}/g, params.h).replace(/{mode}/g, (params.mode || 2)); | 23 | query = query.replace(/{width}/g, params.w).replace(/{height}/g, params.h).replace(/{mode}/g, (params.mode || 2)); |
@@ -33,7 +38,7 @@ module.exports = { | @@ -33,7 +38,7 @@ module.exports = { | ||
33 | } else { | 38 | } else { |
34 | query = 'imageView2/2/interlace/1/q/' + (params.q || 75); | 39 | query = 'imageView2/2/interlace/1/q/' + (params.q || 75); |
35 | } | 40 | } |
36 | - return urls[0] + '?' + query; | 41 | + return uri + '?' + query; |
37 | } else { | 42 | } else { |
38 | return url; | 43 | return url; |
39 | } | 44 | } |
-
Please register or login to post a comment