闫增涛
2024-04-03 34dd2d10cf26c86ed170a59aa36718f7c27f24d0
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -1,5 +1,5 @@
<view class="tree">
  <t-collapse default-value="{{openIds}}" bind:change="handleChange">
  <t-collapse default-value="{{openIds}}" catchchange="handleChange">
    <t-collapse-panel
      wx:for="{{treeList}}"
      wx:for-item="item"
@@ -8,19 +8,21 @@
      value="{{item.id}}"
    >
      <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
          ><text wx:if="{{item.sysType =='CmsFolder'}}"
            >({{item.children ? item.children.length : 0}})</text
          >
          <!-- 章节名 -->
          <view style="width: 100%">
            <text>{{item.name}} </text
            ><text wx:if="{{item.sysType =='CmsFolder'}}"
              >({{item.children ? item.children.length : 0}})</text
            >
          </view>
        </view>
      </view>
      <view
@@ -33,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"
@@ -52,10 +54,15 @@
                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
                    disabled="{{!citem.saleMethod[0].Id}}"
                    icon="rectangle"
                    checked="{{citem.checked}}"
                    data-item="{{citem}}"
@@ -126,12 +133,12 @@
                wx:if="{{tab == 'jsek_teachingResources'}}"
              >
                <!--  下载按钮 -->
                <image
                <!-- <image
                  src="/static/images/bookService/detail/download-icon.png"
                  class="download-image"
                  data-value="{{citem}}"
                  catchtap="downloadTeach"
                ></image>
                ></image> -->
              </view>
              <view wx:if="{{tab == 'jsek_cloudLearning'}}">
                <!-- 云学习试看图标 -->
@@ -142,14 +149,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 }}"
@@ -160,7 +167,7 @@
        </view>
        <!-- // 判断 不是商品 有子项 递归组件 -->
        <tree
          wx:else
          wx:if="{{citem.childrenCount > 0 && citem.sysType == 'CmsFolder' }}"
          isShowCheck="{{isShowCheck}}"
          bookInfo="{{bookInfo}}"
          treeList="{{[citem]}}"
@@ -169,7 +176,6 @@
          buyIds="{{buyIds}}"
          openTeachids="{{openTeachids}}"
          openLearnids="{{openLearnids}}"
        ></tree>
      </view>
      <!-- 暂无数据 -->