Authored by ccbikai

星潮教室优化

... ... @@ -42,8 +42,6 @@ if ($window.width() === 375 && isiOS) {
require('../common');
lazyLoad($('img.lazy'));
$window.on('mousewheel', false);
// 限制标题字数
... ... @@ -177,11 +175,15 @@ function initAction() {
txtLimit($(this), '.title', '.cont-txt');
});
lazyLoad($('img.lazy'));
$('img.lazy').lazyload({
effect: 'fadeIn'
});
setIndexAction();
}
initAction();
// 首页数据请求
getIndexHtml = function() {
... ... @@ -211,8 +213,6 @@ getIndexHtml = function() {
});
};
initAction();
// 下拉刷新,上拉加载
starIScroll = new PullRefresh('.star-main', {
height: scrollH,
... ... @@ -272,12 +272,12 @@ starIScroll.iScroll.on('scrollEnd', function() {
$loadingTip.slideUp();
});
$('img').on('load', function() {
starIScroll && starIScroll.iScroll.refresh();
});
window.setCookie('guangStarUid', window.queryString.uid);
// $('img').on('load', function() {
// starIScroll && starIScroll.iScroll.refresh();
// });
// 明星动态文章图片相关操作
/*
function articleImgAction(dom, key) {
... ...
... ... @@ -23,10 +23,19 @@
font-weight: bold;
}
.lazy {
opacity: 0.1;
&[src^="http"],
&[src^="//"] {
opacity: 1;
}
}
.head-tab {
position: fixed;
top: 0;
width: 100%;
width: 640px;
height: 88px;
background: #000;
z-index: 3;
... ... @@ -247,13 +256,16 @@
}
.artice-imgs-area {
display: block;
display: table;
margin: 10px 0;
width: 266px;
height: 266px;
overflow: hidden;
img {
width: 100%;
display: table-cell;
vertical-align: middle;
}
}
... ...