Commit 1e484363 authored by ziyu's avatar ziyu

improvement: 优化

parent ee2f2d9a
...@@ -121,10 +121,15 @@ ...@@ -121,10 +121,15 @@
Notify({message: '请填写收货人', background:'#FF5D15'}); Notify({message: '请填写收货人', background:'#FF5D15'});
return; return;
} }
let reg = /^1\d{10}$/
if(!this.phone){ if(!this.phone){
Notify({message: '请填写手机号码', background:'#FF5D15'}); Notify({message: '请填写手机号码', background:'#FF5D15'});
return; return;
} }
if(!reg.test(this.phone)) {
Notify({message: '请填写正确的手机号码', background:'#FF5D15'});
return;
}
if(!this.city){ if(!this.city){
Notify({message: '请选择所在地区', background:'#FF5D15'}); Notify({message: '请选择所在地区', background:'#FF5D15'});
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment