From 2ee8ddb1ecac7df4198e54e08ec7f22daf4b07c0 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期五, 03 一月 2025 16:57:38 +0800
Subject: [PATCH] 111

---
 pages/digitalCourses/digitalCoursesDetails/components/question/question.js |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/pages/digitalCourses/digitalCoursesDetails/components/question/question.js b/pages/digitalCourses/digitalCoursesDetails/components/question/question.js
index f17fd45..c8a3132 100644
--- a/pages/digitalCourses/digitalCoursesDetails/components/question/question.js
+++ b/pages/digitalCourses/digitalCoursesDetails/components/question/question.js
@@ -147,6 +147,7 @@
         }
 
         let submitData = {
+          bookId: this.properties.bookInfo.id,
           content: this.data.content.replace(/^\s*|\s*$/g, ""),
           name: this.data.userName.replace(/^\s*|\s*$/g, ""),
           email: "",
@@ -212,7 +213,6 @@
       this.setData({
         noList: false,
       });
-      let topicId;
       app.MG.ugc
         .getTopicMessageList({
           appRefCode: app.config.appRefCode,
@@ -227,22 +227,24 @@
           if (!res.datas.length) {
             return this.setData({
               loading: false,
-              noList: true,
               noteList: res.datas,
             });
           }
-          // notePage.value.total = res.totalSize
+          let list = []
           res.datas.forEach((item) => {
             item.title = JSON.parse(item.content).content;
             item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm:ss");
             item.updateDate = moment(item.updateDate).format("YYYY-MM-DD HH:mm:ss");
             item.feedBack = item.feedBack ? item.feedBack : '鏆傛湭鍥炲'
+            if (this.properties.bookInfo.id == JSON.parse(item.content).bookId) {
+              list.push(item)
+            }
           });
           this.setData({
-            "pageCount.total": res.totalSize,
-            onlineQuestionsList: res.datas,
+            "pageCount.total": list.length,
+            onlineQuestionsList: list,
             loading: false,
-            noList: false,
+            noList: list.length ? false : true,
           });
           console.log(this.data.onlineQuestionsList, 3456)
         });

--
Gitblit v1.9.1