From 7231b5929a66bb1ec3b832be85f5e3f6ce40ad9f Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期五, 15 三月 2024 16:01:52 +0800
Subject: [PATCH] feat: 十大

---
 pages/bookServices/detail/components/tree/index.wxml |  161 +++++++++--------------------------------------------
 1 files changed, 27 insertions(+), 134 deletions(-)

diff --git a/pages/bookServices/detail/components/tree/index.wxml b/pages/bookServices/detail/components/tree/index.wxml
index ce30d1f..9d3efdd 100644
--- a/pages/bookServices/detail/components/tree/index.wxml
+++ b/pages/bookServices/detail/components/tree/index.wxml
@@ -1,168 +1,59 @@
 <view class="tree">
   <t-collapse default-value="{{activeValues}}" bind:change="handleChange">
-    <t-collapse-panel
-      wx:for="{{treeList}}"
-      wx:for-item="item"
-      wx:for-index="index"
-      wx:key="id"
-      value="{{index}}"
-      expandIcon
-    >
+    <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{index}}" expandIcon>
       <view slot="header" class="header-title">
         <view wx:if="{{tab == 'jsek_cloudLearning'}}">
-          <t-checkbox
-            icon="rectangle"
-            checked="{{item.checked}}"
-            data-item="{{item}}"
-            bind:change="checkResourceTitle"
-          />
+          <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" bind:change="checkResourceTitle" />
         </view>
         <text>{{item.name}}</text>
       </view>
-      <view
-        class="list"
-        wx:for="{{item.children}}"
-        wx:for-item="citem"
-        wx:for-index="cindex"
-        wx:key="cindex"
-      >
+      <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex">
         <!-- // 鍒ゆ柇 鏃犲瓙椤� 涓斾负鍟嗗搧item 鐩存帴鏄剧ず -->
-        <view
-          class="listItems"
-          wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}"
-        >
-          <view
-            class="itemsInfo"
-            wx:if="{{citem.name}}"
-            data-item="{{citem}}"
-            data-index="{{cindex}}"
-          >
-            <view
-              class="contentBox"
-              bind:tap="goPlayer"
-              data-item="{{citem}}"
-              data-parent="{{item}}"
-            >
+        <view class="listItems" wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}">
+          <view class="itemsInfo" wx:if="{{citem.name}}" data-item="{{citem}}" data-index="{{cindex}}">
+            <view class="contentBox" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}">
               <!-- 鏁欏璧勬簮 浜戝涔� 鍥炬爣 -->
-              <view
-                class="box-image"
-                style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"
-              >
+              <view class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}">
                 <view class="checkBox" wx:if="{{tab == 'jsek_cloudLearning'}}">
-                  <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}}"
-                  />
+                  <!-- 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}}" />
                 </view>
                 <!-- 鏁欏璧勬簮鍥炬爣 -->
                 <view class="teach-icon">
-                  <t-image
-                    wx:if="{{citem.selectType == 'audio'}}"
-                    src="/static/images/bookService/detail/audioIcon.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{citem.selectType == 'video'}}"
-                    src="/static/images/bookService/detail/video.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{citem.selectType == 'pdf'}}"
-                    src="/static/images/bookService/detail/pdf.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{citem.selectType == 'webpage'}}"
-                    src="/static/images/bookService/detail/net.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{citem.selectType == 'picture'}}"
-                    src="/static/images/bookService/detail/picture.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{citem.selectType == 'zip'}}"
-                    src="/static/images/bookService/detail/zip.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}"
-                    src="/static/images/bookService/detail/word.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}"
-                    src="/static/images/bookService/detail/excel.png"
-                    mode="aspectFill"
-                  />
-                  <t-image
-                    wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}"
-                    src="/static/images/bookService/detail/PPT.png"
-                    mode="aspectFill"
-                  />
+                  <t-image wx:if="{{citem.selectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" />
+                  <t-image wx:if="{{citem.selectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" />
+                  <t-image wx:if="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" />
+                  <t-image wx:if="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" />
+                  <t-image wx:if="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" />
+                  <t-image wx:if="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" />
+                  <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" />
+                  <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" />
+                  <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" />
                 </view>
                 <!-- 浜戝涔犲浘鏍� -->
                 <view> </view>
                 <!-- 鍚嶇О -->
-                <text
-                  class="name"
-                  style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}"
-                  >{{citem.name}}</text
-                >
+                <text class="name" style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}">{{citem.name}}</text>
               </view>
               <!-- 鏁欏璧勬簮绫诲瀷 -->
               <view class="teachClass"> {{citem.resourceClass}} </view>
-              <view
-                class="teach-btn"
-                wx:if="{{tab == 'jsek_teachingResources'}}"
-              >
+              <view class="teach-btn" wx:if="{{tab == 'jsek_teachingResources'}}">
                 <!--  涓嬭浇鎸夐挳 -->
-                <t-image
-                  src="/static/images/bookService/detail/download-icon.png"
-                  width="16"
-                  height="16"
-                  class="download"
-                  data-value="{{citem}}"
-                  catchtap="downloadTeach"
-                ></t-image>
+                <t-image src="/static/images/bookService/detail/download-icon.png" width="16" height="16" class="download" data-value="{{citem}}" catchtap="downloadTeach"></t-image>
               </view>
               <view wx:if="{{tab == 'jsek_cloudLearning'}}">
                 <!-- 浜戝涔犺瘯鐪嬪浘鏍� -->
-                <t-image
-                  src="/static/images/bookService/detail/shikan.png"
-                  class="testSee"
-                  wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"
-                ></t-image>
+                <t-image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></t-image>
                 <!-- 浜戝涔犲姞鍏ヨ喘鐗╄溅鍥炬爣 -->
-                <t-image
-                  src="/static/images/bookService/detail/cart.png"
-                  wx:if="{{citem.isShopCar}}"
-                  class="shopCar"
-                ></t-image>
+                <t-image src="/static/images/bookService/detail/cart.png" wx:if="{{citem.isShopCar}}" class="shopCar" bind:tap="onCloudShoppingCart"></t-image>
                 <!-- 浜戝涔犺喘涔板浘鏍� -->
-                <t-image
-                  src="/static/images/bookService/detail/need-buy.png"
-                  class="need-buy"
-                  wx:if="{{citem.isbuy }}"
-                ></t-image>
+                <t-image bind:tap="onCloudShoppingCart" src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></t-image>
               </view>
             </view>
           </view>
         </view>
         <!-- // 鍒ゆ柇 涓嶆槸鍟嗗搧 鏈夊瓙椤� 閫掑綊缁勪欢 -->
-        <tree
-          wx:else
-          bookInfo="{{bookInfo}}"
-          treeList="{{[citem]}}"
-          itemId="{{itemId}}"
-          tab="{{tab}}"
-          openTeachids="{{openTeachids}}"
-          openLearnids="{{openLearnids}}"
-        ></tree>
+        <tree wx:else bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}"></tree>
       </view>
       <view class="listItems" wx:if="{{children.length <= 0 && !loading}}">
         鏆傛棤鏁版嵁
@@ -173,3 +64,5 @@
     </t-collapse-panel>
   </t-collapse>
 </view>
+
+<web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view>
\ No newline at end of file

--
Gitblit v1.9.1