From e15c24b6d1dbe61e3423b37f6163a93fc69eb0bc Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Sun, 25 Sep 2022 12:40:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/portal/course/Detail.vue | 66 ++++++++++++++++++------------ src/views/portal/course/Index.vue | 8 ++-- src/views/user/Mynotes.vue | 38 +++++++++++++---- 3 files changed, 74 insertions(+), 38 deletions(-) diff --git a/src/views/portal/course/Detail.vue b/src/views/portal/course/Detail.vue index 18e2710a..688418eb 100644 --- a/src/views/portal/course/Detail.vue +++ b/src/views/portal/course/Detail.vue @@ -73,13 +73,12 @@
详细介绍:
- +
{{item.section.name}}
-
{{getType(it.contentType)}}{{it.contentName}}
@@ -87,6 +86,14 @@
+ +
+
+
{{item.contentName}}
+
+
+
+
@@ -185,31 +192,38 @@ export default { ctoUsers.push({aid:item.teacherId,name:item.teacherName,sex:item.sex}); }) this.toUsers=ctoUsers; - this.loadAuthorInfo(rs.result.teachers,userIds) + this.loadAuthorInfo(rs.result.teachers,userIds); } - this.courseInfo=rs.result.course; - this.courseInfo.score = rs.result.course.score; - if(rs.result.course.tags!=''){ - this.tagArray=rs.result.course.tags.split(','); - } - if(!rs.result.course.resOwner3){ - this.courseInfo.resOwner = this.resOwnerName(rs.result.course.resOwner2); - } else{ - this.courseInfo.resOwner = this.resOwnerName(rs.result.course.resOwner3); - } - this.teachers=rs.result.teachers; - this.contentList=rs.result.contents; - let treeList=[]; - rs.result.sections.forEach(sec=>{ - let treeNode={section:sec,contents:[]} - rs.result.contents.forEach(c=>{ - if(c.csectionId==sec.id){ - treeNode.contents.push(c); - } - }); - treeList.push(treeNode); - }) - this.catalogTree=treeList; + this.courseInfo=rs.result.course; + this.courseInfo.score = rs.result.course.score; + if(rs.result.course.tags!=''){ + this.tagArray=rs.result.course.tags.split(','); + } + if(!rs.result.course.resOwner3){ + this.courseInfo.resOwner = this.resOwnerName(rs.result.course.resOwner2); + } else{ + this.courseInfo.resOwner = this.resOwnerName(rs.result.course.resOwner3); + } + this.teachers=rs.result.teachers; + if(this.courseInfo.type == 10) { + this.contentList=rs.result.contents; + } else { + let treeList=[]; + rs.result.sections.forEach(sec=>{ + let treeNode={section:sec,contents:[]} + rs.result.contents.forEach(c=>{ + if(c.csectionId==sec.id){ + treeNode.contents.push(c); + } + }); + treeList.push(treeNode); + }) + this.catalogTree=treeList; + } + + + + this.showQrimage(); this.isSignUp(); }else{ diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index 52203f53..79d2b6d9 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -517,11 +517,11 @@ export default { //此处使用window.open有问题 //window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`); } else { - if (item.type == 10) { - return this.webBaseUrl + "/course/micro?id=" + item.id; - } else if (item.type == 20) { + // if (item.type == 10) { + // return this.webBaseUrl + "/course/micro?id=" + item.id; + // } else if (item.type == 20) { return this.webBaseUrl + "/course/detail?id=" + item.id; - } + // } } return ""; diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index 42cb7e85..71d8ea16 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -80,6 +80,15 @@
+ + { - this.datalist = res.result.list + this.datalist = res.result.list; + this.count = res.result.count; }) }, // 根据秒数转换成对应的时分秒 getHMS(time) { - const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600) - const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60) - const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60) -// console.log(hour + ':' + min + ':' + sec) - return hour + ':' + min + ':' + sec -} + const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600) + const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60) + const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60) + // console.log(hour + ':' + min + ':' + sec) + return hour + ':' + min + ':' + sec + }, + handleSizeChange(val) { + this.paegSize = val; + this.pageIndex = 1; + this.noteData(this.num); + console.log(`每页 ${val} 条`); + }, + handleCurrentChange(val) { + this.pageIndex = val; + this.noteData(this.num); + console.log(`当前页: ${val}`); + } } }