From df95501a7d85d5490f3720dac7f93ecb05bfe85e Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 11 十月 2024 18:20:34 +0800
Subject: [PATCH] shuzhan

---
 pages/digitalCourses/digitalCoursesDetails/index.js |    6 +++---
 pages/bookExhibitionDetails/index.js                |    2 +-
 pages/bookExhibitionDetails/index.wxml              |    8 +-------
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/pages/bookExhibitionDetails/index.js b/pages/bookExhibitionDetails/index.js
index ba8105a..e65a6e4 100644
--- a/pages/bookExhibitionDetails/index.js
+++ b/pages/bookExhibitionDetails/index.js
@@ -135,7 +135,7 @@
         bookBeginDate: res.datas.beginDate,
         bookCreator: res.datas.datas.Creator.Name,
         bookContent: res.datas.content,
-        bookImage: res.datas.icon,
+        bookImage: res.datas.icon || '/static/images/bookExhibitionList/banner.png',
         loading: false,
         hidden: false,
       });
diff --git a/pages/bookExhibitionDetails/index.wxml b/pages/bookExhibitionDetails/index.wxml
index e5accdf..83f224b 100644
--- a/pages/bookExhibitionDetails/index.wxml
+++ b/pages/bookExhibitionDetails/index.wxml
@@ -25,24 +25,18 @@
 
       </view>
     </view>
-
-
-
     <image class="partingBox" src="/static/images/bookExhibitionDetails/Parting.png" mode="aspectFill" />
     <view class="bannerBox">
       <image src="{{bookImage}}" mode="aspectFit" />
     </view>
-
-
     <view class="textContent">
       <rich-text nodes="{{bookContent}}"></rich-text>
-
       <!-- <text>{{bookContent}}</text> -->
     </view>
     <view class="outsideBooksBox">
       <view class="booksBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBookDetails">
         <view class="outsideBooksImageBox">
-          <image src="{{item.icon}}" mode="aspectFit" />
+          <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" />
         </view>
         <view class="booksTextBox"> <text>{{item.name}}</text></view>
         <view class="boosAuthor">{{item.author}}</view>
diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js
index f1ea6fd..344b8b8 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.js
+++ b/pages/digitalCourses/digitalCoursesDetails/index.js
@@ -196,6 +196,7 @@
    */
   onShow() {
     if (this.data.tabValue == 2 && this.data.selectActive == 'learn') {
+      console.log(12333)
       this.getPlayerList()
       this.getResource()
       this.getRelationBook()
@@ -554,7 +555,6 @@
           const data = test.filter(
             (item) => item.type == 'questionBankFolder' && item.childrenFolderCount > 0
           )
-
           if (data.length > 0) {
             let list = []
             let addNum = query.cmsPath.length > 5 ? 7 : query.cmsPath.length > 6 ? 8 : 6
@@ -562,8 +562,8 @@
             this.getTreeList(data, num, list, '\\', addNum)
             list = this.ensureTreeConsistency(list)
             let result = [];
-            this.findChildIds(list[0].children, result)
-            this.countLeafNodes(list[0].children)
+            this.findChildIds(list[0]?.children, result)
+            this.countLeafNodes(list[0]?.children)
             this.setData({
               testList: list[0].children,
               openTeachids: result,

--
Gitblit v1.9.1