diff --git a/src/api/cesource/index.js b/src/api/cesource/index.js index c4fc0291..f19b6b70 100644 --- a/src/api/cesource/index.js +++ b/src/api/cesource/index.js @@ -17,7 +17,6 @@ import errorCode from '@/utils/errorCode' *delete请求 axios.delete(url[, config]) */ - console.log(process.env.VUE_APP_CESOURCE_BASE_API ,'lmj') const ReLoginUrl="/login"; const TokenName='XBOE-Access-Token'; /**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/ diff --git a/src/assets/images/icon/note-del.png b/src/assets/images/icon/note-del.png new file mode 100644 index 00000000..d725fd23 Binary files /dev/null and b/src/assets/images/icon/note-del.png differ diff --git a/src/assets/images/icon/note-edit.png b/src/assets/images/icon/note-edit.png new file mode 100644 index 00000000..b138f77e Binary files /dev/null and b/src/assets/images/icon/note-edit.png differ diff --git a/src/assets/styles/portal-index.scss b/src/assets/styles/portal-index.scss index 33959618..a5ed2489 100644 --- a/src/assets/styles/portal-index.scss +++ b/src/assets/styles/portal-index.scss @@ -120,3 +120,18 @@ vertical-align: top; padding: 4px 12px; } + /**滚动条的宽度*/ +::-webkit-scrollbar { + width: 5px; + height: 5px; +} + +/*滚动条的滑块*/ +::-webkit-scrollbar-thumb { + background-color: #D8D8D8; + border-radius: 5px; +} + +::-webkit-scrollbar-thumb:hover { + background: #D8D8D8; +} diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index d750e01b..7cb97fca 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -9,16 +9,17 @@
- 8:40 + {{mynoteData.playTime}}
@@ -26,33 +27,43 @@
-
- 2022-06-21 21:35:12 私密 -
+
+ {{note.sysCreateTime}} + {{note.openType == 1?'公开':'私密'}} + + + + + + + 删除 + 编辑 + + + + + +
- 8:40 + {{note.playTime}}
- 在做策略写方案的时候,都经常错套。都要照着这个理论的要求来实施营销传播,写PPT时也要照着这个理论的框架来写。 - - 我见划公司的,在做策略写方案的时候,都经常不管是什么行业、企业处在什么来实施营销传播,写PPT时也要照着这个理论的框架来写。 + {{note.content}}
已经到底啦
-
你还没有记录此课程的笔记哦~
-
视频位置 公开 私密 - 保存 + 保存
@@ -74,6 +85,7 @@ return { radio:'1', notetab:1, + autoSave:null, mynoteData:{ type:1, //我发布的是1 我导入的是2 content:'', @@ -84,6 +96,7 @@ openType:1,// 1表不公开 9表完全公开 }, noteList:[], + type:1, // 1自动保存 2点击保存 }; }, computed: { @@ -92,7 +105,16 @@ mounted() { this.mynoteData.courseId = this.data.courseId; this.mynoteData.contentId = this.data.id; + if(localStorage.getItem("NOTE_TEXT") !=''){ + this.mynoteData.content = localStorage.getItem("NOTE_TEXT"); + this.notetab = 1; + } this.getMyNote(); + // this.autoSaveNote(); + this.autoSave = setInterval(()=>{ + localStorage.setItem("NOTE_TEXT",this.mynoteData.content); + console.log("2222222222"); + },10000); }, watch:{ intTimeNote(val) { @@ -100,10 +122,38 @@ } }, methods: { + onfocusEnevt(e) { + console.log(e,'e'); + }, + autoSaveNote() { + + }, + noteEdit() { + + }, + noteDel(note) { + this.$confirm('您确定要删除这条笔记吗?', '删除提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(async() => { + apiNote.del(note.id).then(res=>{ + if(res.status == 200) { + this.getMyNote(); + } else { + this.$message({ type: 'error', message: res.message, offset: 50 }); + } + }) + }) + .catch((err) => { + this.$message({ type: 'info', message: '已取消删除', offset: 50 }); + }); + + }, getMyNote() { apiNote.myCourse(this.mynoteData.courseId).then(res=>{ if(res.status == 200) { - + this.noteList = res.result; } }) }, @@ -114,19 +164,30 @@ this.notetab = num; }, saveNote() { - apiNote.save(this.mynoteData).then(res=>{ - + if(res.status == 200 ) { + this.$message.warning('添加成功'); + this.getMyNote(); + this.notetabType(2); + } }) } - } + }, + beforeDestroy() { + clearInterval(this.autoSave); + this.autoSave = null; + }, }