Showing
1 changed file
with
29 additions
and
1 deletions
@@ -132,13 +132,27 @@ function request(method = 'GET') { | @@ -132,13 +132,27 @@ function request(method = 'GET') { | ||
132 | } else { | 132 | } else { |
133 | let code = statusCode; | 133 | let code = statusCode; |
134 | let message = res.errMsg ? res.errMsg : ''; | 134 | let message = res.errMsg ? res.errMsg : ''; |
135 | + if(statusCode === 400) { | ||
136 | + wx.showToast({ | ||
137 | + title: '目前参与人数过多请下拉刷新', | ||
138 | + icon: 'none', | ||
139 | + duration: 2000 | ||
140 | + }); | ||
141 | + } | ||
135 | reject({ code, message }); | 142 | reject({ code, message }); |
136 | } | 143 | } |
137 | }, | 144 | }, |
138 | fail: function (err) { | 145 | fail: function (err) { |
139 | let code = err.code ? err.code : 800; | 146 | let code = err.code ? err.code : 800; |
140 | let message = err.message ? err.message : ''; | 147 | let message = err.message ? err.message : ''; |
141 | - reject({ code, message }); | 148 | + if(code === 503) { |
149 | + wx.showToast({ | ||
150 | + title: '目前参与人数过多请下拉刷新', | ||
151 | + icon: 'none', | ||
152 | + duration: 2000 | ||
153 | + }); | ||
154 | + } | ||
155 | + reject({code, message}); | ||
142 | } | 156 | } |
143 | }); | 157 | }); |
144 | }) | 158 | }) |
@@ -209,12 +223,26 @@ function request(method = 'GET') { | @@ -209,12 +223,26 @@ function request(method = 'GET') { | ||
209 | } else { | 223 | } else { |
210 | let code = statusCode; | 224 | let code = statusCode; |
211 | let message = res.errMsg ? res.errMsg : ''; | 225 | let message = res.errMsg ? res.errMsg : ''; |
226 | + if(statusCode === 503) { | ||
227 | + wx.showToast({ | ||
228 | + title: '目前参与人数过多请下拉刷新', | ||
229 | + icon: 'none', | ||
230 | + duration: 2000 | ||
231 | + }); | ||
232 | + } | ||
212 | reject({ code, message }); | 233 | reject({ code, message }); |
213 | } | 234 | } |
214 | }, | 235 | }, |
215 | fail: function (err) { | 236 | fail: function (err) { |
216 | let code = err.code ? err.code : 800; | 237 | let code = err.code ? err.code : 800; |
217 | let message = err.message ? err.message : ''; | 238 | let message = err.message ? err.message : ''; |
239 | + if(code === 503){ | ||
240 | + wx.showToast({ | ||
241 | + title: '目前参与人数过多请下拉刷新', | ||
242 | + icon: 'none', | ||
243 | + duration: 2000 | ||
244 | + }); | ||
245 | + } | ||
218 | reject({ code, message }); | 246 | reject({ code, message }); |
219 | } | 247 | } |
220 | }); | 248 | }); |
-
Please register or login to post a comment