Initial commit
This commit is contained in:
74
miniprogram/pages/coupon/coupon-list/index.wxml
Normal file
74
miniprogram/pages/coupon/coupon-list/index.wxml
Normal file
@@ -0,0 +1,74 @@
|
||||
<t-tabs
|
||||
defaultValue="{{status}}"
|
||||
bind:change="tabChange"
|
||||
tabList="{{list}}"
|
||||
t-class="tabs-external__inner"
|
||||
t-class-item="tabs-external__item"
|
||||
t-class-active="tabs-external__active"
|
||||
t-class-track="tabs-external__track"
|
||||
>
|
||||
<t-tab-panel
|
||||
wx:for="{{list}}"
|
||||
wx:for-index="index"
|
||||
wx:for-item="tab"
|
||||
wx:key="key"
|
||||
label="{{tab.text}}"
|
||||
value="{{tab.key}}"
|
||||
/>
|
||||
</t-tabs>
|
||||
<view class="coupon-list-wrap">
|
||||
<t-pull-down-refresh
|
||||
t-class-indicator="t-class-indicator"
|
||||
id="t-pull-down-refresh"
|
||||
bind:refresh="onPullDownRefresh_"
|
||||
background="#fff"
|
||||
>
|
||||
<!-- 优惠券列表 -->
|
||||
<view wx:if="{{!loading && couponList.length > 0}}">
|
||||
<view class="coupon-list-item" wx:for="{{couponList}}" wx:key="key">
|
||||
<coupon-card couponDTO="{{item}}" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view class="empty-state" wx:if="{{!loading && couponList.length === 0}}">
|
||||
<view class="empty-icon">
|
||||
<block wx:if="{{status === 0}}">🎫</block>
|
||||
<block wx:elif="{{status === 1}}">✅</block>
|
||||
<block wx:else>⏰</block>
|
||||
</view>
|
||||
<view class="empty-text">
|
||||
<block wx:if="{{status === 0}}">暂无可用优惠券</block>
|
||||
<block wx:elif="{{status === 1}}">暂无已使用优惠券</block>
|
||||
<block wx:else>暂无已失效优惠券</block>
|
||||
</view>
|
||||
<view class="empty-desc">
|
||||
<block wx:if="{{status === 0}}">去领券中心看看吧</block>
|
||||
<block wx:elif="{{status === 1}}">快去使用优惠券吧</block>
|
||||
<block wx:else>关注最新优惠活动</block>
|
||||
</view>
|
||||
<view class="empty-action" wx:if="{{status === 0}}" bind:tap="goCouponCenterHandle">
|
||||
<view class="empty-action-btn">去领券中心</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载状态 -->
|
||||
<view class="loading-state" wx:if="{{loading}}">
|
||||
<t-loading theme="circular" size="40rpx" />
|
||||
<view class="loading-text">加载中...</view>
|
||||
</view>
|
||||
</t-pull-down-refresh>
|
||||
|
||||
<view class="center-entry">
|
||||
<view class="center-entry-btn" bind:tap="goCouponCenterHandle">
|
||||
<view>领券中心</view>
|
||||
<t-icon
|
||||
name="chevron-right"
|
||||
color="#fa4126"
|
||||
size="40rpx"
|
||||
style="line-height: 28rpx;"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user