<!--components/discountCoupon/index.wxml-->


<view class="wrapper">
    <view class="top">
        <view class="left">
            <view class="typeText">
                <text wx:if="{{data.type === 0}}"> 通用优惠券 </text>
                <text wx:if="{{data.type === 1}}"> 无门槛优惠券 </text>
                <text wx:if="{{data.type === 2}}"> 满减券 </text>
            </view>
            <view class="time">
                有效期至 {{ data.endTime }}
            </view>
        </view>
        <view class="right">
            <view class="price">
                <text style="font-size: 26rpx;line-height: 26rpx;"> ￥ </text>
                <view class="number" wx:if="{{data.discount > 0}}"> {{ data.discount }} 折 </view>
                <view class="number" wx:elif="{{data.discountMoney > 0}}"> {{ data.discountMoney }} 元 </view>
                <view wx:else> - </view>
            </view>
            <view class="limit">
                满 {{ data.useMin }} 可用
            </view>
        </view>
    </view>
    <view class="bottom">
        <view class="left" bind:tap="showRemark">
            {{data.remark}}
        </view>
        <view class="right">
            <van-button wx:if="{{type === 1}}" type="info" size="small" bind:tap="handleUse">去领取</van-button>
            <van-button wx:if="{{type === 2}}" type="info" size="small" bind:tap="handleChange">去兑换</van-button>
            <van-button wx:if="{{type === 3}}" type="info" size="small" bind:tap="handleUseIt">去使用</van-button>
        </view>
    </view>
</view>
<van-dialog id="van-dialog" />