闫增涛
2024-04-02 aef06b129be7a3a12ac097db8e372b0cb33c6c42
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如果为true,这就是输入框的内容
        editable: false,//是否显示输入框
        placeholderText: '请输入内容吧',//输入框的默认内容
        content: '确认删除该笔记吗?', //editable如果为true,这就是输入框的内容
        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 @@
      })
    }
  }
})
})