diff --git a/js/index.js b/js/index.js index a052c4d..38556e7 100644 --- a/js/index.js +++ b/js/index.js @@ -32,7 +32,13 @@ $.ajax({ url: 'content/html/' + response[lastIndex]['date'] + '.html', success: function (res) { appendContent(res); + }, + error:function(){ + message.alert('出错了!','网络连接出错了,请稍后再试'); } }); + }, + error:function(){ + message.alert('出错了!','网络连接出错了,请稍后再试'); } }); \ No newline at end of file diff --git a/js/view.js b/js/view.js index ceddf84..dfbf907 100644 --- a/js/view.js +++ b/js/view.js @@ -18,8 +18,14 @@ url: 'content/html/' + response[index]['date'] + '.html', success: function (res) { appendContent(res); + }, + error:function(){ + message.alert('出错了!','网络连接出错了,请稍后再试'); } }); + }, + error:function(){ + message.alert('出错了!','网络连接出错了,请稍后再试'); } }); })(); \ No newline at end of file