Authored by ccbikai

星潮教室优化

@@ -42,8 +42,6 @@ if ($window.width() === 375 && isiOS) { @@ -42,8 +42,6 @@ if ($window.width() === 375 && isiOS) {
42 42
43 require('../common'); 43 require('../common');
44 44
45 -lazyLoad($('img.lazy'));  
46 -  
47 $window.on('mousewheel', false); 45 $window.on('mousewheel', false);
48 46
49 // 限制标题字数 47 // 限制标题字数
@@ -177,11 +175,15 @@ function initAction() { @@ -177,11 +175,15 @@ function initAction() {
177 txtLimit($(this), '.title', '.cont-txt'); 175 txtLimit($(this), '.title', '.cont-txt');
178 }); 176 });
179 177
180 - lazyLoad($('img.lazy')); 178 + $('img.lazy').lazyload({
  179 + effect: 'fadeIn'
  180 + });
181 181
182 setIndexAction(); 182 setIndexAction();
183 } 183 }
184 184
  185 +initAction();
  186 +
185 187
186 // 首页数据请求 188 // 首页数据请求
187 getIndexHtml = function() { 189 getIndexHtml = function() {
@@ -211,8 +213,6 @@ getIndexHtml = function() { @@ -211,8 +213,6 @@ getIndexHtml = function() {
211 }); 213 });
212 }; 214 };
213 215
214 -initAction();  
215 -  
216 // 下拉刷新,上拉加载 216 // 下拉刷新,上拉加载
217 starIScroll = new PullRefresh('.star-main', { 217 starIScroll = new PullRefresh('.star-main', {
218 height: scrollH, 218 height: scrollH,
@@ -272,12 +272,12 @@ starIScroll.iScroll.on('scrollEnd', function() { @@ -272,12 +272,12 @@ starIScroll.iScroll.on('scrollEnd', function() {
272 $loadingTip.slideUp(); 272 $loadingTip.slideUp();
273 }); 273 });
274 274
275 -$('img').on('load', function() {  
276 - starIScroll && starIScroll.iScroll.refresh();  
277 -});  
278 -  
279 window.setCookie('guangStarUid', window.queryString.uid); 275 window.setCookie('guangStarUid', window.queryString.uid);
280 276
  277 +// $('img').on('load', function() {
  278 +// starIScroll && starIScroll.iScroll.refresh();
  279 +// });
  280 +
281 // 明星动态文章图片相关操作 281 // 明星动态文章图片相关操作
282 /* 282 /*
283 function articleImgAction(dom, key) { 283 function articleImgAction(dom, key) {
@@ -23,10 +23,19 @@ @@ -23,10 +23,19 @@
23 font-weight: bold; 23 font-weight: bold;
24 } 24 }
25 25
  26 + .lazy {
  27 + opacity: 0.1;
  28 +
  29 + &[src^="http"],
  30 + &[src^="//"] {
  31 + opacity: 1;
  32 + }
  33 + }
  34 +
26 .head-tab { 35 .head-tab {
27 position: fixed; 36 position: fixed;
28 top: 0; 37 top: 0;
29 - width: 100%; 38 + width: 640px;
30 height: 88px; 39 height: 88px;
31 background: #000; 40 background: #000;
32 z-index: 3; 41 z-index: 3;
@@ -247,13 +256,16 @@ @@ -247,13 +256,16 @@
247 } 256 }
248 257
249 .artice-imgs-area { 258 .artice-imgs-area {
250 - display: block; 259 + display: table;
  260 + margin: 10px 0;
251 width: 266px; 261 width: 266px;
252 height: 266px; 262 height: 266px;
253 overflow: hidden; 263 overflow: hidden;
254 264
255 img { 265 img {
256 width: 100%; 266 width: 100%;
  267 + display: table-cell;
  268 + vertical-align: middle;
257 } 269 }
258 } 270 }
259 271