Commit b4e054bae537a1ca28bd266fbc0634e02e86d5ba

Authored by vking
1 parent cfed92e9

online

@@ -14,6 +14,8 @@ Page({ @@ -14,6 +14,8 @@ Page({
14 pagesHeight:'auto', 14 pagesHeight:'auto',
15 current:0, 15 current:0,
16 currentView:1, 16 currentView:1,
  17 + hasOnlineReserve:false,
  18 + activeTab:'detail',
17 }, 19 },
18 20
19 /** 21 /**
@@ -68,6 +70,7 @@ Page({ @@ -68,6 +70,7 @@ Page({
68 } 70 }
69 this.setData({ 71 this.setData({
70 seller:seller, 72 seller:seller,
  73 + hasOnlineReserve:seller.is_online_reserve==1||true,
71 }) 74 })
72 } 75 }
73 }) 76 })
@@ -240,4 +243,9 @@ Page({ @@ -240,4 +243,9 @@ Page({
240 sub:this.options.hasSellerShare?2:3,//关系类型:1/2/3 邀请关系/商户端分享关系/C端分享关系 243 sub:this.options.hasSellerShare?2:3,//关系类型:1/2/3 邀请关系/商户端分享关系/C端分享关系
241 }) 244 })
242 }, 245 },
  246 + switchTabs(e){
  247 + this.setData({
  248 + activeTab:util.attr(e,'act'),
  249 + })
  250 + },
243 }) 251 })
1 <!--pages/reserve/detail.wxml--> 1 <!--pages/reserve/detail.wxml-->
2 <nav>{{seller.sellername}}</nav> 2 <nav>{{seller.sellername}}</nav>
3 -<view class="seller-banner">  
4 - <swiper  
5 - indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"  
6 - interval="2000" duration="500"  
7 - previous-margin="{{0}}px" next-margin="{{0}}px"  
8 - current="{{current}}" bindchange="bindtransition" bindtap="reviweBanner">  
9 - <block wx:for="{{seller.envi_image}}" wx:key="sellers.key">  
10 - <swiper-item>  
11 - <image class="image" mode="aspectFill"  
12 - src="{{item}}?imageView2/2/w/860/interlace/0/q/100" ></image>  
13 - </swiper-item>  
14 - </block>  
15 - </swiper>  
16 - <view class="slogan" wx:if="{{seller.slogan}}">  
17 - <view class="slogan-view flex-ll">  
18 - <view class="dot"></view>  
19 - <view>{{seller.slogan}}</view>  
20 - </view> 3 +<view class="tabs flex-lr" wx:if="{{hasOnlineReserve}}">
  4 + <view class="tabs-item flex-vc" bindtap="switchTabs" data-act="detail">
  5 + <view class="tabs-item-text {{activeTab=='detail'?'active':''}}">餐厅详情</view>
  6 + </view>
  7 + <view class="tabs-item flex-vc" bindtap="switchTabs" data-act="reserve">
  8 + <view class="tabs-item-text {{activeTab=='reserve'?'active':''}}">包间预订</view>
21 </view> 9 </view>
22 - <view class="swiper-num" wx:if="{{seller.envi_image.length>0}}">{{currentView}} / {{seller.envi_image.length}}</view>  
23 </view> 10 </view>
24 -<view class="pages" style="height: {{pagesHeight}};overflow:{{pagesHeight=='auto'?'visible':'hidden'}}">  
25 - <view class="seller">  
26 - <view class="base">  
27 - <view class="name Semibold flex-lr">  
28 - <view class="name-info">{{seller.sellername}}  
29 - <view class="broad" wx:if="{{seller.brand}}">  
30 - <view class="broad-1"></view>  
31 - <view class="broad-2">{{seller.brand.name}}</view>  
32 - <view class="broad-3"></view> 11 +<block wx:if="{{activeTab=='detail'}}">
  12 + <view class="seller-banner" style="{{hasOnlineReserve?'margin-top: 80rpx;':''}}">
  13 + <swiper
  14 + indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
  15 + interval="2000" duration="500"
  16 + previous-margin="{{0}}px" next-margin="{{0}}px"
  17 + current="{{current}}" bindchange="bindtransition" bindtap="reviweBanner">
  18 + <block wx:for="{{seller.envi_image}}" wx:key="sellers.key">
  19 + <swiper-item>
  20 + <image class="image" mode="aspectFill"
  21 + src="{{item}}?imageView2/2/w/860/interlace/0/q/100" ></image>
  22 + </swiper-item>
  23 + </block>
  24 + </swiper>
  25 + <view class="slogan" wx:if="{{seller.slogan}}">
  26 + <view class="slogan-view flex-ll">
  27 + <view class="dot"></view>
  28 + <view>{{seller.slogan}}</view>
  29 + </view>
  30 + </view>
  31 + <view class="swiper-num" wx:if="{{seller.envi_image.length>0}}">{{currentView}} / {{seller.envi_image.length}}</view>
  32 + </view>
  33 + <view class="pages" style="height: {{pagesHeight}};overflow:{{pagesHeight=='auto'?'visible':'hidden'}}">
  34 + <view class="seller">
  35 + <view class="base">
  36 + <view class="name Semibold flex-lr">
  37 + <view class="name-info">{{seller.sellername}}
  38 + <view class="broad" wx:if="{{seller.brand}}">
  39 + <view class="broad-1"></view>
  40 + <view class="broad-2">{{seller.brand.name}}</view>
  41 + <view class="broad-3"></view>
  42 + </view>
33 </view> 43 </view>
  44 + <view class="average" wx:if="{{seller.average>0}}">¥{{seller.average}}/人</view>
  45 + </view>
  46 + <view class="ping flex-ll">
  47 + <view class="item" wx:if="{{seller.cate.length>0}}">{{seller.cate[0]}}</view>
  48 + <view class="item" wx:if="{{seller.is_belt_wine!=0}}">{{seller.is_belt_wine==1?'不可带酒水':'可自带酒水'}}</view>
  49 + <view class="item" wx:if="{{seller.is_parking==1}}">停车场</view>
  50 + <view class="item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
  51 + </view>
  52 + <view class="label_c" wx:if="{{seller.label_cstr}}">
  53 + <text class="label_text" >{{seller.label_cstr}}</text>
34 </view> 54 </view>
35 - <view class="average" wx:if="{{seller.average>0}}">¥{{seller.average}}/人</view>  
36 - </view>  
37 - <view class="ping flex-ll">  
38 - <view class="item" wx:if="{{seller.cate.length>0}}">{{seller.cate[0]}}</view>  
39 - <view class="item" wx:if="{{seller.is_belt_wine!=0}}">{{seller.is_belt_wine==1?'不可带酒水':'可自带酒水'}}</view>  
40 - <view class="item" wx:if="{{seller.is_parking==1}}">停车场</view>  
41 - <view class="item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>  
42 - </view>  
43 - <view class="label_c" wx:if="{{seller.label_cstr}}">  
44 - <text class="label_text" >{{seller.label_cstr}}</text>  
45 </view> 55 </view>
46 - </view>  
47 - <view class="addr flex-lr" bindtap="lookLocation">  
48 - <view class="addr-view">  
49 - <view class="addr-text flex-ll">  
50 - <image src="http://qn.colorcun.com/custom/lite-online/image/%E5%AE%9A%E4%BD%8D.png"></image>  
51 - <view class="text">{{seller.real_address||seller.map_address}}</view> 56 + <view class="addr flex-lr" bindtap="lookLocation">
  57 + <view class="addr-view">
  58 + <view class="addr-text flex-ll">
  59 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E5%AE%9A%E4%BD%8D.png"></image>
  60 + <view class="text">{{seller.real_address||seller.map_address}}</view>
  61 + </view>
  62 + <view class="addr-long">{{seller.distanceStr?'距您'+seller.distanceStr:''}}</view>
52 </view> 63 </view>
53 - <view class="addr-long">{{seller.distanceStr?'距您'+seller.distanceStr:''}}</view> 64 + <view class="more more-addr"></view>
54 </view> 65 </view>
55 - <view class="more more-addr"></view>  
56 </view> 66 </view>
57 - </view>  
58 - <view class="black20line"></view>  
59 - <view class="seller">  
60 - <formids wx:if="{{seller.activity.length>0}}" bindclick="showDiscount">  
61 - <view class="activity-view-easy flex-lr" >  
62 - <view class="activity-left flex-ll">  
63 - <view class="icon"></view>  
64 - <block wx:for="{{seller.activity}}"  
65 - wx:key="seller.activity.key"  
66 - wx:if="{{index<2}}">  
67 - <view class="discount" >{{item.title}}</view>  
68 - </block>  
69 - </view>  
70 - <view class="flex-rr activity-right">  
71 - <view class="more-text">更多</view>  
72 - <view class="more"></view> 67 + <view class="black20line"></view>
  68 + <view class="seller">
  69 + <formids wx:if="{{seller.activity.length>0}}" bindclick="showDiscount">
  70 + <view class="activity-view-easy flex-lr" >
  71 + <view class="activity-left flex-ll">
  72 + <view class="icon"></view>
  73 + <block wx:for="{{seller.activity}}"
  74 + wx:key="seller.activity.key"
  75 + wx:if="{{index<2}}">
  76 + <view class="discount" >{{item.title}}</view>
  77 + </block>
  78 + </view>
  79 + <view class="flex-rr activity-right">
  80 + <view class="more-text">更多</view>
  81 + <view class="more"></view>
  82 + </view>
73 </view> 83 </view>
74 - </view>  
75 - </formids>  
76 - <!--  
77 - <formids wx:if="{{seller.activity.length>0}}" bindclick="showDiscount">  
78 - <view class="activity-view" >  
79 - <view class="activity" >  
80 - <view class="flex-lr">  
81 - <view class="activity-left">  
82 - <view class="activity-first flex-ll" style="align-items: flex-start">  
83 - <image src="http://qn.colorcun.com/custom/lite-online/image%E5%96%87%E5%8F%AD.png"></image>  
84 - <view class="flex-cc discount" wx:for="{{seller.activity}}"  
85 - wx:key="seller.activity.key"  
86 - wx:if="{{index<2}}">  
87 - <view class="discount-left"></view>  
88 - <view class="discount-text">{{item.title}}</view>  
89 - <view class="discount-right"></view> 84 + </formids>
  85 + <!--
  86 + <formids wx:if="{{seller.activity.length>0}}" bindclick="showDiscount">
  87 + <view class="activity-view" >
  88 + <view class="activity" >
  89 + <view class="flex-lr">
  90 + <view class="activity-left">
  91 + <view class="activity-first flex-ll" style="align-items: flex-start">
  92 + <image src="http://qn.colorcun.com/custom/lite-online/image%E5%96%87%E5%8F%AD.png"></image>
  93 + <view class="flex-cc discount" wx:for="{{seller.activity}}"
  94 + wx:key="seller.activity.key"
  95 + wx:if="{{index<2}}">
  96 + <view class="discount-left"></view>
  97 + <view class="discount-text">{{item.title}}</view>
  98 + <view class="discount-right"></view>
  99 + </view>
90 </view> 100 </view>
91 </view> 101 </view>
  102 + <view class="activity-right flex-rr Semibold">
  103 + <view></view>
  104 + <view class="more"></view>
  105 + </view>
92 </view> 106 </view>
93 - <view class="activity-right flex-rr Semibold">  
94 - <view></view>  
95 - <view class="more"></view> 107 + <view class="activity-text">
  108 + 该优惠仅适用于一键订平台预订客户
96 </view> 109 </view>
97 </view> 110 </view>
98 - <view class="activity-text">  
99 - 该优惠仅适用于一键订平台预订客户  
100 - </view>  
101 </view> 111 </view>
102 - </view>  
103 - </formids>  
104 - -->  
105 - </view>  
106 - <view class="black20line"></view>  
107 - <view class="block" wx:if="{{seller.room_image.length>0}}">  
108 - <view class="header flex-ll">  
109 - <view class="line"></view>  
110 - <view class="name">包间环境</view> 112 + </formids>
  113 + -->
111 </view> 114 </view>
112 - <scroll-view  
113 - scroll-x  
114 - class="baos"  
115 - scroll-into-view="{{toView}}"  
116 - scroll-top="{{scrollTop}}"  
117 - > 115 + <view class="black20line"></view>
  116 + <view class="block" wx:if="{{seller.room_image.length>0}}">
  117 + <view class="header flex-ll">
  118 + <view class="line"></view>
  119 + <view class="name">包间环境</view>
  120 + </view>
  121 + <scroll-view
  122 + scroll-x
  123 + class="baos"
  124 + scroll-into-view="{{toView}}"
  125 + scroll-top="{{scrollTop}}"
  126 + >
118 127
119 - <block wx:for="{{seller.room_image}}" wx:key="sellers.key">  
120 - <view class="image">  
121 - <image mode="aspectFill" bindtap="reviweRoomImage" data-current="{{item}}"  
122 - src="{{item}}?imageView2/2/w/640/interlace/0/q/100"></image>  
123 - </view>  
124 - </block> 128 + <block wx:for="{{seller.room_image}}" wx:key="sellers.key">
  129 + <view class="image">
  130 + <image mode="aspectFill" bindtap="reviweRoomImage" data-current="{{item}}"
  131 + src="{{item}}?imageView2/2/w/640/interlace/0/q/100"></image>
  132 + </view>
  133 + </block>
125 134
126 - </scroll-view>  
127 - </view>  
128 - <view class="block" wx:if="{{seller.dishes.length>0}}">  
129 - <view class="header flex-ll">  
130 - <view class="line"></view>  
131 - <view class="name">推荐菜品</view> 135 + </scroll-view>
132 </view> 136 </view>
133 - <scroll-view  
134 - scroll-x  
135 - class="cais"  
136 - scroll-into-view="{{toView}}"  
137 - scroll-top="{{scrollTop}}"  
138 - >  
139 - <block wx:for="{{seller.dishes}}" wx:key="sellers.key">  
140 - <view class="cais-views" wx:if="{{item.image}}">  
141 - <view class="image-view" >  
142 - <view class="image">  
143 - <image mode="aspectFill" bindtap="reviweDishesImage" data-current="{{item.image}}"  
144 - src="{{item.image}}?imageView2/2/w/640/interlace/0/q/100"></image> 137 + <view class="block" wx:if="{{seller.dishes.length>0}}">
  138 + <view class="header flex-ll">
  139 + <view class="line"></view>
  140 + <view class="name">推荐菜品</view>
  141 + </view>
  142 + <scroll-view
  143 + scroll-x
  144 + class="cais"
  145 + scroll-into-view="{{toView}}"
  146 + scroll-top="{{scrollTop}}"
  147 + >
  148 + <block wx:for="{{seller.dishes}}" wx:key="sellers.key">
  149 + <view class="cais-views" wx:if="{{item.image}}">
  150 + <view class="image-view" >
  151 + <view class="image">
  152 + <image mode="aspectFill" bindtap="reviweDishesImage" data-current="{{item.image}}"
  153 + src="{{item.image}}?imageView2/2/w/640/interlace/0/q/100"></image>
  154 + </view>
  155 + <view class="text Semibold">{{item.name}}</view>
145 </view> 156 </view>
146 - <view class="text Semibold">{{item.name}}</view>  
147 </view> 157 </view>
  158 + </block>
  159 + </scroll-view>
  160 + <view class="cais-text">
  161 + <block wx:for="{{seller.dishes}}" wx:key="sellers.key">
  162 + <view wx:if="{{!item.image}}">{{item.name}}</view>
  163 + </block>
148 </view> 164 </view>
149 - </block>  
150 - </scroll-view>  
151 - <view class="cais-text">  
152 - <block wx:for="{{seller.dishes}}" wx:key="sellers.key">  
153 - <view wx:if="{{!item.image}}">{{item.name}}</view>  
154 - </block>  
155 </view> 165 </view>
156 </view> 166 </view>
157 -</view>  
158 -<view class="footer flex-lr">  
159 - <view class="left flex-cc">  
160 - <formids class="flex-tb" url="/pages/customer/index">  
161 - <image src="http://qn.colorcun.com/custom/lite-online/image/%E9%A6%96%E9%A1%B5.png"></image>  
162 - <view class="text">首页</view>  
163 - </formids>  
164 - <userinfo class="follow flex-tb" binduserinfo="follow">  
165 - <image src="http://qn.colorcun.com/custom/lite-online/image/%E6%94%B6%E8%97%8F.png" wx:if="{{!IsCollectionSeller}}"></image>  
166 - <image src="http://qn.colorcun.com/custom/lite-online/image/%E5%B7%B2%E6%94%B6%E8%97%8F.png" wx:else=""></image>  
167 - <view class="text">收藏</view>  
168 - </userinfo>  
169 - </view>  
170 - <view class="reserve share flex-vc">  
171 - <userinfo class="flex-vc" style="width: 100%" binduserinfo="shareUserinfo">  
172 - <view class="text">分享</view>  
173 - </userinfo>  
174 - </view>  
175 - <view class="reserve">  
176 - <formids class="flex-vc" bindclick="reserve" id="reserve-button">  
177 - <view class="text">电话预订</view>  
178 - </formids> 167 + <view class="footer flex-lr">
  168 + <view class="left flex-cc">
  169 + <formids class="flex-tb" url="/pages/customer/index">
  170 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E9%A6%96%E9%A1%B5.png"></image>
  171 + <view class="text">首页</view>
  172 + </formids>
  173 + <userinfo class="follow flex-tb" binduserinfo="follow">
  174 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E6%94%B6%E8%97%8F.png" wx:if="{{!IsCollectionSeller}}"></image>
  175 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E5%B7%B2%E6%94%B6%E8%97%8F.png" wx:else=""></image>
  176 + <view class="text">收藏</view>
  177 + </userinfo>
  178 + </view>
  179 + <view class="reserve share flex-vc">
  180 + <userinfo class="flex-vc" style="width: 100%" binduserinfo="shareUserinfo">
  181 + <view class="text">分享</view>
  182 + </userinfo>
  183 + </view>
  184 + <view class="reserve">
  185 + <formids class="flex-vc" bindclick="reserve" id="reserve-button">
  186 + <view class="text">电话预订</view>
  187 + </formids>
  188 + </view>
  189 +
179 </view> 190 </view>
  191 + <as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预订</as>
  192 + <getpos bindpos="onpos" id="getpos"></getpos>
  193 + <discount id="discount" seller="{{seller}}" bindhide="discountHide" bindshow="discountShow"></discount>
  194 + <share id="share" seller_id="{{seller.id}}"></share>
  195 +</block>
  196 +<block wx:if="{{activeTab=='reserve'}}">
  197 + <view class="olreserve">
180 198
181 -</view>  
182 -<as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预订</as>  
183 -<getpos bindpos="onpos" id="getpos"></getpos>  
184 -<discount id="discount" seller="{{seller}}" bindhide="discountHide" bindshow="discountShow"></discount>  
185 -<share id="share" seller_id="{{seller.id}}"></share>  
  199 + </view>
  200 +</block>
@@ -467,4 +467,30 @@ @@ -467,4 +467,30 @@
467 } 467 }
468 .activity-view-easy .discount:last-child{ 468 .activity-view-easy .discount:last-child{
469 border-right-width: 0; 469 border-right-width: 0;
470 -}  
  470 +}
  471 +
  472 +.tabs{
  473 + height: 80rpx;
  474 + position: fixed;
  475 + line-height: 80rpx;
  476 + width: 100%;
  477 + background-color: #ffffff;
  478 + z-index: 9;
  479 +}
  480 +.tabs-item{
  481 + width: 50%;
  482 +}
  483 +.tabs-item-text{
  484 + height: 76rpx;
  485 + border-bottom: 4rpx solid #ffffff;
  486 + font-size: 30rpx;
  487 + color: #353535;
  488 +}
  489 +.tabs-item-text.active{
  490 + border-color: #C0A369;
  491 + color: #C0A369;
  492 + font-weight: bold;
  493 +}
  494 +.olreserve{
  495 + margin-top: 80rpx;
  496 +}