<view class="list2-box">
  <block wx:for="{{goods}}" wx:key="id">
    <view wx:if="{{ item.type == 0 }}" class="list2">
      <navigator url="/pages/goods-details/index?id={{item.goodsId}}"><image class="img" mode="aspectFill" src="{{item.pic}}"></image></navigator>
      <view class="goods-info">
        <navigator url="/pages/goods-details/index?id={{item.goodsId}}"><view class="title ellipsis">{{item.goodsName}}</view></navigator>
        <image class="delete-btn" src="/images/icon/delete.svg" data-idx="{{ index }}" bindtap="removeFav"></image>
      </view>
    </view>
    <view wx:else class="list2">
      <navigator url="{{item.json.wxaurl}}"><image class="img" mode="aspectFill" src="{{item.json.pic}}"></image></navigator>
      <view class="goods-info">
        <navigator url="{{item.json.wxaurl}}"><view class="title ellipsis">{{item.json.name}}</view></navigator>
        <image class="delete-btn" src="/images/icon/delete.svg" data-idx="{{ index }}" bindtap="removeFav"></image>
      </view>
    </view>
  </block>
</view>
<van-empty wx:if="{{!goods || goods.length == 0}}" description="暂无收藏" />