Commit 09726eb7aae6c6c52aaa49194c71c85518b5779f

Authored by liuxuqinfhp1220
1 parent 5ae2d7fd

no message

... ... @@ -65,6 +65,9 @@ Page({
if(!this.user.name){
return util.toast('请填写预定人','none')
}
if(!this.user.phone){
return util.toast('请填写正确的手机号','none')
}
App.Customer.SetCustomerInfo({
...this.user
}).then(res=>{
... ... @@ -84,6 +87,13 @@ Page({
val = util.attr(e, 'val');
console.log(val)
} else {
if(key=='phone'){
console.log('key',key)
let myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
if(!myreg.test(util.val(e))){
return util.val(e);
}
}
val = util.val(e);
}
this.user[key] = val;
... ...
... ... @@ -38,7 +38,7 @@
data-key="phone"
type="number"
value="{{user.phone}}"
placeholder-class="input-pl" maxlength="20"/>
placeholder-class="input-pl" maxlength="11"/>
</view>
<view class="flex-rr">
<!-- 一键获取 -->
... ...
... ... @@ -109,6 +109,12 @@ Page({
if (key == 'sex') {
val = util.attr(e, 'val');
} else {
if(key=='phone'){
let myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
if(!myreg.test(util.val(e))){
return util.val(e);
}
}
val = util.val(e);
}
this.user[key] = val;
... ... @@ -124,7 +130,7 @@ Page({
return util.toast('请填写姓名','none')
}
if(!this.user.phone){
return util.toast('请填写手机','none')
return util.toast('请填写正确的手机号','none')
}
this.hasSubmit=false;
let roomids=[];
... ...
... ... @@ -58,7 +58,7 @@
data-key="phone"
type="number"
value="{{user.phone}}"
placeholder-class="input-pl" maxlength="20"/>
placeholder-class="input-pl" maxlength="11"/>
<view class="flex-rr">
<!-- 一键获取 -->
<phone bindgetphone="getphone">
... ...