|
|
@@ -59,7 +59,7 @@
|
|
|
<view class="content" style="padding: 120rpx 40rpx ;">
|
|
|
<u-form :model="form" ref="uForm" label-width="140" :border-bottom="borderBottom">
|
|
|
<u-form-item label="手机号">
|
|
|
- <u-input v-model="form.phone" :clearable="false" />
|
|
|
+ <u-input v-model="form.phone" maxlength="11" :clearable="false" />
|
|
|
</u-form-item>
|
|
|
<u-form-item label="验证码">
|
|
|
<u-input :clearable="false" placeholder="请输入验证码" v-model="form.code"
|
|
|
@@ -148,6 +148,10 @@
|
|
|
this.$refs.toast.info('请输入手机号')
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.$util.isPhone(this.form.phone)) {
|
|
|
+ this.$u.toast("手机号码有误,请重新输入")
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.$refs.uCode.canGetCode) {
|
|
|
// 模拟向后端请求验证码
|
|
|
let params = {
|
|
|
@@ -173,6 +177,10 @@
|
|
|
this.$u.toast("请输入手机号")
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.$util.isPhone(this.form.phone)) {
|
|
|
+ this.$u.toast("手机号码有误,请重新输入")
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.$isEmpty(this.form.code)) {
|
|
|
this.$u.toast("请输入验证码")
|
|
|
return
|