<!-- 商品列表 -->
<wxs module="filter" src="../../utils/filter.wxs"></wxs>
<wxs module="g_filter" src="g_filter.wxs"></wxs>
<view class="collects">
  <view class="hang ">
    <!-- 商品详情 -->

    <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{g_filter.get_url_by_type(item)}}">
      <!--<view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}">-->
      <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}" hover-class="none"> -->
      <navigator hover-class="none">
        <!-- 商品图⽚ -->
        <image class="sp" src="{{url+item.original_img}}" mode="aspectFill" binderror="bind_bnerr_xc" data-url="{{url+item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image>
        <view class="bottom">
          <!-- 商品名称 -->
          <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view>
          <!-- 判断是否有活动价 -->
          <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=3  && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10 }}">
            <view class="pdt10">
              <view class="money flex xc-wc" style="line-height:28rpx">
                <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
                <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
                <!-- 活动价 -->
                <view class="flex xc-wc" wx:if="{{item.prom_price}}">
                  <view class="fs24">￥</view>
                  <view class="fs35">{{item.prom_price}}</view>
                </view>
              </view>

                <!-- 控制显示原价 -->
                <view class="flex" wx:if="{{is_retail_price}}">
                  <!-- 原价 -->
                  <view class="price flex xc-ash line_th ~no_line_x">
                    <view class="fs22">￥</view>
                    <view class="fs22">{{item.market_price}}</view>
                  </view>
                </view>

            </view>

          </block>
          <block wx:else>
            <!-- 商品价格,先判断下是后⼜等级价-->
            <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
              <!-- 当会员是等级卡的时候 -->
              <block wx:if="{{card_field}}">
                <!-- 等级价>0 -->
                <block wx:if="{{item[card_field]>0}}">
                  <view class="money flex">
                    <!-- 办卡价 -->
                    <view class="flex xc-wc ai_and">
                      <view class="fs24">￥</view>
                      <view class="fs35">{{filter.toFix(item[card_field],2)}}</view>
                      <view class="card_bg ellipsis-1">
                        <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
                        <text class="card_name">{{card_name}}</text>
                      </view>
                    </view>
                  </view>



                  <view class="flex" wx:if="{{is_retail_price}}">
                    <!-- 原价 -->
                    <view class="price flex xc-ash line_th ~no_line_x">
                      <view class="fs22">￥</view>
                      <view class="fs22">{{item.market_price}}</view>
                    </view>
                  </view>


                </block>
                <block wx:else>
                  <view class="money flex">
                    <!-- 办卡价 -->
                    <view class="flex xc-wc">
                      <view class="fs24">￥</view>
                      <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
                    </view>
                  </view>
                    <view class="flex" wx:if="{{is_retail_price}}">
                      <!-- 原价 -->
                      <view class="price flex xc-ash line_th ~no_line_x">
                        <view class="fs22">￥</view>
                        <view class="fs22">{{item.market_price}}</view>
                      </view>
                    </view>
                </block>
              </block>
              <block wx:else>
                <!-- 如果商品有设置等级价⼤于0的 -->
                <block wx:if="{{g_filter.get_card_price(item,card_list,0)  && is_no_plus}}">
                  <view class="money flex">
                    <!-- 办卡价 -->
                    <view class="flex xc-wc">
                      <view class="fs24">￥</view>
                      <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
                    </view>
                    <!-- 原价 -->
                    <view class="price flex xc-ash line_th ~no_line_x" wx:if="{{is_retail_price}}">
                      <view class="fs22">￥</view>
                      <view class="fs22">{{item.market_price}}</view>
                    </view>
                  </view>
                  <view class="flexr">
                    <!-- 等级价 -->
                    <view class="price flex ai-center">
                      <view class="fs22">￥</view>
                      <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
                      <view class="card_bg ellipsis-1">
                        <image src="{{url}}/miniapp/images/plus/dj_icon.png"/>
                          <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
                      </view>
                    </view>
                  </view>
                </block>
                <block wx:else>
                  <view class="money flex">
                    <!-- 办卡价 -->
                    <view class="flex xc-wc">
                      <view class="fs24">￥</view>
                      <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
                    </view>
                  </view>
                  <view class="flex" wx:if="{{is_retail_price}}">
                    <!-- 原价 -->
                    <view class="price flex xc-ash line_th ~no_line_x">
                      <view class="fs22">￥</view>
                      <view class="fs22">{{item.market_price}}</view>
                    </view>
                  </view>
                </block>
              </block>
            </block>
            <!-- 商品压根就没有等级价 -->
            <view class="pdt10" wx:else>
              <view class="money flex">
                <!-- 办卡价 -->
                <view class="flex xc-wc">
                  <view class="fs24">￥</view>
                  <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
                </view>
              </view>
              <view class="flex" style="" wx:if="{{is_retail_price}}">
                <!-- 原价 -->
                <view class="price flex xc-ash line_th ~no_line_x">
                  <view class="fs22">￥</view>
                  <view class="fs22">{{item.market_price}}</view>
                </view>
              </view>
            </view>
          </block>
        </view>
      </navigator>
    </view>
  </view>
  <view class="nothing flex-center" wx:if="{{is_no_more==0}}">
    <view class="Foil"></view>
    <view class="no_content fs24">没有更多内容了</view>
    <view class="Foil"></view>
  </view>
</view>