<!--pages/more/goods_collect/goods_collect.wxml-->
<block wx:if="{{collectList.length != 0}}">
  <view class='collect-total flex-row a-center j-between'>
    <text class='rpx24'>您最近收藏了{{collectCount}}款商品</text>
    <button class='rpx24 edit-finish-btn' bindtap='editFinish'>{{isEdit ? '完成' : '编辑'}}</button>
  </view>
  <scroll-view class='collect-list-wrap' scroll-y style='height:{{isEdit ? "calc(100vh - 180rpx)" : "calc(100vh - 80rpx)"}}' bindscrolltolower="loadMore">
    <block wx:for="{{collectList}}" wx:key="unique" >
      <view class='collect-item flex-row' data-goods_id='{{item.goods_id}}' bindtap='goGoodsDetail'>
        <view class="flex-row a-center j-center" style="width:40rpx;height: 250rpx;margin-right:20rpx;" data-index="{{index}}"  catchtap="selectItem" hidden='{{!isEdit}}'>
          <text class="iconfont rpx40 {{item.choosed == true ?  'icon-yixuanze  price-red' :  'icon-weixuanze '}}" ></text>
        </view>
        <image src='{{imgUrlBefore + item.img}}' class='goods-image'></image>
        <view class='collect-item-goods-content flex-column j-center'>
          <view class="rpx28 goods-title">
            {{item.title}}
          </view>
          <!-- <view class="rpx26 goods-price hui">
            自营
          </view> -->
          <view class='rpx26 price-wrap'>
            <text class='now-price'>¥{{item.price}}</text>
            <!-- <text class='old-price hui' wx:if="{{item.is_off == 1}}">原价¥{{item.orig_price}}</text> -->
          </view>
          <!-- 以下接口不提供数据 -->
          <!-- <view class='rpx26 flex-row j-between hui'><text>新上架</text><text>销量：55</text></view> -->
          <!-- <view class='rpx26 flex-row j-between hui'>
            <text wx:if="{{item.is_news == 1}}">新上架</text>
            <text wx:else>{{item.count_assess}}人评价</text>
            <text>销量：{{item.sell_count}}</text>
          </view> -->
        </view>
      </view>
    </block>
  </scroll-view>
  <view class='bottom-option-wrap flex-row a-center j-between' hidden='{{!isEdit}}'>
    <view class='flex-row a-center j-center rpx26 select-all'  bindtap='selectAllOrNot'>
      <text class="iconfont rpx40 {{ selectAll == true ?  'icon-yixuanze  price-red' :  'icon-weixuanze '}}"  style='margin-right:10rpx;'></text>全选
    </view>
    <button class='rpx26 white main-bg delete-btn' bindtap='cancleCollect'>移除</button>
  </view>
</block>
<view class='flex-column a-center' style='margin-top:30vh;' wx:if="{{collectList.length == 0}}">
  <text class='iconfont icon-meiyoushuju rpx160 hui'></text>
  <text class='rpx32 hui'>暂无收藏</text>
</view>