goodsCollect.wxml 2.64 KB
<!--goodsCollect.wxml-->
<scroll-view scroll-y style="height: {{screenHeight - 54}}px;">
  <scroll-view wx:if="{{total > 0}}" class='container'>
    <!-- 分类选择 -->
    <scroll-view scroll-x="true" class='fixedFilter'>
      <view class="contentContainer">
        <block wx:for="{{categoryList}}" wx:key="{{item.category_id}}">
          <view class="category-item {{currentCategoryId == item.category_id ? 'selected' : ''}}" style="{{currentCategoryId == item.category_id ? ' border: solid 1rpx #444444;' : ''}}" data-id="{{item.category_id}}" data-name="{{item.category_name}}" bindtap="onCategoryItemSelected">
            <text class="item-name">{{item.category_name}}</text>
          </view>
        </block>
      </view>
    </scroll-view>

    <view class="view-splite clearfix">
    </view>

    <!-- 商品list -->
    <block wx:for="{{currentProductList}}" wx:for-index="goodsIndex" wx:key="{{item}}">
      <view class="poolGoodCellContainer">
        <view class="cellLine" wx:if="{{goodsIndex > 0}}"></view>
        <view class='pollGoodContainer, infoContainer' data-item='{{item}}' data-type="{{item}}" bindtap="navtoProductDetailPage" bindtouchend="moveEnd" bindtouchstart="moveStart" animation="{{tempSku == item.product_skn ? deleteAnimation : ''}}">
          <image class="goodsImage" mode="aspectFit" src="{{item.image}}"></image>
          <view class="goodsInfoContainer">
            <text class="productName">{{item.product_name}}</text>
            <view class="priceContainer">
              <view class='current-old-price-container'>
                <text class="goodsPriceString">¥{{item.sales_price}}</text>
                <block wx:if="{{item.market_price && item.sales_price != item.market_price}}">
                  <text class="oldPrice">¥{{item.market_price}}</text>
                </block>
              </view>
            </view>
            <block wx:if="{{item.storage == 0}}">
              <text class="goodsStorageString">已售罄</text>
            </block>
          </view>
          <view class='arrow-view'>
            <image class='arrow-image' src='images/arrow_right@2x.png'></image>
          </view>

          <view class="cellDeleteBtn" catchtap="deleteGoodsRequest" data-type="{{item}}">
            <text class="cellDeleteText">删除</text>
          </view>

        </view>
      </view>
    </block>
  </scroll-view>

  <view wx:else>
    <view class='empty-view'>
      <image src='images/like@2x.png' class='like-empty-icon'></image>
      <text class='like-empty-title'>您暂无收藏任何商品</text>
      <view class='like-empty-btn' bindtap='navToNewArriaval'>随便逛逛</view>
    </view>
  </view>
</scroll-view>