//滚动
window.onscroll = function() {
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
if(scrollTop >= 120) {
oBack.style.display = 'block'
} else {
oBack.style.display = 'none';
}
oBack.addEventListener('touchstart', function() {
document.body.scrollTop = 0;
})
var pageHeight = $(document).height();
// 可视区域高度
var viewHeight = $(window).height();
var aList = oNav_list.getElementsByTagName('li');
if((scrollTop + viewHeight) > (pageHeight - 20)) {
setTimeout(function(){
if(aList.length<=30)
{
switch(page)
{
case 0:
url="data/News"+1+".json"
loadInfo(url);
break;
case 1:
url="dataiewpoint"+1+".json"
loadInfo(url);
break;
case 2:
url="data/shopGuid"+1+".json"
loadInfo(url);
break;
case 3:
url="data/tushuo"+1+".json"
loadInfo(url);
break;
case 4:
url="data/activity"+1+".json"
loadInfo(url);
break;
case 5:
url="datasiness"+1+".json"
loadInfo(url);
break;
}
}
},500);
}
}