From d048b7d8995240fe6d04c7f26cca8bd48841e162 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Sat, 22 Oct 2022 15:30:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HomePage/courseList.vue | 12 ++++----- src/views/homepage/page.vue | 36 +++++++++----------------- src/views/portal/follow/index.vue | 25 +++++++++++------- 3 files changed, 33 insertions(+), 40 deletions(-) diff --git a/src/components/HomePage/courseList.vue b/src/components/HomePage/courseList.vue index 5f14d3c6..202be7ea 100644 --- a/src/components/HomePage/courseList.vue +++ b/src/components/HomePage/courseList.vue @@ -13,20 +13,18 @@
- -
-
{{item.info.name || item.contentInfo}} {{toScore(item.info.score)}}分
+
{{item.info.name || item.contentInfo}} {{toScore(item.info.lastScore)}}分

{{item.info.summary}}

-
当前进度:
-

最新一次学习时间:{{item.eventTime}}

+
当前进度:
+

最新一次学习时间:{{item.info.lastTime}}

隐藏
-
- {{pageId == userInfo.aid || isFollow? '继续学习' : '我也去学'}} +
+ {{isFollow ? '我也去学':pageId == userInfo.aid? '继续学习' : '我也去学'}}
diff --git a/src/views/homepage/page.vue b/src/views/homepage/page.vue index f3d58569..d2af2d3d 100644 --- a/src/views/homepage/page.vue +++ b/src/views/homepage/page.vue @@ -130,7 +130,6 @@ }, watch:{ '$route' (to, from) { //监听路由是否变化 - //console.log(from,'from') if(to.params.id != from.params.id){ this.pageId = to.params.id; let urlPre=window.location.protocol+'//'+window.location.host; @@ -189,8 +188,6 @@ let ids = res.result.list.map(item=>item.contentId); const noReapetIds = [...new Set(ids)]; res.result.list.forEach(item=>{ - item.lastTime = ''; - item.progress = null; item.info = {}; item.authorInfo = { aid: "", @@ -205,9 +202,8 @@ this.getAllList(res.result.list) } if(this.activeName == 1){ - this.cousrePageList = res.result.list - this.getCourse(noReapetIds,res.result.list); - this.getCourseProgress(noReapetIds,res.result.list); + this.cousrePageList = res.result.list + this.getCourse(noReapetIds,res.result.list); } if(this.activeName == 2) { this.articlePageList = res.result.list; @@ -305,21 +301,6 @@ return val1 < val2 ? rev * -1 : rev * 1; }; }, - getCourseProgress(ids,list) { - apiCourseStudy.ids(ids).then((res)=>{ - console.log(res,'res'); - // list.forEach((item, index) => { - // res.result.some(con => { - // if (con.id == item.contentId) { - // item.info = con; - // return true; - // } else { - // return false; - // } - // }); - // }); - }) - }, getAnswer(ids,list){ if(ids.length == 0){ return @@ -465,11 +446,19 @@ }); }, getCourse(ids,list) { - apiCourse.ids(ids).then(res=>{ + let aid = {} + let params = { + ids:ids, + // aid:[this.pageId] + } + if(this.pageId != this.userInfo.aid) { + params.aid = this.pageId + } + apiCourseStudy.ids(params).then(res=>{ if(res.status == 200) { list.forEach((item, index) => { res.result.some(con => { - if (con.id == item.contentId) { + if (con.courseId == item.contentId) { item.info = con; return true; } else { @@ -477,7 +466,6 @@ } }); }); - // this.getArticleUserData(list); } }) }, diff --git a/src/views/portal/follow/index.vue b/src/views/portal/follow/index.vue index d4cad39f..a7f9ca93 100644 --- a/src/views/portal/follow/index.vue +++ b/src/views/portal/follow/index.vue @@ -85,6 +85,7 @@ import apiStat from "@/api/phase2/stat.js" import apiArticle from '@/api/modules/article.js' import apiCases from '@/api/modules/cases.js' + import apiCourseStudy from '@/api/modules/courseStudy.js' import apiQa from '@/api/modules/qa.js' import apiCourse from '@/api/modules/course.js' import apiNote from '@/api/phase2/note.js' @@ -117,7 +118,7 @@ personal:true, orgData:[], Profess:[], - ids:[], + followIds:[], } }, computed: { @@ -126,7 +127,7 @@ created() { apiFollow.list().then(res=>{ if(res.status == 200) { - this.ids = res.result.map(item=>item.followId); + this.followIds = res.result.map(item=>item.followId); this.getList() } }) @@ -160,19 +161,21 @@ this.page.pageIndex = val; this.getList(); }, - getList(ids) { + getList() { let data = { pageIndex:this.page.pageIndex, pageSize:this.page.pageSize, contentType:this.activeName == 0? '':this.activeName,//内容类型 - aids:this.ids // 数组 + aids:this.followIds // 数组 } apiStat.userDynamicfollows(data).then(res=>{ if(res.status == 200) { this.page.count = res.result.count; let ids = res.result.list.map(item=>item.contentId); + let aids = []; const noReapetIds = [...new Set(ids)]; res.result.list.forEach(item=>{ + aids.push(item.aid); item.info = {}; item.authorInfo = { aid: "", @@ -187,8 +190,9 @@ this.getAllList(res.result.list) } if(this.activeName == 1){ - this.cousrePageList = res.result.list - this.getCourse(noReapetIds,res.result.list); + const noReapetAids = [...new Set(aids)]; + this.cousrePageList = res.result.list; + this.getCourse(noReapetIds,res.result.list); } if(this.activeName == 2) { this.articlePageList = res.result.list; @@ -197,7 +201,6 @@ if(this.activeName == 3) { this.casePageList = res.result.list; this.getCase(noReapetIds,res.result.list); - console.log(this.casePageList,'this.casePageList'); } if(this.activeName == 6) { // 笔记 this.getNote(noReapetIds,res.result.list); @@ -429,11 +432,15 @@ }); }, getCourse(ids,list) { - apiCourse.ids(ids).then(res=>{ + let params = { + ids:ids, + aids:this.followIds + } + apiCourseStudy.followIds(params).then(res=>{ if(res.status == 200) { list.forEach((item, index) => { res.result.some(con => { - if (con.id == item.contentId) { + if (item.contentId == con.courseId && item.aid == con.aid) { item.info = con; return true; } else { From 58cba803f5a69a1254c6b4ff19f49273facb7e91 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Sat, 22 Oct 2022 15:35:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ucurrency/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index 44e09ff8..18de441e 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -36,7 +36,7 @@
经验值排行榜 -
占位内容
占位内容
+
所有用户经验值TOP排行榜单,通过学习、贡献等行为可以获得经验值;
From 8a2b742663f5d96b3254e7a9b5450d54f499bc80 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Sat, 22 Oct 2022 15:37:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/ranking.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/user/ranking.vue b/src/views/user/ranking.vue index 45126084..b86b88f3 100644 --- a/src/views/user/ranking.vue +++ b/src/views/user/ranking.vue @@ -5,7 +5,7 @@
经验值排行榜 -
占位内容
占位内容
+
所有用户经验值TOP排行榜单,通过学习、贡献等行为可以获得经验值;
@@ -105,7 +105,7 @@
学习时长排行榜 -
占位内容
占位内容
+
所有用户学习时长TOP排行榜单,统计单位为小时;
@@ -188,7 +188,7 @@
学习天数排行榜 -
占位内容
占位内容
+
所有用户学习天数TOP排行榜单,每活跃学习1天可累计学习天数;
From 155c5c75d44f3749bf38f37f9869554e0581f152 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Sat, 22 Oct 2022 15:45:59 +0800 Subject: [PATCH 4/4] =?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/components/Course/collectItem.vue | 41 +++++++++++---------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/src/components/Course/collectItem.vue b/src/components/Course/collectItem.vue index 36a3d188..d2762ed5 100644 --- a/src/components/Course/collectItem.vue +++ b/src/components/Course/collectItem.vue @@ -17,32 +17,15 @@
+
报名时间:{{ item.time || item.favoritesTime}}
-
- 去上课 -
-
- -
- - - +
当前进度:
+
@@ -152,18 +135,28 @@ export default { color: #333333; margin-left: 5px; } +.pro-line{ + font-size: 14px; + color: #333333; + display: flex; + margin-top: 28px; + } .uc-bpttom{ display: flex; + position: relative; + .uc-coures-button{ + position: absolute; margin-left: auto; - margin-top: 55px; + right:0; + bottom: -38px; } } .uc-course-text{ flex: 1; font-size: 14px; color: #666666; - margin-top: 70px; + margin-top: 14px; } .course-type { position: absolute;