From aef06b129be7a3a12ac097db8e372b0cb33c6c42 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 02 四月 2024 09:15:19 +0800
Subject: [PATCH] 我的建议,笔记bug修改

---
 packageBookService/pages/bookServices/detail/components/note/note.js |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/note/note.js b/packageBookService/pages/bookServices/detail/components/note/note.js
index 5f4fb5e..3d9d9e0 100644
--- a/packageBookService/pages/bookServices/detail/components/note/note.js
+++ b/packageBookService/pages/bookServices/detail/components/note/note.js
@@ -63,7 +63,6 @@
       })
     },
     openDialog() {
-      console.log(this.properties.bookInfo.name);
       this.setData({
         submitTitle: this.properties.bookInfo.name,
         showNoteDialog: true
@@ -93,12 +92,14 @@
     },
     // 寮圭獥纭畾鎸夐挳
     confirmSuggest() {
-      if (!this.data.submitTitle) {
+      const submitTitle = this.data.submitTitle.trim()
+      const textvalue = this.data.textvalue.trim()
+      if (!submitTitle.length) {
         return wx.showToast({
           icon: 'error',
           title: '璇峰~鍐欑瑪璁版爣棰�',
         })
-      } else if (!this.data.textvalue) {
+      } else if (!textvalue.length) {
         return wx.showToast({
           icon: 'error',
           title: '璇峰~鍐欑瑪璁板唴瀹�',
@@ -240,13 +241,15 @@
       messageIds.push(id)
       wx.showModal({
         title: '鎻愮ず',
-        content: '纭鍒犻櫎璇ョ瑪璁板悧锛�',//editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭
-        editable: false,//鏄惁鏄剧ず杈撳叆妗�
-        placeholderText: '璇疯緭鍏ュ唴瀹瑰惂',//杈撳叆妗嗙殑榛樿鍐呭
+        content: '纭鍒犻櫎璇ョ瑪璁板悧锛�', //editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭
+        editable: false, //鏄惁鏄剧ず杈撳叆妗�
+        placeholderText: '璇疯緭鍏ュ唴瀹瑰惂', //杈撳叆妗嗙殑榛樿鍐呭
         success: (res) => {
           if (res.confirm) {
             app.MG.ugc
-              .delTopicMessage({ messageIds })
+              .delTopicMessage({
+                messageIds
+              })
               .then((res) => {
                 wx.showToast({
                   title: '鍒犻櫎鎴愬姛',
@@ -277,7 +280,10 @@
         submitTitle: note.name,
         noteId: note.id
       })
-      this.openDialog()
+      console.log(note.name, this.data.submitTitle);
+      this.setData({
+        showNoteDialog: true
+      })
     },
     // 缂栬緫绗旇鎺ュ彛
     updateNote() {
@@ -323,4 +329,4 @@
       })
     }
   }
-})
+})
\ No newline at end of file

--
Gitblit v1.9.1