wujingjing
2024-08-01 1ee0bcc741206079b645c584c578ee543ff75c35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<view>
  <view class="category-container">
    <!-- 左侧的滚动视图区域 -->
    <scroll-view class="category-left-view" scroll-y>
      <!-- 一级分类 -->
      <view
        class="left-view-item {{ activeIndex === index ? 'active' : '' }}"
        wx:for="{{ categoryList }}"
        wx:key="id"
        bindtap="updateActive"
        data-index="{{ index }}"
      >
        {{ item.name }}
      </view>
    </scroll-view>
 
    <!-- 右侧的滚动视图区域 -->
    <scroll-view class="category-right-view" scroll-y>
      <!-- 二级分类 -->
      <view>
        <view
          wx:for="{{ categoryList[activeIndex].children }}"
          wx:key="index"
          class="right-view-item"
        >
          <navigator
            class="navigator"
            url="/modules/goodModule/pages/goods/list/list?category2Id={{ item.id }}"
          >
            <image class="" src="{{ item.imageUrl }}"></image>
            <text class="goods_item_name">{{ item.name }}</text>
          </navigator>
        </view>
      </view>
    </scroll-view>
  </view>
</view>