diff --git a/src/api/phase2/note.js b/src/api/phase2/note.js index 9495d4ae..1c69aa7c 100644 --- a/src/api/phase2/note.js +++ b/src/api/phase2/note.js @@ -110,7 +110,7 @@ const ids=function (data){ * } * */ const exportExcel=function (data){ - return ajax.post('/xboe/subgroup/m/noteinfo/exportExcel',data); + return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data); } /** @@ -120,7 +120,7 @@ const exportExcel=function (data){ * } * */ const exportPdf=function (data){ - return ajax.post('/xboe/subgroup/m/noteinfo/pdf',data); + return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/exportPdf',data); } export default { diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index 776fd793..9ce803e4 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -20,8 +20,9 @@ -
-
+
+
+
{{note.sysCreateTime}} @@ -53,23 +54,45 @@
已经到底啦
+
+
+ +
你还没有记录此课程的笔记哦~
+
-
- -
你还没有记录此课程的笔记哦~
+
+

+ {{mynoteData.sysCreateTime}} + {{mynoteData.openType == 1?'公开':'私密'}} + +

+
+
+ + {{formatSeconds(mynoteData.playTime)}} + +
+
+ + +
+
-
+
视频位置 公开 私密 + 取消 保存
- 笔记保存成功,U币+2 + {{inAnimationText}}
@@ -93,6 +116,8 @@ export default { name: 'MyNote', data() { return { + inAnimationText:'笔记保存成功,U币+2', + isEdit:false, courseId:'', inAnimation: false, radio: '1', @@ -161,8 +186,10 @@ export default { }, 10000); }, noteEdit(note) { + console.log(note,'note'); + this.isEdit = true; this.mynoteData = note; - this.notetabType(1); + // this.notetabType(1); }, noteDel(note) { this.$confirm('您确定要删除这条笔记吗?', '删除提示', { @@ -205,10 +232,31 @@ export default { return; } this.mynoteData.courseId = this.courseId; - console.log(this.mynoteData,'this.mynoteData'); - apiNote.save(this.mynoteData).then(res => { + if(this.isEdit) { + apiNote.update(this.mynoteData).then(res=>{ + if(res.status == 200) { + this.inAnimationText = '笔记编辑成功'; + this.inAnimation = true; + this.isEdit = false; + setTimeout(() => { + this.getMyNote(); + this.mynoteData = { + type: 1, //我发布的是1 我导入的是2 + content: '', + playTime: '', + courseId: '',// 课程id + contentId: '',//课程内容id + courseName: '',// 课程名称 + openType: 1,// 1表不公开 9表完全公开 + }; + }, 2000) + } + }) + } else { + apiNote.save(this.mynoteData).then(res => { if (res.status == 200) { if (!this.mynoteData.id) { + this.inAnimationText = '笔记保存成功,U币+2'; this.inAnimation = true; if(this.mynoteData.openType != 9){ return @@ -245,6 +293,9 @@ export default { }, 2000) } }) + } + console.log(this.mynoteData,'this.mynoteData'); + } }, beforeDestroy() { @@ -341,7 +392,17 @@ export default { padding: 0; } } - + .sm { + width: 50px; + height: 22px; + border-radius: 10px; + border: 1px solid #3379FB; + color: #3379FB; + font-size: 12px; + line-height: 50px; + margin-left: 20px; + padding: 3px 10px; + } .newcote-content { margin: 30px 0px; box-sizing: border-box; @@ -373,17 +434,7 @@ export default { font-size: 14px; padding-bottom: 20px; - .sm { - width: 50px; - height: 22px; - border-radius: 10px; - border: 1px solid #3379FB; - color: #3379FB; - font-size: 12px; - line-height: 50px; - margin-left: 20px; - padding: 3px 10px; - } + .more { margin-top: 12px; diff --git a/src/components/NoteUpload/index.vue b/src/components/NoteUpload/index.vue new file mode 100644 index 00000000..438679aa --- /dev/null +++ b/src/components/NoteUpload/index.vue @@ -0,0 +1,255 @@ + + + + + + \ No newline at end of file diff --git a/src/icons/svg/enclisure.svg b/src/icons/svg/enclisure.svg new file mode 100644 index 00000000..925a620e --- /dev/null +++ b/src/icons/svg/enclisure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/red-start.svg b/src/icons/svg/red-start.svg new file mode 100644 index 00000000..fff068df --- /dev/null +++ b/src/icons/svg/red-start.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/up-char.svg b/src/icons/svg/up-char.svg new file mode 100644 index 00000000..629d9392 --- /dev/null +++ b/src/icons/svg/up-char.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index 1a289b38..c505bfba 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -1,25 +1,25 @@