<view class="store-list {{plugin_active ? 'member-article-list' : ''}}" wx:for="{{storeList}}"
      wx:key="index" wx:for-item="items" catchtap='toRouter' data-item='{{items}}' style="background-color:{{datas.preview_color}}">
  <view class="item-top">
    <view class="left">
      <view class="image">
        <yz-image src="{{items.thumb}}" customStyle="border-radius: {{datas.border_radius}}px;" custom-class="img" mode="aspectFill" />
      </view>
      <view class="category" wx:if="{{items.has_one_category}}"
            data-id="{{items.has_one_category.id}}" catchtap="toClassify"
            style="background-color: {{datas.class_bg_color}}; border-radius: {{datas.class_border_radius}}px; font-size: {{datas.class_font_size}}px; color: {{datas.class_font_color}};">
        {{ items.has_one_category.name }}
      </view>
      <view class="category" wx:if="{{!items.has_one_category}}"
            style="background-color: {{datas.class_bg_color}}; border-radius: {{datas.class_border_radius}}px; font-size: {{datas.class_font_size}}px; color: {{datas.class_font_color}};">
        暂无分类
      </view>
    </view>
    <view class="right">
      <view class="title" style="font-size: {{datas.font_size}}px;color: {{datas.font_color}};">
        {{items.store_name}}</view>
      <view class="sale">
        <view class="grade">
          <!-- <icon class="iconfont icon-card_collect_b"></icon> -->
          <icon class="iconfont icon-card_collect_b"></icon>
          <view class='span'>{{items.average_score}}分</view>
        </view>
        <view class="num" wx:if="{{showMun}}">已售{{ items.order_total }}单</view>
        <view class="num" wx:if="{{showMun}}"></view>
        <view class="distance" wx:if="{{items.distance}}" catchtap='goToAdress' data-items="{{items}}"
              style="font-size: {{datas.location_font_size}}px;color: {{datas.location_font_color}};">
          {{ items.distance }}{{ items.unit }} <icon class="iconfont icon-all_daohang"></icon>
        </view>
      </view>
      <view class="discounts" wx:if="{{items.address}}" style="color:#666;">
        <text wx:if="{{items.address.city}}">{{items.address.city}}</text>
        <text wx:if="{{items.address.detailed_address}}">{{items.address.detailed_address}}</text>
      </view>
      <view class="discounts">
        <view class="discounts-list"
              wx:if="{{util.inOf(datas.discount_list,'4') > -1 && items.has_many_coupon && items.has_many_coupon.length > 0}}"
              style="font-size: {{datas.discount_font_size}}px;">
          <view class="type" style="color: {{datas.discount_title_color}};">优惠</view>
          <view class="con" style="color: {{datas.discount_font_color}};"
                wx:for='{{items.has_many_coupon}}' wx:key="ind" wx:for-item="coupon" wx:for-index="ind" wx:if="{{ind<=2}}">
            {{ coupon.name }}
          </view>
        </view>
        <view class="discounts-list"
              wx:if="{{util.inOf(datas.discount_list,'3') > -1 && (items.store_point.point_deduct_switch != 0 || items.store_love.deduction == 1)}}"
              style="font-size: {{datas.discount_font_size}}px;">
          <view class="type" style="color: {{datas.discount_title_color}};flex:none;">{{ items.goods_show.search_class_name || "抵扣" }}</view>
          <view class="con" style="color: {{datas.discount_font_color}};"
                wx:if="{{items.store_love.deduction == 1 ? true : false}}">
            {{ items.store_love.deduction_proportion }}
          </view>
          <view class="con {{items.goods_show && items.goods_show.store_deduction_style?'store_deduction_style':''}}" style="color: {{datas.discount_font_color}};"
                wx:if="{{items.store_point.point_deduct_switch == 0 ? false : true}}">
            {{ items.store_point.max_point_deduct }}
          </view>
          <view class="con store_cash_back_style"
                wx:if="{{items.store_point.commission_deduct && items.goods_show.store_cash_back}}">
            {{ items.store_point.commission_deduct }}
          </view>
        </view>
        <view class="discounts-list"
              wx:if="{{util.inOf(datas.discount_list,'2') > -1 && (items.store_point.point_switch != 0 || items.store_love.award == 1)}}"
              style="font-size: {{datas.discount_font_size}}px;">
          <view class="type" style="color: {{datas.discount_title_color}};">赠送</view>
          <view class="con" style="color: {{datas.discount_font_color}};"
                wx:if="{{items.store_point.point_switch == 0 ? false : true}}">
            {{ items.store_point.point }}
          </view>
          <view class="con" style="color: {{datas.discount_font_color}};"
                wx:if="{{items.store_love.award == 1 ? true : false}}">
            {{ items.store_love.award_proportion }}
          </view>
        </view>

      </view>
      <view class="label">
        <view class="label-list" wx:if="{{items.dispatchs}}">
          <view class="label-title" wx:for='{{items.dispatchs}}' wx:key='ind' wx:for-item="dispatch"
                style="background-color: {{datas.tag_bg_color}}; border-radius: {{datas.tag_border_radius}}px; border: solid  1px {{datas.tag_border_color}};font-size: {{datas.tag_font_size}}px;color: {{datas.tag_font_color}};">
            {{dispatch}}
          </view>
        </view>
      </view>
    </view>
  </view>
  <view class="goods"
        wx:if="{{datas.show_goods && items.recommend_goods && items.recommend_goods.length > 0}}">
    <view class="goods-list">
      <view class="goods-one" wx:for="{{items.recommend_goods}}" wx:key="index" wx:for-item='good'
            catchtap='toGoods' data-item='{{good}}'
      >
        <view class="goods-image">
          <yz-image src="{{good.thumb}}" custom-class="img" />
        </view>
        <view class="goods-title">{{good.title}}</view>

        <view class="goods_content_show" wx:if="{{good.goods_content_show && datas.content_list}}">
          <!-- 商品内容显示 #81889-->
          <block wx:for="{{good.goods_content_show}}"  wx:for-item="contentChild">
            <view
              style="font-size:10px;color:#666;"
              wx:if="{{(util.inOf(datas.content_list,'8') > -1 && contentChild.key == 'integral') ||(util.inOf(datas.content_list,'9') > -1 && contentChild.key == 'love') ||(util.inOf(datas.content_list,'10') > -1 && contentChild.key == 'store-integral-fees')}}"
            >
              {{ contentChild.name }}{{ contentChild.value }}%
            </view>
          </block>
        </view>
        
        <view class="price" wx:if="{{!good.goods_show||good.goods_show.length<=0}}">{{language['money']}}{{good.price}}</view>
        <view wx:if="{{good.pass_price}}" class="pass_price">
          {{good.pass_price.name}}:{{good.pass_price.price}}
        </view>
        <view class="show_price_box" wx:if="{{good.goods_show&&good.goods_show.length>0}}">
          <view class="show_price {{index % 2 == 0 ? 'red_white' : 'white_red'}}" wx:for="{{good.goods_show}}">
            {{ item.name }}:{{ item.value }}
          </view>
        </view>
      </view>
    </view>
  </view>
</view>

<wxs module="util">
  var inOf = function(val, str) { if (val) {return val.indexOf(str) }};
  module.exports.inOf = inOf;
</wxs>