couponCell.ttml 4.63 KB
<view class='couponCell' catchtap='selectCouponTap'>
  <view class='couponCellLeftView'>

      <block tt:if="{{item.catalog == 100}}"> 
        <image class="couponCellLeftBackImage"  src="{{itemAvailableed==1 ? './images/bgyellow@3x.png' : './images/bggrey@3x.png'}}"/> 
      </block>
      <block tt:if="{{item.catalog == 200}}">
        <image class="couponCellLeftBackImage"  src="{{itemAvailableed==1 ? './images/bgred@3x.png' : './images/bggrey@3x.png'}}"/>
      </block>
      <block tt:if="{{item.catalog == 300}}">
        <image class="couponCellLeftBackImage"  src="{{itemAvailableed==1 ? './images/bgblack@3x.png' : './images/bggrey@3x.png'}}"/>
      </block>


    <view class='couponCellLeft' style="box-shadow:{{!showComment ? '0 0 0 0 #E0E0E0;' : '0 4px 5px -3px #E0E0E0;'}}" >


      <block tt:if="{{item.catalog == 100}}"> 
        <view class='priceView'>
          <text class='price' style="color: {{itemAvailableed==1 ? '#FFA72E' : '#B0B0B0'}};">{{item.coupon_value_str}}</text>
        </view>
        <text class='priceDetail' style="color: {{itemAvailableed==1 ? '#FFA72E' : '#B0B0B0'}};">{{item.use_rule}}</text>
      </block>
      <block tt:if="{{item.catalog == 200}}">
        <view class='priceView'>
          <text class='price' style="color: {{itemAvailableed==1 ? '#FC5960' : '#B0B0B0'}};">{{item.coupon_value_str}}</text>
        </view>
        <text class='priceDetail' style="color: {{itemAvailableed==1 ? '#FC5960' : '#B0B0B0'}};">{{item.use_rule}}</text>
      </block>
      <block tt:if="{{item.catalog == 300}}">
        <text class='yunfeiName' style="color: {{itemAvailableed==1 ? '#222222': '#B0B0B0'}};">{{item.coupon_value_str}}</text>
      </block>

    </view>
  </view>
  <view class='couponCellRightView' style="box-shadow:{{!showComment ? '0 0 0 0 #E0E0E0;' : '0 4px 5px -3px #E0E0E0;'}}" > 
     <image class="couponCellRightViewBackImage"  src="./images/bg@3x.png"/>   
    <view class='couponCellRight'> 
      <view class='couponCellRightTop' style="color: {{itemAvailableed==1 ? '#444444' : '#B0B0B0'}};">    
        <block tt:if="{{item.catalog == 100}}"> 
          <text class='couponIcon' style="color: {{itemAvailableed==1 ? '#FFA72E' : '#B0B0B0'}};">[{{item.catalog_name}}]</text>
        </block>
        <block tt:if="{{item.catalog == 200}}">
          <text class='couponIcon' style="color: {{itemAvailableed==1 ? '#FC5960' : '#B0B0B0'}};">[{{item.catalog_name}}]</text>  
        </block>
        <block tt:if="{{item.catalog == 300}}">
          <text class='couponIcon' style="color: {{itemAvailableed==1 ? '#222222' : '#B0B0B0'}};">[{{item.catalog_name}}]</text>
        </block>
        {{item.coupon_name}}
      </view>
      <view class='couponCellRightMiddle'>
          <text class='time' style='color: #B0B0B0;'>{{item.coupon_validity}}</text>
      </view>
      <view class='couponCellRightBottom'>
        <block tt:if="{{itemType==5 || itemType==6}}"> 
        <view class='commentViewButton'>
            <text class='commentDesText' style="color: {{itemType==5 ? '#444444;':'#B0B0B0'}}">{{item.desc}}</text>
        </view>
        </block>
        <block tt:else>
          <view class='commentViewButton' catchtap='showCommentTap'>
            <text class='commentButtonText' style='color: #B0B0B0;'>使用说明</text>
            <image class="arrowIcon" style="transform: rotate({{!showComment ? '0':'180'}}deg);" src="./images/down@3x.png"/>
          </view>
          <text class='useButton' catchtap='useButtonTap' tt:if="{{itemType==2 && item.is_online_avail}}">立即使用</text>
        </block>

        <image class="rightIcon" tt:if="{{itemType==3 || itemType==4}}" src="{{itemType==3 ? './images/yishiyong@3x.png' : './images/guoqi@3x.png'}}"/> 
        <block tt:if="{{itemType==5 && item.is_selected_support == 'N'}}"> 
          <view class='selectIconView'>
            <image class="selectIcon" src="{{'./images/grey@3x.png'}}"/> 
          </view>
        </block>
        <block tt:if="{{itemType==5 && item.is_selected_support == 'Y'}}">
          <view class='selectIconView'>
            <image class="selectIcon"  src="{{item.selected == 'Y' ? './images/gou@3x.png' : './images/Oval@3x.png'}}"/> 
          </view>
        </block>
      </view>
    </view>
  </view>
  <block tt:if="{{item.is_overdue_soon == 'Y'}}"> 
    <image class="overduSoonIcon"  src="./images/tip@3x.png"/> 
  </block> 

</view>
<view class='commentView' tt:if="{{showComment}}">
  <view style="background: rgba(255, 255, 255, 0.7);width: 100%;height: 22rpx "/>
  <block tt:for='{{item.notes}}' tt:key='{{index}}'>
    <text class='commentText1' style="color: {{itemAvailableed==1 ? '#444444' : '#B0B0B0'}};">{{item}}</text>
  </block>
</view>