receiveCoupon.wxml 10.6 KB
<!--pack-activity/pack/receiveCoupon.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<nav>优惠券详情</nav>
<view class="top_box">
    <image src="https://qn.colorcun.com/{{couponType=='1'?'voucherIcon1':couponType=='2'?'coupon2':'coupon3'}}.png" mode="" />
    <view class="texts" wx:if="{{detail.is_type == '3'}}">
        <view class="font32r textName">{{detail.aname}}</view>
        <view class="font24r threshold">¥<text class="priceText">{{detail.price}}</text><text class="font28r" wx:if="{{detail.desc!='0'}}">满{{detail.desc}}元可用</text></view>
    </view>
    <view class="texts texts{{couponType}}" wx:if="{{detail.is_type != '3'}}">
        <view class="flex-lr">
            <view class="font28r textName">{{detail.aname}}</view>
            <view class="font20r">¥<text class="font32r">{{detail.price}}</text></view>
        </view>
        <view class="flex-lr">
            <view class="font20r threshold">
                <text class="priceText font36r" wx:if="{{detail.use.discount}}">{{detail.use.discount}}折</text>
                <text class="font20r" wx:else>¥<text class="priceText font36r">{{detail.price}}</text></text>
                {{detail.desc}}
            </view>
            <!-- <view class="operation" wx:if="{{opt.types!='5'}}">
                <image class="countimgs" src="https://qn.colorcun.com/WechatIMG699.png" bindtap="subtraction" />
                <input type="number" model:value="{{num}}" bindinput="bindKeyNameInput" />
                <image class="countimgs" src="https://qn.colorcun.com/WechatIMG698.png" bindtap="addition" mode="" />
            </view> -->
        </view>
    </view>
    <view class="font28r receive" wx:if="{{resultCoupon == '1'}}">已领取</view>
</view>
<view class="center_box">
    <view class="centerMain dishMain" wx:if="{{couponType == '3' && detail.use}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_6.png" mode="" />
            <text class="font32r">菜品</text>
        </view>
        <text space="nbsp" class="info font28r">{{detail.use.dish}}</text>
        <image wx:for="{{detail.use.images}}" src="{{item}}" mode="widthFix"/>
    </view>
    <view class="centerMain">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
            <text class="font32r">有效期</text>
        </view>
        <block wx:if="{{detail.is_type == '3'}}">
            <view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '0' && detail.useStime && detail.useEtime}}"><text>券有效期:</text>
                <block wx:if="{{resultCoupon == '1'}}">
                    {{detail.useStime}} <text> 至 </text> {{detail.useEtime}}
                </block>
                <block wx:else>
                    {{detail.useEtimeStr}}
                </block>
            </view>
            <view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '1'}}"><text>券有效期:</text> 永久有效</view>
        </block>
        <block wx:else>
            <view class="info font28r" wx:if="{{detail.useStime && detail.useEtime}}"><text>活动期限:</text>{{detail.useStime}} <text> 至 </text> {{detail.useEtime}}</view>
        </block>
    </view>
    <view class="centerMain" wx:if="{{detail.morText || detail.noonText || detail.nigText}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_2.png" mode="" />
            <text class="font32r">{{detail.is_type=='3'?'不':''}}可用日期</text>
        </view>
        <view wx:if="{{detail.morText}}" class="info font28r">{{detail.morText}}</view>
        <view wx:if="{{detail.noonText}}" class="info font28r">{{detail.noonText}}</view>
        <view wx:if="{{detail.nigText}}" class="info font28r">{{detail.nigText}}</view>
    </view>
    <view class="centerMain" wx:if="{{detail.is_type!='3' && exp_date.is_none=='1'}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
            <text class="font32r">可用日期</text>
        </view>
        <view wx:if="{{exp_date.is_none=='1'}}" class="info font28r" >
            无限制
        </view>
    </view>
    <view class="centerMain centerMain3" wx:if="{{detail.aexpiration && detail.is_type == '3'}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
            <text class="font32r">使用规则</text>
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_accumulation == '1' ? '可以叠加使用其他优惠券' : '不可以叠加使用其他优惠券'}}
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_compartment == '1' ? '可用于包间消费' : '不可用于包间消费'}}
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_eatin == '1' ? '堂食可用' : '不可用于堂食消费'}}
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_takeout == '1' ? '外带可用' : '不可用于外带'}}
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_appointment == '1' ? '需要提前预约' : '不需要提前预约'}}
        </view>
    </view>
    <view class="centerMain centerMain3" wx:if="{{exp_date && exp_date.is_birthday=='1' && detail.is_type != '3'}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
            <text class="font32r">使用限制</text>
        </view>
        <view class="info font28r">
            顾客生日当天可用
        </view>
    </view>
    <view class="centerMain" wx:if="{{detail.is_type == '3'}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_4.png" mode="" />
            <text class="font32r">分享规则</text>
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_share_lose == '1'? '可以分享给好友' : '不能分享给好友'}}
        </view>
        <view class="info font28r">
            <view class="drop"></view>{{detail.arule.is_share_have == '1'? '分享给好友后继续拥有此券' : '分享给好友后不再拥有此券'}}
        </view>
    </view>
    <view class="centerMain" wx:if="{{detail.explain}}">
        <view class="title">
            <image src="https://qn.colorcun.com/voucherUnion_5.png" mode="" />
            <text class="font32r">其他说明</text>
        </view>
        <view class="info font28r">{{detail.explain}}</view>
    </view>
</view>
<view class="seller_data">
    <image src="{{seller.seller_image}}" mode="aspectFill"/>
    <view class="seller_box">
        <view class="infos">
            <view class="info_name font32r">{{seller.sellername}}</view>
            <view class="park font24r" wx:if="{{seller.is_parking}}">可停车</view>
        </view>
        <view class="infos infos1">
            <view class="dish font24r">{{seller.cateStr}}</view>
            <view class="averageText font24r" wx:if="{{seller.average && seller.average>0}}">人均¥{{seller.average}}</view>
            <view class="font24r">{{distance}}</view>
        </view>
        <!-- <view class="bottom_btns">
            <view class="book font24r">朋友订过</view>
            <view class="book font24r">我订过</view>
            <view class="book font24r">我去过</view>
            <view class="book font24r">我有券</view>
        </view> -->
    </view>
</view>
<view class="bottom_box_wrap">
    <view class="bottom_box">
        <view class="font32r bold_box">温馨提示:</view>
        <view class="font28r">1、到店消费时,请您扫描商家二维码付款时,可以直接识别并使用优惠券</view>
        <view class="font28r">2、从<text class="bold_box">周到安排</text>微信小程序,<text class="bold_box">“我的-卡券”</text>中,可以找到您的卡券。</view>
        <view class="font28r">3、您也可以关注<text class="bold_box">周到安排</text>公众号,获取更多优惠券信息</view>
        <view class="font28r publicity" bindtap="wananchi">关注<text class="bold_box">周到安排</text>公众号,及时获取更多优惠券动态<view class="more" style="margin-left: 20rpx;"></view>
        </view>
    </view>
</view>
<view class="sharewidth {{detail.is_type != '3'?'sharewidth1':''}}" wx:if="{{opt.types!='5' && (resultCoupon == '0' || detail.arule.is_share_lose == '1')}}">
    <block wx:if="{{detail.is_type == '3'}}">
        <button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share">
            <image src="https://qn.colorcun.com/voucherIcon2.png" mode="" />
            <text class="font24r">分享</text>
        </button>
        <view class="btns">
            <view class="btn1 font36r" wx:if="{{seller.is_online_reserve == '1'}}">
                <navigator url="/pages/reserve/reserve?id={{opt.sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
            </view>
            <view class="btn font36r" wx:if="{{seller.is_online_reserve == '0' && seller.phone}}">
                <view bindtap="callPhone">预订包间</view>
            </view>
            <block wx:if="{{resultCoupon == '0' && detail.grant_last>0}}">
                <subscribe ids="{{[2,3]}}" bindtap="submitOrder">
                    <view class="btn font36r">领取到卡包</view>
                </subscribe>
            </block>
        </view>
    </block>
    <block wx:else>
        <view class="leftBox">
            <view class="news font24r">
                合计<text class="font28r">¥<text class="priceInfo">{{totalize}}</text></text>
            </view>
        </view>
        <button bindtap="submitOrderTwo" class="font32r {{(dataStr>(detail.etime*1) || detail.grant_last=='0' || (detail.grant_last && (detail.grant_last*1)<(num*1)))?'submitBtns btnsDisabled':'submitBtns'}}">提交订单</button>
    </block>
</view>
<toast id="myToast"></toast> 
<my-modal id="myModal" fadeStyle="slideUp" height="240px">
    <view slot="modalName" class="titleModal">
        <image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeOutline.png" mode=""/>
        <view class="modalText1">您来晚了!</view>
    </view>
	<view slot="modalContent">
        <view class="modalText2 font40r">优惠券已被其他好友抢走了,下次动作要快哦!</view>
        <view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
	</view>
</my-modal>