YOUFANG1.1
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
var tab = new Vue({
|
||||
el:"#tab",
|
||||
data:{
|
||||
mf_num:"0"
|
||||
mf_num:"0",
|
||||
mc_num:"0"
|
||||
}
|
||||
})
|
||||
|
||||
@@ -23,7 +24,7 @@ function addEstate(number, lastIndex) {
|
||||
data = response.data;
|
||||
//data = eval( '(' + data + ')' );
|
||||
if(data['results']==null || data['results'].length==0) {
|
||||
$('#loadTip1').remove();
|
||||
$('#loadTip2').remove();
|
||||
$('.infinite-scroll-bottom #tab1').html("<div class='noData'><img src='../images/noData.png'><p>您还没有关注小区</p></div>");
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +90,7 @@ function addEstate(number, lastIndex) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
$('#loadTip2').remove();
|
||||
}
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
@@ -121,7 +122,7 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
$('#loadTip2').remove();
|
||||
return;
|
||||
}
|
||||
// 添加新条目
|
||||
@@ -130,4 +131,29 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
// $.refreshScroller();
|
||||
}, 1000);
|
||||
}
|
||||
if($("#tabList3").hasClass("active"))
|
||||
{
|
||||
// 如果正在加载,则退出
|
||||
if(mc_loading) return;
|
||||
// 设置flag
|
||||
mc_loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
mc_loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(mc_page >= mc_totalPages) {
|
||||
// // 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip3').remove();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
mc_page = mc_page + 1;
|
||||
selectNewsCollectList();
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
//$.refreshScroller();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user