From 7eab4acb4bb2060970f81840e5d2b72f259b07cb Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期四, 28 三月 2024 11:40:19 +0800
Subject: [PATCH] yangshu

---
 packageBookService/pages/bookServices/detail/index.wxml |  129 +++++++++++++++++++++++++++++++-----------
 1 files changed, 95 insertions(+), 34 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.wxml b/packageBookService/pages/bookServices/detail/index.wxml
index 204ed68..630ae8b 100644
--- a/packageBookService/pages/bookServices/detail/index.wxml
+++ b/packageBookService/pages/bookServices/detail/index.wxml
@@ -95,27 +95,78 @@
       </view>
     </view>
     <view class="book-resource">
-      <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class">
-        <t-tab-panel label="鍥句功绠�浠�" value="brief" style="{{tabPanelstyle}}">
-          <book-brief content="{{bookDetail.content}}" authorIntroduction="{{bookDetail.authorIntroduction}}" wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"></book-brief>
-          <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" class="noData">
+      <t-tabs
+        defaultValue="{{tabValue}}"
+        bind:change="onTabsChange"
+        t-class="custom-tabs"
+        t-class-content="custom-panel"
+        class="tab-class"
+      >
+        <t-tab-panel
+          label="鍥句功绠�浠�"
+          icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}"
+          value="brief"
+          style="{{tabPanelstyle}}"
+        >
+          <book-brief
+            content="{{bookDetail.content}}"
+            authorIntroduction="{{bookDetail.authorIntroduction}}"
+            wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"
+          ></book-brief>
+          <view
+            wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}"
+            class="noData"
+          >
             <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
           </view>
         </t-tab-panel>
-        <t-tab-panel label="鐢靛瓙涔�" value="jsek_eBook" style="{{tabPanelstyle}}">
-          <epub-view fileInfo="{{fileInfo}}" id="eBook" class="webView"></epub-view>
-        </t-tab-panel>
-        <t-tab-panel label="鏁欏璧勬簮" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}">
-          <view wx:if="{{!loading && teach.length && !noResources}}">
-            <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource>
-            <tree openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}"></tree>
+        <!-- <t-tab-panel
+          label="鐢靛瓙涔�"
+          icon="{{tabValue == 'jsek_eBook' ? eBookClickIcon : eBookIcon}}"
+          value="jsek_eBook"
+          style="{{tabPanelstyle}}"
+        >
+        </t-tab-panel> -->
+        <t-tab-panel
+          label="鏁欏璧勬簮"
+          icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}"
+          value="jsek_teachingResources"
+          class="{{loading ? 'loading': ''}}"
+        >
+          <view
+            wx:if="{{!loading && teach.length && !noResources && applyState}}"
+          >
+            <teach-resource
+              applyState="{{applyState}}"
+              rejectCause="{{rejectCause}}"
+              deadline="{{deadline}}"
+              bind:applyResource="applyResource"
+              applyResourceLoading="{{applyResourceLoading}}"
+            ></teach-resource>
+            <tree
+              id="teach-tree"
+              openIds="{{openTeachids}}"
+              bookInfo="{{bookDetail}}"
+              treeList="{{teach}}"
+              tab="{{tabValue}}"
+              applyState="{{applyState}}"
+              bind:downloadTeach="downloadTeach"
+              bind:handleTree="handleTree"
+              openTeachids="{{openTeachids}}"
+              wx:if="{{teach.length}}"
+            ></tree>
           </view>
           <t-loading theme="circular" size="60rpx" class="loading" loading="{{loading }}" />
           <view wx:if="{{noResources}}" class="noData">
             <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
           </view>
         </t-tab-panel>
-        <t-tab-panel label="浜戝涔�" value="jsek_cloudLearning" style="{{tabPanelstyle}}">
+        <t-tab-panel
+          label="浜戝涔�"
+          icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}"
+          value="jsek_cloudLearning"
+          style="{{tabPanelstyle}}"
+        >
           <view wx:if="{{!loading && learn.length}}">
             <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}"></learn-resource>
             <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}"></tree>
@@ -124,7 +175,12 @@
             <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
           </view>
         </t-tab-panel>
-        <t-tab-panel label="浜戞祴璇�" value="questionBank" style="{{tabPanelstyle}}">
+        <t-tab-panel
+          label="浜戞祴璇�"
+          icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}"
+          value="questionBank"
+          style="{{tabPanelstyle}}"
+        >
           <view wx:if="{{!loading && test.length}}">
             <test-resource list="{{test}}" bookInfo="{{bookDetail}}" mockData="{{mockData}}"></test-resource>
           </view>
@@ -132,30 +188,15 @@
             <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
           </view>
         </t-tab-panel>
-        <t-tab-panel label="浜戠瑪璁�" value="jsek_note" style="{{tabPanelstyle}}">
+        <t-tab-panel
+          label="浜戠瑪璁�"
+          icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}"
+          value="jsek_note"
+          style="{{tabPanelstyle}}"
+        >
           <note bookInfo="{{bookDetail}}" id="note" class="note-list"></note>
         </t-tab-panel>
       </t-tabs>
-    </view>
-    <!-- 璐拱鎸夐挳 -->
-    <view class="box-bottom">
-      <view class="bottom-btn" bind:tap="appplyElectronicBook">
-        <view>
-          <t-image loading="" src="/static/images/bookService/detail/ebook.png"></t-image>
-        </view>
-        <view class="btn-text">鐢靛瓙鏍蜂功鐢宠</view>
-      </view>
-      <view class="bottom-btn" bind:tap="appplyPaperBook">
-        <view>
-          <t-image src="/static/images/bookService/detail/paper-book.png"></t-image>
-        </view>
-        <view class="btn-text">绾歌川鏍蜂功鐢宠</view>
-      </view>
-      <view class="shopCar {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" bind:tap="addBookShopcCar" wx:if="{{tabValue != 'jsek_eBook'}}">鍔犲叆璐墿杞�</view>
-      <view class="buy  {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" bind:tap="buyBtn" wx:if="{{tabValue != 'jsek_eBook'}}">绔嬪嵆璐拱</view>
-      <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}">鍔犲叆璐墿杞�</view>
-      <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}">绔嬪嵆璐拱</view>
-      <view class="read buyColor" bind:tap="goRead" wx:if="{{tabValue == 'jsek_eBook' && bookBuy}}">绔嬪嵆鏌ョ湅</view>
     </view>
   </scroll-view>
   <!-- 鎴戣寤鸿寮圭獥 -->
@@ -169,4 +210,24 @@
       <view class="num" wx:if="{{num > 0}}">{{num}}</view>
     </view>
   </view>
+  <!-- 璐拱鎸夐挳 -->
+  <view class="box-bottom">
+    <view class="bottom-btn" bind:tap="appplyElectronicBook">
+      <view>
+        <t-image loading="" src="/static/images/bookService/detail/ebook.png"></t-image>
+      </view>
+      <view class="btn-text">鐢靛瓙鏍蜂功鐢宠</view>
+    </view>
+    <view class="bottom-btn" bind:tap="appplyPaperBook">
+      <view>
+        <t-image src="/static/images/bookService/detail/paper-book.png"></t-image>
+      </view>
+      <view class="btn-text">绾歌川鏍蜂功鐢宠</view>
+    </view>
+
+    <view class="shopCar {{((tabValue == 'brief' && bookBuy) || tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" bind:tap="addBookShopcCar">鍔犲叆璐墿杞�</view>
+    <view class="buy  {{((tabValue == 'brief' && bookBuy) ||tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" bind:tap="buyBtn">绔嬪嵆璐拱</view>
+    <view class="buy shopCarColor" bind:tap="goRead" wx:if="{{tabValue == 'brief' && bookBuy}}">绔嬪嵆鏌ョ湅</view>
+    <view class="buy shopCarColor" bind:tap="goRead" wx:if="{{tabValue == 'brief' && !bookBuy}}">鍦ㄧ嚎璇曡</view>
+  </view>
 </view>
\ No newline at end of file

--
Gitblit v1.9.1