goodsCollect.wxml 2.74 KB
<!--goodsCollect.wxml-->
<scroll-view scroll-y style="height: {{screenHeight - 54}}px;">
  <scroll-view tt:if="{{total > 0}}" class='container'>
    <!-- 分类选择 -->
    <view class='fixedFilter'>
     <scroll-view scroll-x="true" class='contentContainer'>
       <!-- <view class="contentContainer">  -->
        <block tt:for="{{categoryList}}" tt: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>
    <view class="view-splite clearfix">
    </view>

    <!-- 商品list -->
    <block tt:for="{{currentProductList}}" tt:for-index="goodsIndex" tt:key="{{item}}">
      <view class="poolGoodCellContainer">
        <view class="cellLine" tt: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 tt:if="{{item.market_price && item.sales_price != item.market_price}}">
                  <text class="oldPrice">¥{{item.market_price}}</text>
                </block>
              </view>
            </view>
            <block tt: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 tt:elif="{{total ==  0 && !isFetching}}">
    <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>