|
|
@@ -471,9 +471,9 @@ export default {
|
|
|
this.simulateAnswer();
|
|
|
},
|
|
|
curSelectId() {
|
|
|
- if (this.curToolbarIcon == 'note') {
|
|
|
+ if (this.curToolbarIcon === 'note') {
|
|
|
this.getNote();
|
|
|
- } else if (this.curToolbarIcon == 'collect') {
|
|
|
+ } else if (this.curToolbarIcon === 'collect') {
|
|
|
this.getCollect();
|
|
|
}
|
|
|
},
|
|
|
@@ -972,12 +972,10 @@ export default {
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
delNote(id) {
|
|
|
- if (!id) {
|
|
|
- if (!this.oldRichData || !this.oldRichData.id) return;
|
|
|
- id = this.oldRichData.id;
|
|
|
- }
|
|
|
- DeleteMyNote({ id }).then(() => {
|
|
|
- this.allNoteList = this.allNoteList.filter((x) => x.id !== id);
|
|
|
+ const noteId = id || (this.oldRichData && this.oldRichData.id);
|
|
|
+ if (!noteId) return;
|
|
|
+ DeleteMyNote({ id: noteId }).then(() => {
|
|
|
+ this.allNoteList = this.allNoteList.filter((x) => x.id !== noteId);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
@@ -1053,7 +1051,7 @@ export default {
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- DeleteMyCollect({ id: id }).then(() => {
|
|
|
+ DeleteMyCollect({ id }).then(() => {
|
|
|
this.allCottectList = this.allCottectList.filter((x) => x.id !== id);
|
|
|
});
|
|
|
})
|