Commit eb63e538b1d46613cee75620eab962efb068d5d6

Authored by vking
2 parents 2dbd50f0 186f297f

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pages/customer/detail_owner.js
... ... @@ -21,10 +21,9 @@ Component({
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
this.getsectionlist();
if(today==newdate){
this.markoversection();
if(this.data.section){
this.changesectionstyle(this.data.section);
}else{
this.markoversection();
}
}else{
if(this.data.section){
... ... @@ -85,9 +84,11 @@ Component({
}
})
console.log(interval)
if(interval.length>0){
sectionlist[interval[0].index].isselected=true;
this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index)
if(!this.data.section){
if(interval.length>0){
sectionlist[interval[0].index].isselected=true;
this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index)
}
}
this.setData({
sectionlist:sectionlist
... ...
... ... @@ -15,6 +15,7 @@ Page({
console.log('selectdate',e);
this.setData({
reserveDate:e.detail.date,
reserveSection:e.detail.action=='click' ? null : this.data.reserveSection
})
},
//时段改变
... ...
... ... @@ -211,7 +211,6 @@ Page({
rid: this.id
}).then(res => {
let detail=this.formatDatail(res.data)
//detail.room_demand=JSON.parse(detail.room_demand);
detail.ddate_solt=Number(detail.ddate_solt);
this.setData({
detail: detail,
... ...
... ... @@ -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">
<!-- 一键获取 -->
... ...
... ... @@ -281,7 +281,6 @@ Page({
reserveSection:e.detail.section,
seletroomlist:e.detail.action=='click' ? [] : this.data.seletroomlist,
})
this.reserve.selectroom=e.detail.action=='click' ? [] : this.reserve.selectroom;
clearTimeout(t);
},0)
... ... @@ -294,15 +293,14 @@ Page({
this.setData({
seletroomlist:e.detail.selectroom
})
this.reserve.selectroom=e.detail.selectroom;
},
complete(){
if(!this.reserve.selectroom || (this.reserve.selectroom && this.reserve.selectroom.length==0)){
if(!this.data.seletroomlist || (this.data.seletroomlist && this.data.seletroomlist.length==0)){
return util.toast('请选择包间类型','none');
}
this.reserve.sid=this.options.id
this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00');
this.reserve.room_demand=JSON.stringify(this.reserve.selectroom)
this.reserve.room_demand=JSON.stringify(this.data.seletroomlist)
wx.navigateTo({
url:util.http_build_query(this.reserve,'./submit')
})
... ... @@ -337,7 +335,6 @@ Page({
})
}
this.reserve.date=e.detail.date;
this.reserve.selectroom=e.detail.action=='click' ? [] : this.reserve.selectroom;
this.setData({
reserveDate:e.detail.date,
seletroomlist:e.detail.action=='click' ? [] : this.data.seletroomlist,
... ...
... ... @@ -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">
... ...
... ... @@ -49,13 +49,13 @@
"list": []
},
"miniprogram": {
"current": 56,
"current": 0,
"list": [
{
"id": 0,
"name": "预订本-商家1",
"pathName": "pack-book/pages/book/b_index",
"query": "seller_id=80&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
"query": "seller_id=154&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
"scene": 1001
},
{
... ...