Commit d0b3c389ffb23530ae727f4fae626e5947556567

Authored by vking
1 parent 6705d1fe

shafa

@@ -58,6 +58,7 @@ Component({ @@ -58,6 +58,7 @@ Component({
58 }, 58 },
59 hasNewActivityList:Boolean,//新的活动商家列表 59 hasNewActivityList:Boolean,//新的活动商家列表
60 hasInSwiper:Boolean,//是否在Swiper控件内,不能使用组件电话框,只能通知页面 60 hasInSwiper:Boolean,//是否在Swiper控件内,不能使用组件电话框,只能通知页面
  61 + hasShafa:Boolean,// 沙发按钮
61 }, 62 },
62 63
63 /** 64 /**
@@ -125,6 +126,12 @@ Component({ @@ -125,6 +126,12 @@ Component({
125 } 126 }
126 url=util.http_build_query(findSellerParamObj,url) 127 url=util.http_build_query(findSellerParamObj,url)
127 } 128 }
  129 + if(this.data.hasShafa){
  130 + url=util.http_build_query({
  131 + classID:util.attr(e,'cid'),
  132 + className:util.attr(e,'cname'),
  133 + },url)
  134 + }
128 return wx.navigateTo({ 135 return wx.navigateTo({
129 url:url, 136 url:url,
130 }) 137 })
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 "usingComponents": { 3 "usingComponents": {
4 "formids":"/components/formids/formids", 4 "formids":"/components/formids/formids",
5 "as-phone":"/components/actionSheet/phone", 5 "as-phone":"/components/actionSheet/phone",
6 - "stat":"/components/stat/stat" 6 + "stat":"/components/stat/stat",
  7 + "shafa":"./shafa"
7 } 8 }
8 } 9 }
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <view class="room_num" wx:if="{{false}}">{{seller.room_num}}个包间</view> 7 <view class="room_num" wx:if="{{false}}">{{seller.room_num}}个包间</view>
8 <view class="room_num hasBrand Semibold" wx:if="{{hasBrand && seller.brand}}">{{seller.brand.name}}</view> 8 <view class="room_num hasBrand Semibold" wx:if="{{hasBrand && seller.brand}}">{{seller.brand.name}}</view>
9 </view> 9 </view>
10 - <view class="info flex-tb"> 10 + <view class="info flex-tb" style="{{hasShafa?'padding-bottom: 0;height:290rpx;':''}}">
11 <view style="max-width: 100%;width: 100%;"> 11 <view style="max-width: 100%;width: 100%;">
12 <view class="name Semibold flex-ll"> 12 <view class="name Semibold flex-ll">
13 <view class="sellername">{{seller.sellername}}</view> 13 <view class="sellername">{{seller.sellername}}</view>
@@ -89,7 +89,19 @@ @@ -89,7 +89,19 @@
89 <text class="reserve-text" wx:else="">联系餐厅</text> 89 <text class="reserve-text" wx:else="">联系餐厅</text>
90 </view> 90 </view>
91 --> 91 -->
92 - <view class="reserve-button flex-vc" id="reserve-button" catchtap="tapButton" data-type="oncall"> 92 + <scroll-view class="scroll-view_H"
  93 + wx:if="{{hasShafa}}"
  94 + scroll-x="true" catchtap="catchtap">
  95 + <shafa class="scroll-view-item_H"
  96 + catchtap="tapButton" data-type="oncall"
  97 + data-cid="{{item.id}}" data-cname="{{item.name}}"
  98 + wx:for="{{se.class}}" wx:key="se-class">
  99 + {{item.name}}
  100 + </shafa>
  101 + </scroll-view>
  102 + <view class="reserve-button flex-vc"
  103 + wx:else=""
  104 + id="reserve-button" catchtap="tapButton" data-type="oncall">
93 订包间 105 订包间
94 </view> 106 </view>
95 </view> 107 </view>
@@ -333,4 +333,16 @@ @@ -333,4 +333,16 @@
333 font-weight:400; 333 font-weight:400;
334 color:rgba(231,42,38,1); 334 color:rgba(231,42,38,1);
335 line-height:34rpx; 335 line-height:34rpx;
  336 +}
  337 +.scroll-view_H{
  338 + white-space: nowrap;
  339 + height: 100rpx;
  340 + overflow-y: hidden;
  341 +}
  342 +.scroll-view-item_H{
  343 + display: inline-block;
  344 + margin-right: 20rpx;
  345 +}
  346 +.scroll-view-item_H:last-child{
  347 + margin-right: 0;
336 } 348 }
  1 +// components/reserve/seller-box-transverse/shafa.js
  2 +Component({
  3 + /**
  4 + * 组件的属性列表
  5 + */
  6 + properties: {
  7 +
  8 + },
  9 +
  10 + /**
  11 + * 组件的初始数据
  12 + */
  13 + data: {
  14 +
  15 + },
  16 +
  17 + /**
  18 + * 组件的方法列表
  19 + */
  20 + methods: {
  21 +
  22 + }
  23 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/reserve/seller-box-transverse/shafa.wxml-->
  2 +<view class="shafa flex-vc">
  3 + <view class="shafa-bei"><slot></slot></view>
  4 + <view class="shafa-dian"></view>
  5 + <view class="shafa-dian2"></view>
  6 + <view class="shafa-fushou flex-lr"></view>
  7 + <view class="shafa-tui flex-lr"></view>
  8 +</view>
  1 +/* components/reserve/seller-box-transverse/shafa.wxss */
  2 +@import "../../../app.wxss";
  3 +.shafa{
  4 + position: relative;
  5 + height: 56rpx;
  6 +}
  7 +.shafa-bei{
  8 + height:38rpx;
  9 + background:rgba(249,142,71,1);
  10 + border-radius:10rpx 10rpx 6rpx 6rpx;
  11 +
  12 + font-size:24rpx;
  13 + font-family:PingFangSC-Semibold,PingFang SC;
  14 + font-weight:600;
  15 + color:rgba(255,255,255,1);
  16 + line-height:38rpx;
  17 + text-align: center;
  18 +
  19 + padding: 0 14rpx;
  20 + margin: 0 6rpx;
  21 +}
  22 +.shafa-dian{
  23 + height:4rpx;
  24 + background:rgba(255,227,87,1);
  25 + width: calc(100% - 20rpx);
  26 +}
  27 +.shafa-dian2{
  28 + width: 100%;
  29 + height:10rpx;
  30 + background:rgba(255,201,170,1);
  31 + border-radius:0rpx 0rpx 4rpx 4rpx;
  32 +}
  33 +.shafa-fushou{
  34 + position: absolute;
  35 + bottom: 4rpx;
  36 + width: 100%;
  37 +}
  38 +.shafa-fushou:before,.shafa-fushou:after{
  39 + display: block;
  40 + content: "";
  41 + width:12rpx;
  42 + height:34rpx;
  43 + background:rgba(255,201,170,1);
  44 + border-radius:200rpx 200rpx 0rpx 4rpx;
  45 +}
  46 +.shafa-tui{
  47 + position: absolute;
  48 + bottom: 0rpx;
  49 + width: calc(100% - 12rpx);
  50 +}
  51 +.shafa-tui:before,.shafa-tui:after{
  52 + display: block;
  53 + content: "";
  54 + width:4rpx;
  55 + height:4rpx;
  56 + background:rgba(255,209,114,1);
  57 +}
@@ -115,11 +115,20 @@ Page({ @@ -115,11 +115,20 @@ Page({
115 seller.receive_condition_str=xff.join('/') 115 seller.receive_condition_str=xff.join('/')
116 } 116 }
117 } 117 }
118 - this.setData({ 118 + let obj={
119 seller:seller, 119 seller:seller,
120 hasDishesImage:hasDishesImage, 120 hasDishesImage:hasDishesImage,
121 hasOnlineReserve:seller.is_online_reserve==1, 121 hasOnlineReserve:seller.is_online_reserve==1,
122 - }) 122 + }
  123 + if(this.options.classID){
  124 + obj.seletroomlist=[{
  125 + id:this.options.classID,
  126 + name:this.options.className,
  127 + }]
  128 + delete this.options.classID
  129 + delete this.options.className
  130 + }
  131 + this.setData(obj)
123 } 132 }
124 }) 133 })
125 }, 134 },
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 hasActivityTags="{{false}}" 74 hasActivityTags="{{false}}"
75 hasActivityShort="{{true}}" 75 hasActivityShort="{{true}}"
76 hasBrand="true" hasActivityRed="true" 76 hasBrand="true" hasActivityRed="true"
77 - hasSuggestion="{{hasSuggestion}}" 77 + hasSuggestion="{{hasSuggestion}}" hasShafa
78 hasSlogan="{{false}}"></sb-tr> 78 hasSlogan="{{false}}"></sb-tr>
79 </view> 79 </view>
80 </swiper-item> 80 </swiper-item>