Authored by zhangxiaoru

初始化第一屏数据 添加正在加载的提示

... ... @@ -306,7 +306,7 @@ plusstar = {
});
}, 300);
},
goodsList: function() {
goodsList: function(reload) {
let that = this,
skn = [];
... ... @@ -319,6 +319,10 @@ plusstar = {
return false;
}
if (!reload) {
$('.goods').append('<div class="divide">正在加载...</div>');
}
loading.showLoadingMask();
skn = that.common.productSkns.slice((that.common.page - 1) *
that.common.pagesize, that.common.page * that.common.pagesize);
... ... @@ -356,6 +360,7 @@ plusstar = {
PAGE_NUM: that.common.page - 1
});
$('.divide').remove();
$('.plusstar-resources .goods').append(data);
$('.plusstar-resources .goods').find('img.lazy:not([src])').lazyload();
... ... @@ -399,6 +404,8 @@ $(function() {
plusstar.init();
plusstar.goodsList(true);
// 滚动翻页
$(window).scroll(function() {
scrollFn();
... ...
... ... @@ -198,6 +198,15 @@
.goods {
background-color: #fff;
padding: 0 14px;
.divide {
float: left;
height: 50px;
width: 100%;
padding: 10px 0;
color: #ccc;
text-align: center;
}
}
}
... ...