<view wx:if="{{showEntry && hasValidCoupons}}" class="coupon-entry-container {{mode === 'landscape' ? 'landscape' : ''}}" catchtap="openListDrawer">
  <view class="coupon-entry-wrap {{entryTheme === 'dark' || (mode === 'landscape' && useDarkTheme) ? 'dark' : ''}}">
    <image class="coupon-entry-icon" src="../../../assets/coupon.svg" mode="aspectFit" />
    <view class="coupon-entry-text">卡券</view>
  </view>
</view>
<Drawer id="coupon-list-drawer" class="coupon-list-drawer {{mode === 'landscape' ? 'landscape' : ''}}" needCancel="{{false}}" themeColor="{{drawerTheme}}" bind:myCancel="closeListDrawer">
  <view class="coupon-list-container {{mode === 'landscape' ? 'landscape' : ''}}">
    <view class="coupon-list-header">
      <view class="coupon-list-title">卡券</view>
      <view class="coupon-list-sub">
        <text>共 {{couponList.length}} 个卡券</text>
        <text class="view-products-btn" bindtap="onViewProducts">查看商品</text>
      </view>
      <view class="coupon-close-btn" bindtap="onViewProducts">
        <image src="../../../assets/common_close.png" class="close-icon" />
      </view>
    </view>
    <scroll-view scroll-y class="coupon-list-scroll">
      <block wx:if="{{couponList.length > 0}}">
        <view class="coupon-list-item {{item._display.isReceived ? 'received' : ''}}" wx:for="{{couponList}}" wx:key="Id" data-id="{{item.Id}}" bindtap="onCouponItemClick">
          <image class="coupon-list-bg" src="../../../assets/Subtract.png" />
          <view class="item-left">
            <image class="item-img" src="{{item._display.imageUrl}}" mode="aspectFill" />
          </view>
          <view class="item-center">
            <view class="item-title">{{item._display.title}}</view>
            <view class="item-desc">{{item._display.desc}}</view>
            <view class="item-meta">
              <text wx:if="{{item._display.countText}}">{{item._display.countText}}</text>
            </view>
            <view class="item-meta-time">
              <text wx:if="{{item._display.timeText}}" class="item-time">
                {{item._display.timeText}}
              </text>
            </view>
          </view>
          <view class="item-right">
            <view wx:if="{{item._display.isReceived}}" class="received-btn">已领取</view>
            <view wx:else class="action-btn {{item._display.btnDisabled ? 'disabled' : ''}}" data-id="{{item.Id}}" catchtap="onPickupFromList">
              {{item._display.btnText}}
            </view>
          </view>
        </view>
        <view class="scroll-bottom-spacer"></view>
      </block>
      <view wx:else class="coupon-list-empty">
        <image src="../../../assets/no_content.svg" class="empty-icon" />
        <view class="empty-text">暂无卡券</view>
      </view>
    </scroll-view>
  </view>
</Drawer>
