正在显示
1 个修改的文件
包含
9 行增加
和
17 行删除
@@ -267,13 +267,12 @@ export default { | @@ -267,13 +267,12 @@ export default { | ||
267 | } else { | 267 | } else { |
268 | this.$u.toast('网络错误!'); | 268 | this.$u.toast('网络错误!'); |
269 | } | 269 | } |
270 | - }).catch(errors => { | ||
271 | - // uni.showToast({ | ||
272 | - // title: errors.data.msg, | ||
273 | - // icon: "none", | ||
274 | - // duration: 2500, | ||
275 | - // }) | 270 | + }).catch(err => { |
271 | + if (err.statusCode == 500 && err.data.msg) { | ||
272 | + this.$u.toast(err.data.msg); | ||
273 | + } else { | ||
276 | this.$u.toast('网络错误!'); | 274 | this.$u.toast('网络错误!'); |
275 | + } | ||
277 | }) | 276 | }) |
278 | 277 | ||
279 | } else { | 278 | } else { |
@@ -284,23 +283,16 @@ export default { | @@ -284,23 +283,16 @@ export default { | ||
284 | 283 | ||
285 | phoneLogin() { | 284 | phoneLogin() { |
286 | 285 | ||
286 | + console.warn(this.changeLogin) | ||
287 | 287 | ||
288 | if (this.changeLogin == "密码登录") { | 288 | if (this.changeLogin == "密码登录") { |
289 | 289 | ||
290 | if (!(this.form.mobile && /^1[0-9]{10}$/.test(this.form.mobile))) { | 290 | if (!(this.form.mobile && /^1[0-9]{10}$/.test(this.form.mobile))) { |
291 | - this.$refs.uToast.show({ | ||
292 | - title: '请填写正确手机号', | ||
293 | - type: 'error', | ||
294 | - duration: 1500, | ||
295 | - }) | 291 | + this.$u.toast("请填写正确手机号"); |
296 | return | 292 | return |
297 | } | 293 | } |
298 | - if (!(this.form.password && /^[0-9]{4}$/.test(this.form.password))) { | ||
299 | - this.$refs.uToast.show({ | ||
300 | - title: '请填写正确验证码', | ||
301 | - type: 'error', | ||
302 | - duration: 1500, | ||
303 | - }) | 294 | + if (!(this.form.password && /^[0-9]{6}$/.test(this.form.password))) { |
295 | + this.$u.toast("请填写正确验证码"); | ||
304 | return | 296 | return |
305 | } | 297 | } |
306 | 298 |
请
注册
或
登录
后发表评论