diff --git a/app.json b/app.json index 249917c..13261ff 100644 --- a/app.json +++ b/app.json @@ -65,7 +65,7 @@ "navigationBarTextStyle": "white" }, "networkTimeout": { - "request": 10000, + "request": 1000, "downloadFile": 10000 }, "debug": false diff --git a/pages/index/index.js b/pages/index/index.js index afb9e9e..3bc2a3e 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -111,6 +111,13 @@ Page({ title: weapNote.firstpage.title }) }) + .catch(err => { + console.log(err); + that.setData({ + loading: false, + loadingtext: "网络异常,请检查您的网络设置" + }) + }); }, onShow:function(){ this.setData({ diff --git a/utils/HttpBasics.js b/utils/HttpBasics.js index cdcf56c..7b6342f 100644 --- a/utils/HttpBasics.js +++ b/utils/HttpBasics.js @@ -50,8 +50,7 @@ class HttpBasics { fail: err => { // wx.hideLoading(); reject(err); - }, - complete: res => {} + } }); }); }