闫增涛
2024-04-01 aa2c08b3be23a01d44205b2c19d21a2bf53f944f
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -1,34 +1,27 @@
<view class="tree">
  <t-collapse
    default-value="{{openIds}}"
    expandIcon="{{false}}"
    bind:change="handleChange"
  >
  <t-collapse default-value="{{openIds}}" bind:change="handleChange">
    <t-collapse-panel
      wx:for="{{treeList}}"
      wx:for-item="item"
      wx:for-index="index"
      wx:key="id"
      value="{{item.id}}"
      disabled="{{!item.children.length}}"
    >
      <view slot="header" class="header-title">
        <view>
        <view class="title-checkBox">
          <t-checkbox
            icon="rectangle"
            checked="{{item.checked}}"
            data-item="{{item}}"
            bind:change="checkResourceTitle"
            catch:change="checkResourceTitle"
            wx:if="{{isShowCheck}}"
          />
          <!-- <t-checkbox icon="rectangle" checked="{{true}}" data-item="{{item}}" bind:change="checkResourceTitle" /> -->
          <text>{{item.name}}</text>
          <text>{{item.name}} </text
          ><text wx:if="{{item.sysType =='CmsFolder'}}"
            >({{item.children ? item.children.length : 0}})</text
          >
        </view>
        <image
          src="{{item.open ? '/static/images/bookService/detail/up.png' : '/static/images/bookService/detail/down.png'}}"
          class="list-icon"
          wx:if="{{item.children.length}}"
        />
      </view>
      <view
        class="list"
@@ -152,11 +145,11 @@
                  src="/static/images/bookService/detail/cart.png"
                  wx:if="{{citem.isShopCar}}"
                  class="shopCar"
                  bind:tap="onCloudShoppingCart"
                  data-item="{{citem}}"
                  catch:tap="onCloudShoppingCart"
                ></image>
                <!-- 云学习购买图标 -->
                <image
                  bind:tap="onCloudShoppingCart"
                  src="/static/images/bookService/detail/need-buy.png"
                  class="need-buy"
                  wx:if="{{citem.isbuy }}"
@@ -178,6 +171,10 @@
          openLearnids="{{openLearnids}}"
        ></tree>
      </view>
      <!-- 暂无数据 -->
      <view wx:if="{{!item.children || !item.children.length}}" class="noData">
        <t-empty icon="folder-open" description="暂无数据" />
      </view>
      <view class="listItems" wx:if="{{children.length <= 0 && !loading}}">
        暂无数据
      </view>