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