| | |
| | | }) |
| | | }, |
| | | openDialog() { |
| | | console.log(this.properties.bookInfo.name); |
| | | this.setData({ |
| | | submitTitle: this.properties.bookInfo.name, |
| | | showNoteDialog: true |
| | |
| | | }, |
| | | // 弹窗确定按钮 |
| | | 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: '请填写笔记内容', |
| | |
| | | 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: '删除成功', |
| | |
| | | submitTitle: note.name, |
| | | noteId: note.id |
| | | }) |
| | | this.openDialog() |
| | | console.log(note.name, this.data.submitTitle); |
| | | this.setData({ |
| | | showNoteDialog: true |
| | | }) |
| | | }, |
| | | // 编辑笔记接口 |
| | | updateNote() { |
| | |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |