Showing
3 changed files
with
14 additions
and
18 deletions
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | <div class="focus-left-right"> | 45 | <div class="focus-left-right"> |
46 | {{#each result.focus2.data}} | 46 | {{#each result.focus2.data}} |
47 | <a href="{{url}}" title="{{title}}"> | 47 | <a href="{{url}}" title="{{title}}"> |
48 | - <img class="lazy" data-original="{{image src 250 250}}"> | 48 | + <img src="{{image src 250 250}}"> |
49 | </a> | 49 | </a> |
50 | {{/each}} | 50 | {{/each}} |
51 | </div> | 51 | </div> |
1 | var $ = require('yoho-jquery'), | 1 | var $ = require('yoho-jquery'), |
2 | tip = require('../plugin/tip'), | 2 | tip = require('../plugin/tip'), |
3 | Swiper = require('yoho-swiper'), | 3 | Swiper = require('yoho-swiper'), |
4 | - loading = require('../plugin/loading'), | ||
5 | - lazyLoad = require('yoho-jquery-lazyload'); | 4 | + loading = require('../plugin/loading'); |
6 | 5 | ||
7 | var plusstar = {}, | 6 | var plusstar = {}, |
8 | $footer = $('#yoho-footer'); | 7 | $footer = $('#yoho-footer'); |
9 | 8 | ||
9 | +require('yoho-jquery-lazyload'); | ||
10 | require('../common'); | 10 | require('../common'); |
11 | 11 | ||
12 | plusstar = { | 12 | plusstar = { |
@@ -82,16 +82,10 @@ plusstar = { | @@ -82,16 +82,10 @@ plusstar = { | ||
82 | that.resInit(); | 82 | that.resInit(); |
83 | 83 | ||
84 | loading.hideLoadingMask(); | 84 | loading.hideLoadingMask(); |
85 | - lazyLoad($('img.lazy')); | ||
86 | - | ||
87 | - // 处理左右滑动,未加载的图片 | ||
88 | - setTimeout(function() { | ||
89 | - $('img.lazy').each(function() { | ||
90 | - if ($(this).attr('src') !== $(this).data('original')) { | ||
91 | - $(this).attr('src', $(this).data('original')); | ||
92 | - } | ||
93 | - }); | ||
94 | - }, 40); | 85 | + |
86 | + $('.plusstar-resources').find('img.lazy').lazyload({ | ||
87 | + effect: 'fadeIn' | ||
88 | + }); | ||
95 | 89 | ||
96 | // 设置滚动条的位置 | 90 | // 设置滚动条的位置 |
97 | if (window.localStorage) { | 91 | if (window.localStorage) { |
@@ -163,13 +163,11 @@ | @@ -163,13 +163,11 @@ | ||
163 | a { | 163 | a { |
164 | display: inline-block; | 164 | display: inline-block; |
165 | margin: 0 15px; | 165 | margin: 0 15px; |
166 | - width: 213px; | ||
167 | - height: 213px; | ||
168 | } | 166 | } |
169 | 167 | ||
170 | img { | 168 | img { |
171 | - width: 100%; | ||
172 | - height: 100%; | 169 | + width: 213px; |
170 | + height: 213px; | ||
173 | } | 171 | } |
174 | } | 172 | } |
175 | 173 | ||
@@ -180,7 +178,11 @@ | @@ -180,7 +178,11 @@ | ||
180 | a { | 178 | a { |
181 | display: inline-block; | 179 | display: inline-block; |
182 | width: 50%; | 180 | width: 50%; |
183 | - overflow: hidden; | 181 | + |
182 | + img { | ||
183 | + width: 320px; | ||
184 | + height: 320px; | ||
185 | + } | ||
184 | } | 186 | } |
185 | } | 187 | } |
186 | 188 |
-
Please register or login to post a comment