'; } else if (data[i]['Item_type'] == 1){ if(data[i]['Doc_type'] != 4){ if(data[i]['Content_type'] == "学习强国") {result += '
'} else {result += '
'} } else if(data[i]['Doc_type'] == 4){ result += '
' } result +='
' +'
' + data[i]['title'] + '
' +'
' +'
' +'
' +'
' +'
' +'
'; if(data[i]['Content_type'] != ""){ result += '
' + data[i]['Content_type'] + '
' } else{ result += '
' + data[i]['Content_type'] + '
' } result += '
' + data[i]['fbdate'] + '
' +'
' +'
' +'
' +''; } else if (data[i]['Item_type'] == 2){ if(data[i]['Doc_type'] != 4){ if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/l/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/g/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/f/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/e/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/d/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/i/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/h/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/j/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/k/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/b/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/a/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/c/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/ad/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/ac/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/ab/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/aa/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/z/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/y/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/x/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/w/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/v/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/u/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/t/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/s/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/r/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/q/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/p/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/o/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/n/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/m/list_1_0.shtml") {result += '
'} else if(data[i]['href_App'] == "/a/a/e/2020zt/yldoctor/ae/list_1_0.shtml") {result += '
'} else if(data[i]['Content_type'] == "学习强国") {result += '
'} else {result += '
'} } else if(data[i]['Doc_type'] == 4){ result += '
' } result +='
' +'
' + data[i]['title'] + '
' +'
' +'
' +'
' +'
'; if(data[i]['Content_type'] != ""){ result += '
' + data[i]['Content_type'] + '
' } else{ result += '
' + data[i]['Content_type'] + '
' } result += '
' + data[i]['fbdate'] + '
' +'
' +'
' +'
' +''; } else if (data[i]['Item_type'] == 3){ if(data[i]['Doc_type'] != 4){ if(data[i]['Content_type'] == "学习强国") {result += '
'} else {result += '
'} } else if(data[i]['Doc_type'] == 4){ result += '
' } result +='
' +'
' +'
' + data[i]['title'] + '
' +'
'; if(data[i]['Content_type'] != ""){ result += '
' + data[i]['Content_type'] + '
' } else{ result += '
' + data[i]['Content_type'] + '
' } result += '
' + data[i]['fbdate'] + '
' +'
' +'
' +'
' +'
' +''; } } // 如果没有数据 }else{ // 锁定 self.moreFund.lock(); // 无数据 self.moreFund.noData(); } } //插入数据到页面,放到最后面 $('#lists').append(result); // 每次数据插入,必须重置 self.moreFund.resetload(); //为了测试,延迟1秒加载 // setTimeout(function(){ // // 插入数据到页面,放到最后面 // $('#lists').append(result); // // 每次数据插入,必须重置 // me.resetload(); // },1000); }, error: function(xhr, type){ alert('Ajax error!'); // 即使加载出错,也得重置 self.moreFund.resetload(); } }); }; // dropload self.moreFund = $('#list_box').dropload({ scrollArea : window, // domUp : { // domClass : 'dropload-up', // domRefresh : '
↓下拉刷新-自定义内容
', // domUpdate : '
↑释放更新-自定义内容
', // domLoad : '
加载中-自定义内容...
' // }, domDown : { domClass : 'dropload-down', domRefresh : '
↑上拉加载更多
', domLoad : '
加载中...
', domNoData : '
已加载全部内容
' }, // loadUpFn : function(me){ // $.ajax({ // type: 'GET', // url: 'json/update.json', // dataType: 'json', // success: function(data){ // var result = ''; // for(var i = 0; i < data.lists.length; i++){ // result += '
' // +'
' // +'
'+data.lists[i].title+'
' // +'
'+data.lists[i].date+'
' // +'
'; // } // // 为了测试,延迟1秒加载 // setTimeout(function(){ // $('.lists').html(result); // // 每次数据加载完,必须重置 // me.resetload(); // // 重置页数,重新获取loadDownFn的数据 // page = 0; // // 解锁loadDownFn里锁定的情况 // me.unlock(); // me.noData(false); // },1000); // }, // error: function(xhr, type){ // alert('Ajax error!'); // // 即使加载出错,也得重置 // me.resetload(); // } // }); // }, loadDownFn : function(me){ page++; // 拼接HTML // var result = ''; get_list(); }, threshold : 50 }); }); /*顶部下载和返回顶部*/ $(function(){ var t=0, p=0; $(window).scroll(function(){ var t=$(window).scrollTop(); if(t>p && t>=120){ $(".download_box").removeClass("show-top-pannel"); $(".download_box").addClass("hide-top-pannel"); }else if(p>t){ $(".download_box").removeClass("hide-top-pannel"); $(".download_box").addClass("show-top-pannel"); } p=t; }); // 返回顶部 $(window).scroll(function(){ $('.top').show(); if($(window).scrollTop() <= 200){ $('.top').hide(); } }); $('.top').click(function(){ $(window).scrollTop(0); }); });