This commit is contained in:
parent
4e57d509de
commit
add0dd9bba
|
@ -9,14 +9,16 @@ $(function(){
|
||||||
//更新抓取信息
|
//更新抓取信息
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
$.ajax('/myapp/api/news.json').done(function(datas){
|
$.ajax('/myapp/api/news.json').done(function(datas){
|
||||||
for(var i in datas){
|
for(var i =0; i < datas.length; ++i){
|
||||||
var data = datas[i];
|
var data = datas[i];
|
||||||
console.log(i);
|
|
||||||
|
$('#tr_news_'+i+' .news_comment_id').html(data.fields.comment_id);
|
||||||
|
$('#tr_news_'+i+' .news_content').html(data.fields.content);
|
||||||
|
$('#tr_news_'+i+' .news_comment_time').html(data.fields.comment_time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ajax('/myapp/api/crawl_info.json').done(function(data){
|
$.ajax('/myapp/api/crawl_info.json').done(function(data){
|
||||||
console.log(data);
|
|
||||||
$('#crawl_info_total_count').html(data.total_count);
|
$('#crawl_info_total_count').html(data.total_count);
|
||||||
$('#crawl_info_today_count').html(data.today_total_count);
|
$('#crawl_info_today_count').html(data.today_total_count);
|
||||||
$('#crawl_info_product_count').html(data.product_count);
|
$('#crawl_info_product_count').html(data.product_count);
|
||||||
|
@ -32,7 +34,7 @@ $(function(){
|
||||||
$('#mem_used').html(to_g(data.mem_used)+'G');
|
$('#mem_used').html(to_g(data.mem_used)+'G');
|
||||||
$('#tasks_count').html(data.tasks);
|
$('#tasks_count').html(data.tasks);
|
||||||
});
|
});
|
||||||
}, 1500);
|
}, 3000);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
init2();
|
init2();
|
||||||
|
|
Loading…
Reference in New Issue