feat(bindBank): 手机号格式校验

This commit is contained in:
woody 2025-05-22 18:00:50 +08:00
parent af8f0487cb
commit f214679ace
3 changed files with 6 additions and 6 deletions

View File

@ -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
}
},

View File

@ -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
}
},

View File

@ -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
}
},