Commit 8c2bd4a9e549b645a2373abd1335b6bdcaa7804e

Authored by vking
1 parent 76ae4df4

online

... ... @@ -74,7 +74,7 @@ Component({
if (this.data.detail.tableFirst) {
tableSubInfo = (this.data.detail.tableFirst || '') + ' ' + (this.data.detail.tableSubInfo || '');
tableFirst = this.data.detail.tableFirst
} else if(this.data.detail.tables.length>0) {
} else if(this.data.detail.tables && this.data.detail.tables.length>0) {
tableFirst = this.data.detail.tables[0].name
tableSubInfo = this.data.detail.tables[0].name;
if (this.data.detail.tables.length > 1) {
... ...
... ... @@ -255,25 +255,30 @@ Page({
})
},
reserve:{},
selectpeople(e){
selectpeople(e){//人数改变
console.log(e);
this.reserve.pnum=e.detail.people;
if(e.detail.action=='click'){
}
},
selecttime(e){
selecttime(e){//时间改变
console.log(e);
this.reserve.time=e.detail.time;
if(e.detail.action=='click'){
this.reserve.sid=this.options.id
this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00')
//date=2019-07-25&pnum=6&time=20%3A00&sid=154&ddate=1564056000
wx.navigateTo({
url:util.http_build_query(this.reserve,'./submit')
})
}
},
selectdate(e){
selectdate(e){//日期改变
console.log(e);
this.reserve.date=e.detail.date;
this.setData({
reserveDate:e.detail.date
})
}
})
\ No newline at end of file
... ...
... ... @@ -198,6 +198,6 @@
<view class="olreserve">
<calendar seller="{{seller}}" bindselectdate="selectdate"></calendar>
<people seller="{{seller}}" bindselectpeople="selectpeople"></people>
<dur seller="{{seller}}" bindselecttime="selecttime"></dur>
<dur seller="{{seller}}" date="{{reserveDate}}" bindselecttime="selecttime"></dur>
</view>
</view>
\ No newline at end of file
... ...