From 13044e324440841320f8564cbc8769da13c72b43 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 22 Jan 2019 15:11:29 +0800 Subject: [PATCH] 1 --- chapter2/mysite/myapp/static/scripts/index.js | 1 + 1 file changed, 1 insertion(+) 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];