Coupon.wxml 1.85 KB
<popup show="{{show}}" title="选择礼券" bindconfirm="confirm" bindcancel="onPopupCancel">
  <view class="coupon-box">
    <search-input bindsearch="searchCoupon"></search-input>
    <scroll-view class="coupon" scroll-y>
      <block wx:if="{{customerCouponList.length > 0}}">
        <view class="box">
          <block wx:for="{{customerCouponList}}" wx:key="index">
            <block wx:if="{{!item.flag}}">
              <view class="item {{item.active?'active':''}} " data-key="customerCouponId" bindtap="choose" data-index="{{index}}" data-item="{{item}}">
                <view class="text-hide">
                  {{item.couponName}}{{item.customerCouponCode}}(客户拥有的券)
                </view>
                <view class="iconCoupon">
                  <image src="/components/images/choose.png"></image>
                </view>
              </view>
            </block>
          </block>
        </view>
      </block>
      <block wx:if="{{couponList.length > 0}}">
        <block wx:for="{{couponList}}" wx:key="index">
          <view class="title">{{item.title}}</view>
          <view class="box">
            <block wx:for="{{item.list}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
              <view class="item {{i.active?'active':''}} {{i.disabled?'disabled':''}}" bindtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}" data-key="merchantCouponId">
                <view class="text-hide">
                  {{i.couponName}}{{i.merchantCouponCode}}
                </view>
                <view class="iconCoupon">
                  <image src="/components/images/choose.png"></image>
                </view>
              </view>
            </block>
          </view>
        </block>
      </block>
      <block wx:else>
        <view class="nothing">暂无数据</view>
      </block>
    </scroll-view>

  </view>
</popup>