diff --git a/chapter2/mysite/myapp/static/scripts/index.js b/chapter2/mysite/myapp/static/scripts/index.js index 021807f..32fee79 100755 --- a/chapter2/mysite/myapp/static/scripts/index.js +++ b/chapter2/mysite/myapp/static/scripts/index.js @@ -9,6 +9,7 @@ $(function(){ //更新抓取信息 setInterval(function(){ $.ajax('/myapp/api/news.json').done(function(datas){ + var datas = JSON.parse(datas); for(var i =0; i < datas.length; ++i){ var data = datas[i];