<view class="container">
  <auth bindlogin="onShow" />
    <lip-sync />
    <view class="cate-nav">
        <scroll-view scroll-x="true" class="cate-nav-body" style="width: 750rpx;" scroll-left="{{scrollLeft}}">
            <view  wx:for="{{navList}}" class="item {{ id == item.id ? 'active' : ''}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">
                <view class="name">{{item.name}}</view>
            </view>
        </scroll-view>
    </view>
    <scroll-view scroll-y="true" scroll-top="{{scrollTop}}" style="height:{{scrollHeight}};">

    <view class="cate-item">
        <view class="b">
            <block wx:if="{{goodsList && goodsList.length}}">
                <navigator hover-class="none" class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}"   url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{ goodsList }}" wx:for-item="iitem" wx:for-index="iindex" >
                    <image mode="aspectFit" class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
                    <text class="name">{{iitem.name}}</text>
                    <text class="price">￥{{iitem.retail_price}}</text>
                </navigator>
            </block>
            <view class="no-data" wx:elif="{{!loadding}}">暂无商品</view>
        </view>
    </view>

  <view wx:if="{{goodsList.length>4}}" class="loadmore">
      <block wx:if="{{nomore}}">
        <text>{{nomoreText}}</text>
      </block>
      <block wx:else>
        <text class="iconfont icon-loading loading" space="nbsp"></text>
        <text> {{loadmoreText}}</text>
      </block>
    </view>

    </scroll-view>
</view>