This commit is contained in:
zhaofang
2022-09-27 20:41:03 +08:00
parent 88c2061094
commit 0ce81064e8

View File

@@ -232,6 +232,7 @@ export default {
return; return;
} }
this.mynoteData.courseId = this.courseId; this.mynoteData.courseId = this.courseId;
this.mynoteData.courseName = this.data.name;
if(this.isEdit) { if(this.isEdit) {
apiNote.update(this.mynoteData).then(res=>{ apiNote.update(this.mynoteData).then(res=>{
if(res.status == 200) { if(res.status == 200) {
@@ -244,9 +245,9 @@ export default {
type: 1, //我发布的是1 我导入的是2 type: 1, //我发布的是1 我导入的是2
content: '', content: '',
playTime: '', playTime: '',
courseId: '',// 课程id // courseId: '',// 课程id
contentId: '',//课程内容id // contentId: '',//课程内容id
courseName: '',// 课程名称 // courseName: '',// 课程名称
openType: 1,// 1表不公开 9表完全公开 openType: 1,// 1表不公开 9表完全公开
}; };
}, 2000) }, 2000)
@@ -261,6 +262,22 @@ export default {
if(this.mynoteData.openType != 9){ if(this.mynoteData.openType != 9){
return return
} }
setTimeout(() => {
localStorage.setItem("NOTE_TEXT", '');
// clearInterval(this.autoSave);
this.getMyNote();
this.notetabType(2);
this.mynoteData = {
type: 1, //我发布的是1 我导入的是2
content: '',
playTime: '',
// courseId: '',// 课程id
// contentId: '',//课程内容id
// courseName: '',// 课程名称
openType: 1,// 1表不公开 9表完全公开
};
}, 2000)
// 是编辑新增 // 是编辑新增
let event = { let event = {
key: "PublishNote",//后台的事件key key: "PublishNote",//后台的事件key
@@ -276,26 +293,10 @@ export default {
} }
this.$store.dispatch("userTrigger", event); this.$store.dispatch("userTrigger", event);
} }
setTimeout(() => {
localStorage.setItem("NOTE_TEXT", '');
// clearInterval(this.autoSave);
this.getMyNote();
this.notetabType(2);
this.mynoteData = {
type: 1, //我发布的是1 我导入的是2
content: '',
playTime: '',
courseId: '',// 课程id
contentId: '',//课程内容id
courseName: '',// 课程名称
openType: 1,// 1表不公开 9表完全公开
};
}, 2000)
} }
}) })
} }
console.log(this.mynoteData,'this.mynoteData');
} }
}, },
beforeDestroy() { beforeDestroy() {