<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>
   <goodList goods="{{goodsList}}"></goodList>
  </view>
 </scroll-view>
</view>