Commit 6288bc564e9460265b8bbdf0fdb77c7ad91382c3

Authored by vking
1 parent 6dd0beb4

fixbug【周到安排小程序,198的电话无法下单和添加联系人】https://www.tapd.cn/57419716/bugtrace/bugs/view?…

…bug_id=1157419716001003607
... ... @@ -66,8 +66,11 @@ Page({
return util.toast('请填写预定人','none')
}
if(!this.user.phone){
return util.toast('请填写正确的手机号','none')
return util.toast('请填写手机号','none')
}
if(!/^[1][3-9][0-9]{9}$/.test(this.user.phone)){
return util.toast('请填写正确的手机号','none')
}
App.Customer.SetCustomerInfo({
...this.user
}).then(res=>{
... ... @@ -89,13 +92,6 @@ Page({
val = util.attr(e, 'val');
console.log(val)
} else {
if(key=='phone'){
console.log('key',key)
let myreg=/^[1][3-9][0-9]{9}$/;
if(!myreg.test(util.val(e))){
return util.val(e);
}
}
val = util.val(e);
}
this.user[key] = val;
... ...
... ... @@ -113,12 +113,6 @@ Page({
if (key == 'sex') {
val = util.attr(e, 'val');
} else {
if(key=='phone'){
let myreg=/^[1][3-9][0-9]{9}$/;
if(!myreg.test(util.val(e))){
return util.val(e);
}
}
val = util.val(e);
}
this.user[key] = val;
... ... @@ -135,6 +129,9 @@ Page({
return util.toast('请填写姓名','none')
}
if(!this.user.phone){
return util.toast('请填写手机号','none')
}
if(!/^[1][3-9][0-9]{9}$/.test(this.user.phone)){
return util.toast('请填写正确的手机号','none')
}
this.hasSubmit=false;
... ...