Commit 09ca1f4114fb2ec5c7793068f64e42f27b0de7a6

Authored by vking
1 parent 44b27b04

discount and activity

<!--components/reserve/discount.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<view class="toast" wx:if="{{red_envelopes_price>0}}">
<view class="toast-view">
<view class="toast-text">店家送您</view>
... ... @@ -19,11 +20,23 @@
</view>
<view class="discount-content">
<view class="activity">
<view class="txt">活动</view>
<block wx:for="{{seller.activity}}" wx:key="activity">
<view class="flex-ll activity-item"
style="align-items: flex-start">
<view class="activity-left">{{util.activityName(item.type)}}</view>
<view class="activity-right">
{{item.title}}
<view class="activity-right-info" wx:if="{{item.desc}}">注:{{item.desc}}</view>
</view>
</view>
</block>
<view class="flex-ll activity-item" wx:if="{{seller.receive_condition_2}}"
style="align-items: flex-start">
<view class="activity-left">消费返</view>
<view class="activity-right">在线买单{{seller.receive_condition_str}}红包</view>
<view class="activity-right">
在线买单{{seller.receive_condition_str}}红包
<view class="activity-right-info">注:仅可以线上买单时使用</view>
</view>
</view>
<view class="flex-ll activity-item" wx:if="{{seller.isopen_md==1}}"
style="align-items: flex-start">
... ...
... ... @@ -3,7 +3,7 @@
.discount{
position: fixed;
bottom: 0;
background-color: #ffffff;
background-color: #fefefe;
border-radius: 40rpx 40rpx 0rpx 0rpx;
color: #353535;
width: 100%;
... ... @@ -52,6 +52,13 @@
}
.activity-item{
margin-top: 20rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(228, 228, 228, 0.5);
border-radius: 10rpx;
box-sizing: border-box;
padding: 26rpx 40rpx;
}
.activity-left{
height:28rpx;
... ... @@ -63,7 +70,7 @@
color:rgba(240,88,36,1);
line-height:28rpx;
padding: 0 6rpx;
min-width: 60rpx;
/*min-width: 60rpx;*/
text-align: center;
}
.activity-right{
... ... @@ -251,4 +258,14 @@
.seller-reserve{
display: none;
}
.activity-right-info{
height: 34rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 34rpx;
margin-top: 10rpx;
}
\ No newline at end of file
... ...
... ... @@ -12,7 +12,6 @@ Page({
data: {
seller:null,
IsCollectionSeller:false,
pagesHeight:'auto',
current:0,
currentView:1,
hasOnlineReserve:false,
... ... @@ -115,6 +114,15 @@ Page({
seller.receive_condition_str=xff.join('/')
}
}
seller.activityStr=[];
if(seller.activity.length>0){
seller.activity.forEach(a=>{
seller.activityStr.push(a.title)
})
}
seller.activityStr=seller.activityStr.join(';')
//seller.isopen_md=0;
//seller.card_info=[]
let obj={
seller:seller,
hasDishesImage:hasDishesImage,
... ... @@ -309,12 +317,12 @@ Page({
},
discountHide(){
this.setData({
pagesHeight:'auto'
hasDisplayDiscount:false
})
},
discountShow(){
this.setData({
pagesHeight:'500rpx'
hasDisplayDiscount:true
})
},
shareUserinfo(){
... ...
<!--pages/reserve/detail.wxml-->
<include src="detail.skeleton.wxml" wx:if="{{!seller}}"/>
<layout wx:else="">
<layout wx:else="" style="position: {{hasDisplayDiscount?'fixed':''}};">
<nav hasHome>{{seller.sellername}}</nav>
<!-- 包间预定 -->
<view class="tabs flex-lr" wx:if="{{hasOnlineReserve}}">
... ... @@ -12,7 +12,7 @@
</view>
</view>
<view hidden="{{activeTab!='detail'}}">
<view class="seller-banner" style="{{pagesHeight!='auto'?'position: fixed;':''}}{{hasOnlineReserve?'margin-top: 80rpx;':''}}">
<view class="seller-banner" style="{{hasOnlineReserve?'margin-top: 80rpx;':''}}">
<swiper
indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
interval="2000" duration="500"
... ... @@ -33,7 +33,7 @@
</view>
<view class="swiper-num" wx:if="{{seller.envi_image.length>0}}">{{currentView}} / {{seller.envi_image.length}}</view>
</view>
<view class="pages" style="height: {{pagesHeight}};overflow:{{pagesHeight=='auto'?'visible':'hidden'}}">
<view class="pages">
<view class="seller">
<view class="base">
<view class="name Semibold flex-lr">
... ... @@ -56,7 +56,7 @@
<text class="label_text" >{{seller.label_cstr}}</text>
</view>
</view>
<view style="display:{{pagesHeight=='auto'?'block':'none'}}">
<view>
<view class="addr flex-lr" wx:if="{{hasOnlineReserve}}">
<view class="addr-view" bindtap="lookLocation">
<view class="addr-text flex-ll">
... ... @@ -79,10 +79,10 @@
</view>
</view>
</view>
<view style="display:{{pagesHeight=='auto'?'block':'none'}}" wx:if="{{seller}}">
<view wx:if="{{seller}}">
<view class="black20line"></view>
<block wx:if="{{seller.isopen_md==1 || seller.card_info.length>0}}">
<view class="activity-view-easy flex-lr" bindtap="showDiscount">
<view wx:if="{{seller.isopen_md==1 || seller.card_info.length>0}}" bindtap="showDiscount">
<view class="activity-view-easy flex-lr">
<view class="activity-left flex-ll">
<view class="activity-view-tit">优惠</view>
<view class="activity-view-blk" wx:if="{{seller.receive_condition_1}}">进店赠红包</view>
... ... @@ -93,7 +93,30 @@
<view class="more"></view>
</view>
</view>
<view class="activityStr" wx:if="{{seller.activityStr}}">
{{seller.activityStr}}
</view>
<view class="black20line"></view>
</view>
<block wx:else="">
<view class="seller" wx:if="{{seller.activity.length>0}}">
<formids bindclick="showDiscount">
<view class="activity-view-easy activity-view-easy-old flex-lr" >
<view class="activity-left flex-ll">
<view class="icon"></view>
<block wx:for="{{seller.activity}}"
wx:key="seller.activity.key"
wx:if="{{index<2}}">
<view class="discount" >{{item.title}}</view>
</block>
</view>
<view class="flex-rr activity-right">
<view class="more-text">更多</view>
<view class="more"></view>
</view>
</view>
</formids>
</view>
</block>
<block wx:if="{{seller.isopen_md!=1}}">
<view class="seller" >
... ...
... ... @@ -412,7 +412,7 @@
.average{
color: #C0A369;
min-width: 135rpx;
margin-left: 120rpx;
margin-left: 40rpx;
text-align: right;
white-space: nowrap;
}
... ... @@ -487,6 +487,9 @@
.activity-view-easy .discount:last-child{
border-right-width: 0;
}
.activity-view-easy-old .activity-right{
min-width: 100rpx;
}
/* 包间预定 */
.room-booking {
width:100%;
... ... @@ -603,6 +606,21 @@
right:0;
left:auto;
}
.as-phone{
.activityStr{
width: calc(100% - 140rpx);
padding-left: 100rpx;
height: 36rpx;
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #353535;
line-height: 36rpx;
margin-top: -30rpx;
margin-bottom: 40rpx;
white-space:nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
\ No newline at end of file
... ...
... ... @@ -621,7 +621,7 @@
"id": 71,
"name": "pages/reserve/detail",
"pathName": "pages/reserve/detail",
"query": "id=4645&_activeTab=reserve&date=2020-02-16&pnum=6",
"query": "id=1001&_activeTab=reserve&date=2020-02-16&pnum=6",
"scene": null
},
{
... ...
... ... @@ -99,4 +99,7 @@ module.exports = {
toFixed:function(num,limit){
return parseFloat(num).toFixed(limit)
},
activityName:function(typeId){
return ['','满减','满赠','折扣','代金券'][parseInt(typeId)]||'会员价';
}
};
\ No newline at end of file
... ...