From b212136f20cc7f98c3616c97936978b1d1065b36 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期三, 03 四月 2024 19:32:06 +0800
Subject: [PATCH] 购买

---
 packageBookService/pages/bookServices/detail/index.wxml |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.wxml b/packageBookService/pages/bookServices/detail/index.wxml
index 1461b12..9555a2c 100644
--- a/packageBookService/pages/bookServices/detail/index.wxml
+++ b/packageBookService/pages/bookServices/detail/index.wxml
@@ -12,7 +12,7 @@
   <scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom">
     <!-- 鍥句功璇︽儏 -->
     <view class="book-box">
-      <view class="book-detail">
+      <view class="book-detail" id="book-detail">
         <view class="detail-left">
           <view class="book-img">
             <image loading="" src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" mode="aspectFill" aria-label="{{bookDetail.name}}" />
@@ -95,7 +95,7 @@
       </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-tabs value="{{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">
@@ -121,8 +121,9 @@
         </t-tab-panel>
         <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>
+            <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}" isshowDrawBtn="{{isshowDrawBtn}}"></learn-resource>
+
+            <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree>
           </view>
           <view wx:if="{{noResources}}" class="noData">
             <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
@@ -135,6 +136,9 @@
         </t-tab-panel>
         <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-tab-panel label="鐩稿叧鍥句功" icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}" value="related_books" style="{{tabPanelstyle}}">
+          <related-books relatedBookData="{{relatedBookData}}" relatedBookLoading="{{relatedBookLoading}}" noRelatedBookData="{{noRelatedBookData}}" bind:goBookDetails="goBookDetails"></related-books>
         </t-tab-panel>
       </t-tabs>
     </view>
@@ -164,16 +168,17 @@
       </view>
       <view class="btn-text">绾歌川鏍蜂功鐢宠</view>
     </view>
-    <view class="bottom-btn tryRead" bind:tap="goRead" wx:if="{{!bookBuy}}">
+    <view class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy}}">
       <view>
         <t-image src="/static/images/bookService/detail/shidu.png"></t-image>
       </view>
       <view class="btn-text">璇曡</view>
     </view>
 
-    <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy}}">鍔犲叆璐墿杞�</view>
-    <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy}}">绔嬪嵆璐拱</view>
-    <view class="buy read " bind:tap="goRead" wx:if="{{bookBuy}}">绔嬪嵆鏌ョ湅</view>
+    <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell}}">鍔犲叆璐墿杞�</view>
+    <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell}}">绔嬪嵆璐拱</view>
+    <view class="buy receiveColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell}}">鍏嶈垂棰嗗彇</view>
+    <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">绔嬪嵆鏌ョ湅</view>
   </view>
 </view>
 

--
Gitblit v1.9.1