shoppingCartOneProductCell.wxml 4.45 KB
<template name="shoppingCartOneProductCell">
  <view class="pollGoodContainer, infoContainer" bindtap='{{isEditing ? "" : "navtoProductDetailPage"}}' data-item='{{goodsItem}}' data-type="{{goodsItem}}" bindtouchend="moveEnd" bindtouchstart="moveStart" animation="{{tempSku == goodsItem.unique_identifier ? deleteAnimation : ''}}">
    <image wx:if="{{(goodsItem.goods_type != 'gift') && (!goodsItem.batch_no && !goodsItem.bundle_activity_id)}}" src="{{goodsItem.bSelected ? './images/gwc_choose@2x.png' : './images/gwc_n@2x.png'}}" class="selectBtn" catchtap="selectSingleGoodsAction" data-type="{{goodsItem}}"></image>
    <image src="{{goodsItem.goods_images}}" class="goodsImage">
        <image wx:if="{{goodsItem.bLackStorage}}" class='gift-tag-image' src='./images/kcbz-lab@2x.png'/>
        <image wx:elif="{{goodsItem.goods_type == 'gift'}}" class='gift-tag-image' src='./images/zp-lab@2x.png'/>
        <image wx:elif="{{goodsItem.goods_type == 'price_gift'}}" class='gift-tag-image' src='./images/jjg-lab@2x.png'/>
    </image>
    <view class="goodsInfoContainer" wx:if="{{!isEditing}}">
      <text class="productName">{{goodsItem.product_name}}</text>
      <view class="productColorSizeString">{{goodsItem.sale_attr_desc.skc_attr}}  {{goodsItem.sale_attr_desc.sku_attr?goodsItem.sale_attr_desc.sku_attr:''}}</view>
      <view class="priceContainer">
          <view class='current-old-price-container'>
            <text class="goodsPriceString">{{goodsItem.priceString}}</text>
            <block wx:if="{{goodsItem.isShowOldPrice}}">
                <text class="oldPrice">{{goodsItem.oldPricString}}</text>
            </block>
          </view>
          <view class="reduceStringontainer" wx:if="{{goodsItem.price_down > 0}}">
              <text class="reduceString">已降¥{{goodsItem.price_down}}</text>
          </view>
      </view>
      <view wx:if="{{goodsItem.sale_time_str}}" class='sale-time-container'>
        <text class='sale-tip'>开售时间:</text>
        <text class='sale-time'>{{goodsItem.sale_time_str}}</text>
      </view>
    </view>
    <view class='bundleGoodSizeInfoContainer' bindtap="chooseSizeColorAction" data-type="{{goodsItem}}" wx:if="{{isEditing && (goodsItem.batch_no && goodsItem.bundle_activity_id)}}">
        <view class='bundleGoodSizeText'>{{goodsItem.sale_attr_desc.skc_attr}}  {{goodsItem.sale_attr_desc.sku_attr?goodsItem.sale_attr_desc.sku_attr:''}}</view>
        <image class='bundleGoodArrowImage' src='./images/down-ic@2x.png'></image>
    </view>
    <view class="goodsInfoEditContainer" wx:elif="{{isEditing}}">
      <view class="cutPlusContainer">
        <view class="cutPlusView" wx:if="{{goodsItem.buy_number != 1}}" bindtap="cutDownBuyCountAction" data-type="{{goodsItem}}">
            <image src="./images/jian_h@2x.png" class="cutImage"></image>
        </view>
        <view class="cutPlusView" wx:if="{{goodsItem.buy_number == 1}}">
            <image src="./images/jian_disable@2x.png" class="cutImage"></image>
        </view>
        <view class="numberView">
          <text class="numberText">{{goodsItem.buy_number}}</text>
        </view>
        <view class="cutPlusView" wx:if="{{!goodsItem.bLackStorage && goodsItem.buy_number != goodsItem.storage_number}}" bindtap="plusBuyCountAction" data-type="{{goodsItem}}">
            <image src="./images/and_normal@2x.png" class="plusImage"></image>
        </view>
        <view class="cutPlusView" wx:if="{{goodsItem.bLackStorage || goodsItem.buy_number == goodsItem.storage_number}}" bindtap="plusReachedMaxAction">
            <image src="./images/and_h@2x.png" class="plusImage"></image>
        </view>
      </view>
      <view class="colorSizeContainer" bindtap="chooseSizeColorAction" data-type="{{goodsItem}}">
          <view class="colorSizeView">
            <text class="colorSizeText">{{goodsItem.sale_attr_desc.skc_attr}}  {{goodsItem.sale_attr_desc.sku_attr?goodsItem.sale_attr_desc.sku_attr:''}}</text>
          </view>
          <view class="cutPlusView">
            <image class="arrowImage" src="./images/down-ic@2x.png"></image>
          </view>
      </view>
    </view>
    <text class="buyNumbText" wx:if="{{!isEditing}}">x {{goodsItem.buy_number}}</text>
    <!-- <view class="lackStorageContainer" wx:if="{{goodsItem.bLackStorage && !isEditing}}">
      <text class="lackStorageText">库存不足</text>
    </view> -->
    <view class="cellDeleteBtn" catchtap="deleteGoodsCell" data-type="{{goodsItem}}">
      <text class="cellDeleteText">删除</text>
    </view>
  </view>
</template>