From 946e98946531d26f78055efabfadbc4f3f153fff Mon Sep 17 00:00:00 2001 From: wolegca <2738076308@qq.com> Date: Sat, 21 Sep 2019 16:17:12 +0800 Subject: [PATCH] add neterror alert --- js/index.js | 6 ++++++ js/view.js | 6 ++++++ 2 files changed, 12 insertions(+) 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