提交 c0958cec8f86a6a20e50598a9aa0414e54cc8701

作者 guomingshu
1 个父辈 89c73be0

feat: fix bug

... ... @@ -267,13 +267,12 @@ export default {
267 267 } else {
268 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 274 this.$u.toast('网络错误!');
  275 + }
277 276 })
278 277
279 278 } else {
... ... @@ -284,23 +283,16 @@ export default {
284 283
285 284 phoneLogin() {
286 285
  286 + console.warn(this.changeLogin)
287 287
288 288 if (this.changeLogin == "密码登录") {
289 289
290 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 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 296 return
305 297 }
306 298
... ...
注册登录 后发表评论