<!-- 无收藏时显示 -->
<view class="noCollection" wx:if="{{iscollects==0?false:true && collects.length<1}}">
  <view class="flex-level">
    <image src="{{url}}miniapp/images/Nocollection.png"></image>
  </view>
  <view class="flex-level fs30 xc-ash">当前暂无收藏</view>
  <view class="flex-level">
    <navigator bindtap="go_to" data-url="/pages/index/index/index" bindtap="goto">
      <view class="flex-center fs28 white">去首页逛逛</view>
    </navigator>
  </view>
</view>

<view class="Collection" wx:if="{{collects.length>0}}">
  <!-- 收藏商品 -->
  <view class="commodity">
    <!-- 商品数量 -->
    <view class="sum flex-vertical-between fs24">
      <view class="flex-center ">共{{total_collects}}件商品</view>
      <view class="flex-right-vertical editEd" bindtap="editcollects">{{editEd==1?'完成':'编辑'}}</view>
    </view>
    <!-- 商品集合 -->
    <view class="{{editEd?'collects_max colls_max':'collects_max'}}">
      <navigator class="collect flex-vertical" bindtap="iconClick" data-index="{{index}}" wx:for="{{collects}}" wx:key="{{index}}"
                 data-url="{{item.type == 1 ? '/packageH/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id : (editEd==0?'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id:'')}}">

        <view class="radioCheck iconClick" wx:if="{{editEd}}">
          <radio color="rgb(214,1,33)" class="scale" checked="{{item.checked==true?true:false}}"></radio>
        </view>
        <!-- 商品图片 -->
        <view class="flex" style="width:96%">
          <view class="{{editEd?'collect_image iconrp':'collect_image'}}">
            <image src="{{item.original_img}}" binderror="bind_bnerr" data-errimg="collects[{{index}}].original_img"></image>
          </view>

          <!-- 商品属性 -->
          <view class="attribute">

            <view class="attribute_name ellipsis-2">
              <view class="name fs32">{{item.goods_name}}</view>
            </view>

            <!-- 商品价格 -->
            <view class="attribute_money flex-vertical line">
              <view class="money_left flex-vertical line">
                <!-- 优惠价 -->
                <view class="price flex xc-wc">
                  <view class="fs24">￥</view>
                  <view class="fs40">{{item.prom_price?item.prom_price:item.final_price}}</view>
                </view>
                <!-- 原价 -->
                <view wx:if="{{is_retail_price}}"  class="flex fs24 line through xc-ash">
                  <view>零售价:</view>
                  <view>￥{{item.market_price}}</view>
                </view>
              </view>

              <view class="money_right flex line" wx:if="{{!editEd}}">
				<!-- 卡项订单 -->
				<view wx:if="{{item.type == 1}}" class="similar flex-level fs22" catchtap="go_to" data-url="/packageA/pages/cardList/cardList?cat_id={{item.cat_id}}">
				  <view>找相似</view>
				</view>
				<!-- 其他 -->
                <view wx:elif="{{item.type == 0}}" class="similar flex-level fs22" catchtap="go_to" data-url="/pages/goods/goodsList/goodsList?cat_id={{item.cat_id}}">
                  <view>找相似</view>
                </view>
                <image src="{{url}}miniapp/images/trash.png" catchtap="cancelCollect" data-id="{{item.collect_id}}"></image>
              </view>

            </view>

          </view>

        </view>

    </navigator>

  </view>
</view>

<!--- 好物推荐 --->
<view class="title" wx:if="{{collects.length>0 && is_goods}}">
  <view class="Recommend flex-center">
    <view class="lin"></view>
    <view class="flex-center">
      <image src="{{url}}miniapp/images/Diamonds.png"></image>
      <view class="fs28">好物推荐</view>
    </view>
    <view class="lin"></view>
  </view>
  <!-- 好物推荐 -->
  <goods_recommend id="goods_recommend"></goods_recommend>
</view>
</view>

<!-- 全选收藏 -->
<view class="abs flex-vertical" wx:if="{{editEd && collects.length>0}}">
  <view class="left">
    <!-- 全选收藏按钮 -->
    <view class="flex-vertical fs32" bindtap="allClick">
      <radio class="iconUn" color="rgb(214,1,33)" checked="{{isall}}"></radio>
      <view>全选</view>
    </view>

    <view class="Number flex-vertical">
      已选
      <view class="co-red goods_num">{{sum>0?sum:'0'}}</view> 件
    </view>
  </view>
  <view class="delete fs30 flex-center white {{isdelete==1?'Deleting':''}}" bindtap="alldelete">
    {{isdelete==0?'删除':'删除中'}}
  </view>
</view>

<warn id="warn"></warn>