Authored by 姜枫

fix bug

... ... @@ -20,7 +20,7 @@
<div class="swiper-slide">
<a href="{{url}}">
{{#if @first}}
<img src="{{image2 img width=200 height=100}}">
<img src="{{image2 img width=200 height=100 q=60}}">
{{^}}
<img class="swiper-lazy" data-src="{{img}}">
{{/if}}
... ...
... ... @@ -7,7 +7,7 @@
<li>
<a href="{{url}}">
<div class="img-box">
<img class="lazy" data-original="{{image src 320 154}}" alt="">
<img class="lazy" data-original="{{image2 src w=320 h=154 q=60}}" alt="">
</div>
</a>
</li>
... ...
... ... @@ -13,6 +13,11 @@ module.exports = {
let params = opts.hash;
let urls = url.split('?');
let query = urls[1] || '';
let uri = urls[0];
if (uri.indexOf('http:') === 0) {
uri = uri.replace('http:', '');
}
if (query) {
query = query.replace(/{width}/g, params.w).replace(/{height}/g, params.h).replace(/{mode}/g, (params.mode || 2));
... ... @@ -33,7 +38,7 @@ module.exports = {
} else {
query = 'imageView2/2/interlace/1/q/' + (params.q || 75);
}
return urls[0] + '?' + query;
return uri + '?' + query;
} else {
return url;
}
... ...