document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); var qingtiancms_com_news_bottom={ ai:1, stops:1, h:"1", ac:function(){ jQuery(".s-news-loding").html("请稍等,加载中..."); qingtiancms_com_news_bottom.stops=1; qingtiancms_com_news_bottom.ai++; qingtiancms_com_news_bottom.a(); }, //au:"https://app.api.btime.com/news/list?cid=7389193781085e10178780f6bbb3c79e&is_paging=1&count=#count#&refresh_count=3&refresh_type=2&os_type=h5&ver=60100&_=#timestamp#&callback=#callback#", aurlss:function(){ var url1=""; //url1+="1101###头条###https://app.api.btime.com/news/list?cid=7389193781085e10178780f6bbb3c79e&is_paging=1&count=#count#&refresh_count=3&refresh_type=2&os_type=h5&ver=60100&_=#timestamp#&callback=#callback#aa-aa"; url1+="1102###娱乐###https://api.app.btime.com/news/listV4?cname=%E5%A8%B1%E4%B9%90&cid=7af450a9dcc60c0af56db7421a461c02&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1103###体育###https://api.app.btime.com/news/listV4?cname=%E4%BD%93%E8%82%B2&cid=eaabd3750a92632e39431d1197b80acc&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1104###科技###https://api.app.btime.com/news/listV4?cname=%E7%A7%91%E6%8A%80&cid=ccaa7b3dafbdd70a7a0abeb17902e994&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1105###军事###https://api.app.btime.com/news/listV4?cname=%E5%86%9B%E4%BA%8B&cid=cde065b013e874b45414c7eb5bb4567e&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1106###财经###https://api.app.btime.com/news/listV4?cname=%E8%B4%A2%E7%BB%8F&cid=5669459fffd471c7adb81621ccc652f2&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1107###生活###https://api.app.btime.com/news/listV4?cname=%E7%94%9F%E6%B4%BB&cid=4e9715a3087a5cf063107c9132be55f5&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1109###数码###https://api.app.btime.com/news/listV4?cname=%E6%95%B0%E7%A0%81&cid=9f8829e7ef34b714e136b7dbbc283041&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1110###时尚###https://api.app.btime.com/news/listV4?cname=%E6%97%B6%E5%B0%9A&cid=963a9c98ca184610c2a3054749eec76f&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1111###亲子###https://api.app.btime.com/news/listV4?cname=%E4%BA%B2%E5%AD%90&cid=0bd9f2755fe97a7faf17a825c0491e12&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1112###美食###https://api.app.btime.com/news/listV4?cname=%E7%BE%8E%E9%A3%9F&cid=711eb84d9b95d66b86cd397eaba55d12&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1113###星座###https://api.app.btime.com/news/listV4?cname=%E6%98%9F%E5%BA%A7&cid=14c4c9d4cc9cac1af79926a5fd5bd85f&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1114###房产###https://api.app.btime.com/news/listV4?cname=%E6%88%BF%E4%BA%A7&cid=92db0f7330c8f3b412c048a65e6d6f66&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1115###旅游###https://api.app.btime.com/news/listV4?cname=%E6%97%85%E6%B8%B8&cid=74b8334b484cbcb5d07e0ba82833e51d&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1116###汽车###https://api.app.btime.com/news/listV4?cname=%E6%B1%BD%E8%BD%A6&cid=f5fc97507007cf44a70d940311b952d2&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; url1+="1117###情感###https://api.app.btime.com/news/listV4?cname=%E6%83%85%E6%84%9F&cid=8199cf9f2aa82c7ab093eda868cb32bb&offset=0&refresh_type=1&refresh=1&count=#count#&last=null&is_paging=2&citycode=&os_type=h5&_=#timestamp#&callback=#callback#aa-aa"; return url1; }, aurls:function(v){ var url1=qingtiancms_com_news_bottom.aurlss(); var url1_a=url1.split("aa-aa"); for(var i=0,c=url1_a.length;i加载更多>>"); qingtiancms_com_news_bottom.stops=0; qingtiancms_com_news_bottom.ai++; return false; } if(qingtiancms_com_news_bottom.stops==0)return false; //console.log(qingtiancms_com_news_bottom.ai) jQuery(".s-news-loding").remove(); var c = new Date().getTime(); var httpurl=""; httpurl=qingtiancms_com_news_bottom.au; httpurl=httpurl.replace(/#timestamp#/gi,c); httpurl=httpurl.replace(/#callback#/gi,"qingtiancms_com_news_bottom.backjson2"); httpurl=httpurl.replace(/#count#/gi,10); jQuery.ajax({ url: httpurl, type: "GET", jsonp: "qingtiancms_com_news_bottom.backjson2", dataType: "jsonp" }) }, backjson:function(d) { var c = d.data.length; jQuery("#s-qt-news-contents").show(); var a = new Array(); for (var b = 0; b <= c - 1; b++) { a[b] = { "title": d.data[b].data.title, "descr": d.data[b].data.summary, "url": d.data[b].open_url, "imgs": d.data[b].data.covers, "time": d.data[b].data.pdate, "source": d.data[b].data.source } } qingtiancms_com_news_bottom.template(a) }, backjson2:function(d) { var c = d.data.data.length; jQuery("#s-qt-news-contents").show(); var a = new Array(); for (var b = 0; b <= c - 1; b++) { if(typeof(d.data.data[b].data)!="undefined"){ if(typeof(d.data.data[b].data.title)!="undefined"){ a[b] = { "title": d.data.data[b].data.title, "descr": d.data.data[b].data.summary, "url": d.data.data[b].open_url, "imgs": d.data.data[b].data.covers, "time": d.data.data[b].data.pdate, "source": d.data.data[b].data.source } } } } qingtiancms_com_news_bottom.template(a) }, template:function(b) { var a = ""; for (var c = 0; c <= b.length - 1; c++) { if (b[c].source.indexOf("北京时间") != -1) { continue } b[c].imgs = qingtiancms_com_news_bottom.f.getThumb(b[c].imgs); b[c].time=qingtiancms_com_news_bottom.timestampToTime(b[c].time); b[c].url=qingtiancms_com_news_bottom.f.href(b[c].url); var d = c < 1 ? '热点 ': ""; if (b[c].imgs == false) { a+='

'+b[c].title+'

' + b[c].source + ' '+d+'

'; } else { if (b[c].imgs.length < 3) { a+='

'+b[c].title+'

'+b[c].source+'

'; } else { a+='

' + b[c].title + '

' + b[c].source + ' ' + b[c].time + '

'; } } } jQuery("#s-qt-news-feedlist").append(a); qingtiancms_com_news_bottom.h="1"; qingtiancms_com_news_bottom.ai++; }, f:{ getThumb:function(b) { if(b==null) return false; if (b.length >= 1) { for (var a = 0; a <= b.length - 1; a++) { b[a] = b[a].replace(/__\d+/, "179_119_"); //b[a] = b[a].replace(/__\d+/, "190_106_"); // b[a] = b[a].replace("http://p1.cdn.btime.com/", "https://p1.ssl.cdn.btime.com/"); // b[a] = b[a].replace("http://p2.cdn.btime.com/", "https://p2.ssl.cdn.btime.com/"); // b[a] = b[a].replace("http://p3.cdn.btime.com/", "https://p3.ssl.cdn.btime.com/"); // b[a] = b[a].replace("http://p4.cdn.btime.com/", "https://p4.ssl.cdn.btime.com/"); if(b[a].indexOf(".webp")!=-1)return false; } return b } return false }, href:function(b){ try{ b=b.replace("btime://v1/goto/normal_news?zm=",""); b=b.replace("%3A%2F%2F","://"); b=decodeURIComponent(b);//https://api.btime.com/trans?m=btime&fmt=json&protocol=2&gid=m_9430bac4606ed419e&gid=m_9430bac4606ed419e&from_cid=7af450a9dcc60c0af56db7421a461c02 b=b.match(/gid=(\S*)&/)[1]; //b="https://item.btime.com/"+b; b="http://m.btime.com/item/router?gid="+b; }catch(ex){ //console.log(b) } return b; } }, timestampToTime2:function(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 Y = date.getFullYear() + '-'; M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; D = date.getDate() + ' '; h = date.getHours() + ':'; m = date.getMinutes() + ':'; s = date.getSeconds(); return Y+M+D; }, timestampToTime:function(timespan) { return "刚刚"; var dateTime = new Date(timespan * 1000); var year = dateTime.getFullYear(); var month = dateTime.getMonth() + 1; var day = dateTime.getDate(); var hour = dateTime.getHours(); var minute = dateTime.getMinutes(); var second = dateTime.getSeconds(); var now = new Date(); var now_new = Date.parse(now.toDateString()); //typescript转换写法 var milliseconds = 0; var timeSpanStr; milliseconds = now_new - timespan; if (milliseconds <= 1000 * 60 * 1) { timeSpanStr = '刚刚'; } else if (1000 * 60 * 1 < milliseconds && milliseconds <= 1000 * 60 * 60) { timeSpanStr = Math.round((milliseconds / (1000 * 60))) + '分钟前'; } else if (1000 * 60 * 60 * 1 < milliseconds && milliseconds <= 1000 * 60 * 60 * 24) { timeSpanStr = Math.round(milliseconds / (1000 * 60 * 60)) + '小时前'; } else if (1000 * 60 * 60 * 24 < milliseconds && milliseconds <= 1000 * 60 * 60 * 24 * 15) { timeSpanStr = Math.round(milliseconds / (1000 * 60 * 60 * 24)) + '天前'; } else if (milliseconds > 1000 * 60 * 60 * 24 * 15 && year == now.getFullYear()) { timeSpanStr = month + '-' + day + ' ' + hour + ':' + minute; } else { timeSpanStr = year + '-' + month + '-' + day + ' ' + hour + ':' + minute; } return timeSpanStr; }, menus:function(){ var url1=qingtiancms_com_news_bottom.aurlss(); var url1_a=url1.split("aa-aa"); var s='',s2='',cc='act'; for(var i=0,c=url1_a.length;i0)cc=''; s+=''+t1_a[1]+''; } } jQuery("#s-qt-news-menu").width(url1_a.length*60); jQuery("#s-qt-news-menu").html(s); // var myScroll = new IScroll('#navwpFeed', { // scrollX: true, // scrollY: false, // click:true // }); } } jQuery(document).ready(function() { qingtiancms_com_news_bottom.menus(); jQuery("#s-qt-news-menu span").click(function() { jQuery("#s-qt-news-menu span").removeClass("act"); jQuery(this).addClass("act"); var relc=jQuery(this).attr("relc"); qingtiancms_com_news_bottom.aurls(relc); jQuery("html,body").animate({scrollTop:jQuery("#s-qt-news-contents").offset().top-20},0); return false; }); jQuery("#s-qt-news-contents").hide(); jQuery(window).scroll(function() { var scrollTop = document.body.scrollTop || document.documentElement.scrollTop, windowHeight = document.documentElement.clientHeight, documentHeight = document.body.offsetHeight || document.documentElement.offsetHeight; if(windowHeight + scrollTop > documentHeight - 100){ if(qingtiancms_com_news_bottom.h=="1"){ qingtiancms_com_news_bottom.h="0"; qingtiancms_com_news_bottom.a(); } } var aa=jQuery(this).scrollTop(); var bb=parseInt(jQuery("#s-qt-news-contents").height())+parseInt(jQuery("#s-qt-news-contents").offset().top); if(aa>bb){ jQuery("#s-qt-news-contents .hd").removeClass("fix"); } }); qingtiancms_com_news_bottom.a(); }) jQuery(window).scroll(function() { var b = jQuery(document).scrollTop(); var top=0; var tops=jQuery("#s-qt-news-contents").offset().top; if (b > parseInt(tops)) { jQuery("#s-qt-news-contents .hd").addClass("fix"); } else { jQuery("#s-qt-news-contents .hd").removeClass("fix"); } })