<!-- pages/shopPage/shopPage.wxml -->
<view class="shop-container">

  <!-- 店铺信息 -->
  <view class="shop" bindtap="toShopInfo">
    <view class="shopInfo" data-shopid="{{shopId}}">
      <view class="shopLogo">
        <image src="{{shopInfo.shopLogo}}" alt="shopLogo"></image>
      </view>
      <view class="shopTitle">
        <view class="shopTitle-row">
          <view class="shopname">{{shopInfo.shopName}}</view>
          <view class="self-operate" wx-if="{{shopId==1}}">自营店铺</view>
        </view>
        <text class="shopIntro">{{shopInfo.intro}}</text>
      </view>
    </view>
  </view>
  <!-- 渐变背景 -->
  <view class="head-bg">
    <!-- 搜索框 -->
    <view class='bg-sear'>
      <view class="bg-search {{topFlag? 'navtop' : ''}}">
        <view class="section" bindtap='toShopSearchPage' data-shopid="{{shopId}}">
          <image src='../../images/icon/search.png' class='search-img'></image>
          <text class='placeholder'>搜索</text>
        </view>
      </view>
    </view>
  </view>
  <!-- /渐变背景 -->


  <!-- 内容大盒子 -->
  <view class="prod-wrapper">
    <!-- 轮播图 -->
    <view class='content {{indexImgs.length? "" : "display"}}'>
      <swiper autoplay="{{autoplay}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}} " circular='true' class='pic-swiper' indicator-dots>
        <block wx:for='{{indexImgs}}' wx:key='index'>
          <swiper-item class="banner-item">
            <view class='img-box'>
              <image src='{{item.imgUrl}}' data-prodid='{{item.relation}}' bindtap='toProdPage' class='banner'></image>
            </view>
          </swiper-item>
        </block>
      </swiper>
    </view>

    <!-- 商品列表 -->
    <view class='prod-list'>
      <view class="tit">
        <view class="hotsell">
          <image src="../../images/icon/hotsell03.png"></image>
        </view>
        <text class="hotsell-tit">店铺热卖</text>
      </view>

      <view class='prodlist-item-cont'>
        <block wx:for="{{shopProdList}}" wx:for-item="prod" wx:key="*this">
          <view class='prod-items' bindtap='toProdPage' data-prodid="{{prod.prodId}}">
            <view class='hot-imagecont'>
              <image src='{{prod.pic}}' class='hotsaleimg'></image>
            </view>
            <view class='hot-text'>
              <view class='prod-name'>{{prod.prodName}}</view>
              <view class='prod-info'>{{prod.brief}}</view>
              <view class='prod-text-info'>
                <view class='price'>
                  <text class='symbol'>￥</text>
                  <text class='big-num'>{{prod.price}}</text>
                  <!-- <text class='small-num'>.99</text> -->
                </view>
                <image src='../../images/tabbar/basket-sel.png' class='basket-img'></image>
              </view>
            </view>
          </view>
        </block>

        <!-- 查看更多商品 -->

        <view class="view-more" bindtap="toShopProds" wx:if="{{shopProdList.length}}"> 查看更多商品 </view>
        <view class="view-more" wx:else> 暂无商品 </view>
      </view>

    </view>
  </view>

  <!-- /内容大盒子 -->


  <shop-tabbar style="position:fixed;bottom:0;width:100%;left:0;right:0;"></shop-tabbar>
</view>