feat(bindBank): 手机号格式校验
This commit is contained in:
parent
a25c956424
commit
85b263ee03
|
@ -134,7 +134,7 @@
|
|||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.dataForm.phone) {
|
||||
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
|
@ -153,7 +153,7 @@
|
|||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast('请先输入手机号')
|
||||
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
|
||||
return
|
||||
}
|
||||
},
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.dataForm.phone) {
|
||||
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
|
@ -271,7 +271,7 @@
|
|||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast('请先输入手机号')
|
||||
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
|
||||
return
|
||||
}
|
||||
},
|
||||
|
|
|
@ -517,7 +517,7 @@ export default {
|
|||
this.tips = text
|
||||
},
|
||||
getCode() {
|
||||
if (this.dataForm.phone) {
|
||||
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
|
@ -538,7 +538,7 @@ export default {
|
|||
uni.$u.toast('倒计时结束后再发送')
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast('请先输入手机号')
|
||||
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
|
||||
return
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue