yiming
2024-04-03 f0229b7c6801f6429dec75e208192b61053b8c7d
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -1,34 +1,29 @@
<view class="tree">
  <t-collapse
    default-value="{{openIds}}"
    expandIcon="{{false}}"
    bind:change="handleChange"
  >
  <t-collapse default-value="{{openIds}}" catchchange="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" catchtap="catchTap">
          <t-checkbox
            icon="rectangle"
            checked="{{item.checked}}"
            data-item="{{item}}"
            bind:change="checkResourceTitle"
            catchchange="checkResourceTitle"
            wx:if="{{isShowCheck}}"
          />
          <!-- <t-checkbox icon="rectangle" checked="{{true}}" data-item="{{item}}" bind:change="checkResourceTitle" /> -->
          <text>{{item.name}}</text>
          <!-- 章节名 -->
          <view style="width: 100%">
            <text>{{item.name}} </text
            ><text wx:if="{{item.sysType =='CmsFolder'}}"
              >({{item.children ? item.children.length : 0}})</text
            >
          </view>
        </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"
@@ -40,7 +35,7 @@
        <!-- // 判断 无子项 且为商品item 直接显示 -->
        <view
          class="listItems"
          wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}"
          wx:if="{{citem.childrenFolderCount <= 0 && citem.sysType == 'CmsItem'}}"
        >
          <view
            class="itemsInfo"
@@ -59,7 +54,11 @@
                class="box-image"
                style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"
              >
                <view class="checkBox" wx:if="{{isShowCheck}}">
                <view
                  class="checkBox"
                  wx:if="{{isShowCheck}}"
                  catchtap="catchTap"
                >
                  <!-- checked="{{citem.checked}}"  -->
                  <!-- <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" catch:change="checkResource" data-item="{{citem}}" /> -->
                  <t-checkbox
@@ -149,14 +148,14 @@
                ></image>
                <!-- 云学习加入购物车图标 -->
                <image
                  src="/static/images/bookService/detail/cart.png"
                  src="/static/images/bookService/detail/cart@2x.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 }}"
@@ -167,7 +166,7 @@
        </view>
        <!-- // 判断 不是商品 有子项 递归组件 -->
        <tree
          wx:else
          wx:if="{{citem.childrenCount > 0 && citem.sysType == 'CmsFolder' }}"
          isShowCheck="{{isShowCheck}}"
          bookInfo="{{bookInfo}}"
          treeList="{{[citem]}}"
@@ -178,6 +177,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>