uniapp 登录正则修改

pull/2/head
Jruome 2023-05-25 15:44:52 +08:00
parent 503e5034d9
commit de63f91e43
3 changed files with 6 additions and 6 deletions

View File

@ -115,7 +115,7 @@
if (!that.mobile) return that.$util.Tips({ if (!that.mobile) return that.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
}); });
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
if (!that.captcha) return that.$util.Tips({ if (!that.captcha) return that.$util.Tips({
@ -156,7 +156,7 @@
if (!that.mobile) return that.$util.Tips({ if (!that.mobile) return that.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
}); });
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
if (!that.captcha) return that.$util.Tips({ if (!that.captcha) return that.$util.Tips({
@ -204,7 +204,7 @@
if (!that.mobile) return that.$util.Tips({ if (!that.mobile) return that.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
}); });
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
await registerVerify(that.mobile, 1) await registerVerify(that.mobile, 1)

View File

@ -88,7 +88,7 @@
if (!this.registerForm.mobile) return this.$util.Tips({ if (!this.registerForm.mobile) return this.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
}); });
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[1-25-9])\d{8}$/g.test(this.registerForm.mobile)) return this.$util.Tips({ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[1-25-9])\d{8}$/g.test(this.registerForm.mobile)) return this.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
if(this.checked.length === 0) return this.$util.Tips({ if(this.checked.length === 0) return this.$util.Tips({

View File

@ -85,7 +85,7 @@
if (!that.account) return that.$util.Tips({ if (!that.account) return that.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
}); });
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.account)) return that.$util.Tips({ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
if (!that.captcha) return that.$util.Tips({ if (!that.captcha) return that.$util.Tips({
@ -114,7 +114,7 @@
if (!that.account) return that.$util.Tips({ if (!that.account) return that.$util.Tips({
title: '请填写手机号码' title: '请填写手机号码'
}); });
if (/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.account)) return that.$util.Tips({ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
await registerVerify(that.account, 3) await registerVerify(that.account, 3)