From b97bfcb85b2ded3b1f380e9a98b54b836faabba5 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期五, 28 三月 2025 14:26:35 +0800
Subject: [PATCH] 除过数字教材外的页面的登录迁移

---
 pages/bookExhibitionDetails/index.js |   50 +++++++++++++++++---------------------------------
 1 files changed, 17 insertions(+), 33 deletions(-)

diff --git a/pages/bookExhibitionDetails/index.js b/pages/bookExhibitionDetails/index.js
index 21ac2b4..8f4057a 100644
--- a/pages/bookExhibitionDetails/index.js
+++ b/pages/bookExhibitionDetails/index.js
@@ -1,5 +1,8 @@
 // pages/bookExhibitionDetails/index.js
 const app = getApp()
+import {
+  loginInfo
+} from '../../assets/js/login';
 Page({
 
   /**
@@ -17,7 +20,6 @@
     bookExhibitionList: [],
     navBarHeight: '',
     barHeight: '',
-    subtitleName: '',
     totalSize: '',
     passId: '',
     isMore: null,
@@ -34,18 +36,10 @@
       navBarHeight: navBarHeight,
       barHeight: systInfo.statusBarHeight,
     })
-    console.log();
-
-
     this.setData({
-      bookName: options.bookName,
-      subtitleName: options.subtitleName,
       passId: options.id
     })
-
-    const passId = options.id
-
-    this.bookExhibitionGet(passId)
+    this.bookExhibitionGet(this.data.passId)
     this.getBookExhibitionDetails()
   },
 
@@ -94,19 +88,14 @@
   /**
    * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
    */
-  onShareAppMessage() {
-
-  },
+  onShareAppMessage() {},
+  onShareTimeline() {},
 
   bookExhibitionGet(passId) {
     this.setData({
       loading: true,
       hidden: true,
     })
-    wx.showLoading({
-      title: '鍔犺浇涓�...',
-    })
-    console.log(passId, 8988989);
     app.MG.store.getProductDetail({
       storeInfo: 'jsek_bookFair', //鍟嗗搧搴�
       path: '*', //璺緞
@@ -120,24 +109,27 @@
         Creator: []
       }
     }).then(res => {
-      console.log(res.datas.datas.Creator.Name, 'res');
+      console.log(res.datas, 'res');
       this.setData({
         bookName: res.datas.name,
         bookBeginDate: res.datas.beginDate,
         bookCreator: res.datas.datas.Creator.Name,
         bookContent: res.datas.content,
-        bookImage: res.datas.icon
-      });
-      wx.hideLoading()
-      this.setData({
+        bookImage: res.datas.icon || '/static/images/bookExhibitionList/banner.png',
         loading: false,
         hidden: false,
-      })
+      });
+      if (res.datas.subtitle == undefined) {
+        res.datas.subtitle = "";
+      }
+      let title = res.datas.subtitle + this.data.bookName
+      wx.setNavigationBarTitle({
+        title: title
+      });
     })
   },
   //涔﹀睍璇︽儏鎺ュ彛
   getBookExhibitionDetails() {
-
     app.MG.store.getProductList({
       path: '*',
       storeInfo: 'jsek_bookFair',
@@ -155,13 +147,9 @@
         Creator: []
       }
     }).then(res => {
-
       this.setData({
         bookExhibitionList: res.datas,
-        totalSize: res.total
-      })
-
-      this.setData({
+        totalSize: res.total,
         loading: false,
         hidden: false,
       })
@@ -179,10 +167,7 @@
   },
   // 瑙﹀簳鍑芥暟
   onReachBottom() {
-    console.log(this.data.bookExhibitionList.length);
-    console.log(this.data.totalSize);
     if (this.data.bookExhibitionList.length < this.data.totalSize) {
-      console.log(11111);
       this.setData({
         isMore: true,
         start: this.data.start + 1
@@ -196,7 +181,6 @@
         this.setData({
           isMore: false
         })
-        console.log('300');
       }, 300)
     }
   },

--
Gitblit v1.9.1