This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
weapp
/
C
Watch
8
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
66
Wiki
Activity
Browse Source
网络超时加载优化01
tags/2.2.9
海洋之声
6 years ago
parent
d24463a089
commit
441136ff37
3 changed files
with
9 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app.json
+7
-0
pages/index/index.js
+1
-2
utils/HttpBasics.js
+ 1
- 1
app.json
View File
@@ -65,7 +65,7 @@
"navigationBarTextStyle": "white"
},
"networkTimeout": {
"request": 1000
0
,
"request": 1000,
"downloadFile": 10000
},
"debug": false
+ 7
- 0
pages/index/index.js
View File
@@ -111,6 +111,13 @@ Page({
title: weapNote.firstpage.title
})
})
.catch(err => {
console.log(err);
that.setData({
loading: false,
loadingtext: "网络异常,请检查您的网络设置"
})
});
},
onShow:function(){
this.setData({
+ 1
- 2
utils/HttpBasics.js
View File
@@ -50,8 +50,7 @@ class HttpBasics {
fail: err => {
// wx.hideLoading();
reject(err);
},
complete: res => {}
}
});
});
}
Write
Preview
Loading…
Cancel
Save