diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index fbc4a3e5..fda3b964 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -14,7 +14,7 @@
@@ -86,7 +86,7 @@ alt=""> 视频位置 公开 私密 - 取消 + 取消 保存 @@ -133,6 +133,7 @@ export default { courseName: '',// 课程名称 openType: 9,// 1表不公开 9表完全公开 }, + content_new: '', editRadio: 9 , // 单选按钮(笔记公开状态)状态值 : 1- 私密 9-公开 noteList: [], type: 1, // 1自动保存 2点击保存 @@ -254,13 +255,14 @@ export default { }, notetabType(num) { this.notetab = num; - // if(num == 1) { - // this.autoSaveNote(); - // } + if(num == 1) { + this.content_new = ''; // 清空内容 + this.btnPlayTime=true; // 显示添加视频时间 + } }, saveNote() { let that = this; - if (this.mynoteData.content == '') { + if (this.content_new == '') { this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 }); return; } @@ -268,6 +270,10 @@ export default { this.mynoteData.courseName = this.data.name; this.mynoteData.openType = this.editRadio; if(this.isEdit) { + if (this.mynoteData.content == '') { + this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 }); + return; + } apiNote.update(this.mynoteData).then(res=>{ if(res.status == 200) { this.inAnimationText = '笔记编辑成功'; @@ -289,10 +295,11 @@ export default { } }) } else { + this.mynoteData.content = this.content_new; // 赋值笔记内容 apiNote.save(this.mynoteData).then(res => { if (res.status == 200) { if (!this.mynoteData.id) { - this.inAnimationText = '笔记保存成功,U币+2'; + this.inAnimationText = '笔记保存成功,U币+5'; this.inAnimation = true; this.editRadio = 9; // 重置默认笔记公开状态 this.mynoteData.openType = 9; diff --git a/src/components/Qa/ucList.vue b/src/components/Qa/ucList.vue index 963bad12..d5d5e4b3 100644 --- a/src/components/Qa/ucList.vue +++ b/src/components/Qa/ucList.vue @@ -33,7 +33,7 @@ -
+