This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/pages/user/coupon/coupon.wxml

42 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2020-04-25 22:59:04 +08:00
<view class="container">
<!-- 顶部选项卡 -->
<view class="swiper-tab dis-flex box-align-center flex-y-center">
<view class="swiper-tab-item {{ dataType === 'not_use' ? 'on' : ''}}" data-current="not_use" bindtap="swichNav">未使用</view>
<view class="swiper-tab-item {{ dataType === 'is_use' ? 'on' : ''}}" data-current="is_use" bindtap="swichNav">已使用</view>
<view class="swiper-tab-item {{ dataType === 'is_expire' ? 'on' : ''}}" data-current="is_expire" bindtap="swichNav">已过期</view>
</view>
<scroll-view scroll-y="{{ true }}" style="height: {{swiperHeight}}px;">
<view class="coupon-list" wx:if="{{ list.length }}">
<view class="coupon-item" wx:for="{{ list }}" wx:key="this">
<view class="item-wrapper color__{{ item.state.value ? item.color.text : 'gray' }}">
<view class="coupon-type">{{ item.coupon_type.text }}</view>
<view class="tip dis-flex flex-dir-column flex-x-center">
<view wx:if="{{ item.coupon_type.value == 10 }}">
<text class="f-30">¥</text>
<text class="money">{{ item.reduce_price }}</text>
</view>
<text class="money" wx:if="{{ item.coupon_type.value == 20 }}">{{ item.discount }}折</text>
<text class="pay-line">满{{ item.min_price }}元可用</text>
</view>
<view class="split-line"></view>
<view class="content dis-flex flex-dir-column flex-x-between">
<view class="title">{{ item.name }}</view>
<view class="bottom dis-flex flex-y-center">
<view class="time flex-box">
<text class="f-24">{{ item.start_time.text }}~{{ item.end_time.text }}</text>
</view>
<view class="state">
<text class="f-24">{{ item.state.text }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="yoshop-notcont" wx:elif="{{ notcont }}">
<text class="iconfont icon-wushuju"></text>
<text class="cont">亲,暂无优惠券哦</text>
</view>
</scroll-view>
</view>