<view class="container">
    <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' : ''}}" wx:key="id" 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="h">
            <text class="name">{{currentCategory.name}}</text>
            <text class="desc">{{currentCategory.frontName}}</text>
        </view>
        <view class="b">
            <navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}"   url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex" >
                <image class="img" src="{{iitem.listPicUrl}}" background-size="cover"></image>
                <text class="name">{{iitem.name}}</text>
                <text class="price">￥{{iitem.retailPrice}}</text>
            </navigator>
        </view>
    </view>
    </scroll-view>
</view>