Commit 57db7d761404f89e008ff87f7a359fe1e8278aea

Authored by vking
1 parent df74cd63

online

@@ -81,8 +81,7 @@ Component({ @@ -81,8 +81,7 @@ Component({
81 App.Customer.GetHouseFullDateTimes(parmdata).then((json)=>{ 81 App.Customer.GetHouseFullDateTimes(parmdata).then((json)=>{
82 console.log(json) 82 console.log(json)
83 if(json.ret==200){ 83 if(json.ret==200){
84 - let houseFull=JSON.parse(json.data);  
85 - this.getdurlist(houseFull); 84 + this.getdurlist(json.data);
86 } 85 }
87 }) 86 })
88 }, 87 },
@@ -71,6 +71,7 @@ Page({ @@ -71,6 +71,7 @@ Page({
71 this.setData({ 71 this.setData({
72 seller:seller, 72 seller:seller,
73 hasOnlineReserve:seller.is_online_reserve==1||true, 73 hasOnlineReserve:seller.is_online_reserve==1||true,
  74 + activeTab:options.activeTab||'detail',
74 }) 75 })
75 } 76 }
76 }) 77 })
@@ -258,6 +259,13 @@ Page({ @@ -258,6 +259,13 @@ Page({
258 console.log(e); 259 console.log(e);
259 this.reserve.pnum=e.detail.people; 260 this.reserve.pnum=e.detail.people;
260 if(e.detail.action=='click'){ 261 if(e.detail.action=='click'){
  262 +
  263 + }
  264 + },
  265 + selecttime(e){
  266 + console.log(e);
  267 + this.reserve.time=e.detail.time;
  268 + if(e.detail.action=='click'){
261 this.reserve.sid=this.options.id 269 this.reserve.sid=this.options.id
262 this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00') 270 this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00')
263 wx.navigateTo({ 271 wx.navigateTo({
@@ -265,4 +273,7 @@ Page({ @@ -265,4 +273,7 @@ Page({
265 }) 273 })
266 } 274 }
267 }, 275 },
  276 + selectdate(e){
  277 + console.log(e);
  278 + }
268 }) 279 })
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 "discount":"/components/reserve/discount", 13 "discount":"/components/reserve/discount",
14 "share":"/components/reserve/share/share", 14 "share":"/components/reserve/share/share",
15 "people":"/components/reserve/people/people", 15 "people":"/components/reserve/people/people",
16 - "dur":"/components/reserve/dur/dur" 16 + "dur":"/components/reserve/dur/dur",
  17 + "calendar":"/components/reserve/calendar/calendar"
17 } 18 }
18 } 19 }
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <view class="tabs-item-text {{activeTab=='reserve'?'active':''}}">包间预订</view> 9 <view class="tabs-item-text {{activeTab=='reserve'?'active':''}}">包间预订</view>
10 </view> 10 </view>
11 </view> 11 </view>
12 -<block wx:if="{{activeTab=='detail'}}"> 12 +<view hidden="{{activeTab!='detail'}}" wx:if="{{seller.id}}">
13 <view class="seller-banner" style="{{hasOnlineReserve?'margin-top: 80rpx;':''}}"> 13 <view class="seller-banner" style="{{hasOnlineReserve?'margin-top: 80rpx;':''}}">
14 <swiper 14 <swiper
15 indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}" 15 indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
@@ -193,9 +193,11 @@ @@ -193,9 +193,11 @@
193 <getpos bindpos="onpos" id="getpos"></getpos> 193 <getpos bindpos="onpos" id="getpos"></getpos>
194 <discount id="discount" seller="{{seller}}" bindhide="discountHide" bindshow="discountShow"></discount> 194 <discount id="discount" seller="{{seller}}" bindhide="discountHide" bindshow="discountShow"></discount>
195 <share id="share" seller_id="{{seller.id}}"></share> 195 <share id="share" seller_id="{{seller.id}}"></share>
196 -</block>  
197 -<block wx:if="{{activeTab=='reserve'}}"> 196 +</view>
  197 +<view hidden="{{activeTab!='reserve'}}" wx:if="{{seller.id}}">
198 <view class="olreserve"> 198 <view class="olreserve">
  199 + <calendar seller="{{seller}}" bindselectdate="selectdate"></calendar>
199 <people seller="{{seller}}" bindselectpeople="selectpeople"></people> 200 <people seller="{{seller}}" bindselectpeople="selectpeople"></people>
  201 + <dur seller="{{seller}}" bindselecttime="selecttime"></dur>
200 </view> 202 </view>
201 -</block>  
  203 +</view>
@@ -463,13 +463,13 @@ @@ -463,13 +463,13 @@
463 "query": "sid=1&ddate=1234567890&pnum=10", 463 "query": "sid=1&ddate=1234567890&pnum=10",
464 "scene": null 464 "scene": null
465 }, 465 },
466 - {  
467 - "id": 56,  
468 - "name": "测试组件",  
469 - "pathName": "pages/reserve/detail",  
470 - "query": "id=154",  
471 - "scene": null  
472 - }, 466 + {
  467 + "id": 56,
  468 + "name": "测试组件",
  469 + "pathName": "pages/reserve/detail",
  470 + "query": "id=154&activeTab=reserve",
  471 + "scene": null
  472 + },
473 { 473 {
474 "id": 57, 474 "id": 57,
475 "name": "pages/customer/detail_owner", 475 "name": "pages/customer/detail_owner",