From 441136ff378f3001a9a96bd66abdaa36caa63741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E6=B4=8B=E4=B9=8B=E5=A3=B0?= Date: Thu, 1 Nov 2018 10:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=B6=85=E6=97=B6=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E4=BC=98=E5=8C=9601?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 +- pages/index/index.js | 7 +++++++ utils/HttpBasics.js | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) 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 => {} + } }); }); }