category.wxml 1.2 KB

12345678910111213141516171819202122232425
  1. <view class="container">
  2. <view class="cate-nav">
  3. <scroll-view scroll-x="true" class="cate-nav-body" style="width: 750rpx;" scroll-left="{{scrollLeft}}">
  4. <view wx:for="{{navList}}" class="item {{ id == item.id ? 'active' : ''}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">
  5. <view class="name">{{item.name}}</view>
  6. </view>
  7. </scroll-view>
  8. </view>
  9. <scroll-view scroll-y="true" scroll-top="{{scrollTop}}" style="height:{{scrollHeight}};">
  10. <view class="cate-item">
  11. <view class="h">
  12. <text class="name">{{currentCategory.name}}</text>
  13. <text class="desc">{{currentCategory.front_name}}</text>
  14. </view>
  15. <view class="b">
  16. <navigator 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" >
  17. <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
  18. <text class="name">{{iitem.name}}</text>
  19. <text class="price">¥{{iitem.retail_price}}</text>
  20. </navigator>
  21. </view>
  22. </view>
  23. </scroll-view>
  24. </view>