From a4f3dd6fd95b007c9992d0d0492048679de51a15 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 11 Nov 2022 19:07:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modules/courseStudy.js | 9 +++++++- api/phase2/index.js | 3 +++ pages/study/courseStudy.vue | 45 ++++++++++++++++++++++++++++++++----- 3 files changed, 50 insertions(+), 7 deletions(-) diff --git a/api/modules/courseStudy.js b/api/modules/courseStudy.js index c1ca071..d29faad 100644 --- a/api/modules/courseStudy.js +++ b/api/modules/courseStudy.js @@ -326,6 +326,12 @@ const deleteSignUp=function(id,courseId){ return ajax.post(`/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId}`); } +/**课程详细页面的推荐课程*/ +const courseRecommends=function(query) { + return ajax.post('/xboe/portal/index/course-for-recommend',query); +} + + export default { hasSignup, signup, @@ -353,5 +359,6 @@ export default { myExamList, myAssessList, myExamList2, - deleteSignUp + deleteSignUp, + courseRecommends } diff --git a/api/phase2/index.js b/api/phase2/index.js index 932de18..56729e9 100644 --- a/api/phase2/index.js +++ b/api/phase2/index.js @@ -61,6 +61,9 @@ const mobieArticle=function (type){ return ajax.get('/xboe/portal/index/mobile-article?type='+type); } + + + export default { cases, articleViews, diff --git a/pages/study/courseStudy.vue b/pages/study/courseStudy.vue index 85d4a9e..6f88b4d 100644 --- a/pages/study/courseStudy.vue +++ b/pages/study/courseStudy.vue @@ -75,13 +75,29 @@ - - - + + + + 图标 + 评价 + + + 图标 + 收藏 + + + 图标 + 转发 + + + + + + 课程推荐 + - @@ -107,7 +123,7 @@ initContentId:'',//初始化的内容id courseInfo:{id:'',name:''},//课程信息 teachers:[],//课程老师列表 - recommendCourse:[],//推荐课程列表 + recommendCourses:[],//推荐课程列表 isPlaying:false, onplay:false, touchNum : 0, @@ -214,6 +230,7 @@ this.courseId=options.id; this.courseInfo.id=options.id; this.loadDetail(); + this.loadReCourses(); }, onShow(){ uni.setNavigationBarTitle({ title:'\u200E' }) @@ -381,7 +398,16 @@ }) }, loadReCourses(){ - //apiCoursePortal. + let dto={ + sysType1:this.courseInfo.sysType1, + sysType2:this.courseInfo.sysType2, + sysType3:this.courseInfo.sysType3 + } + apiCourseStudy.courseRecommends(dto).then(rs=>{ + if(rs.status==200){ + this.recommendCourses=rs.result; + } + }) }, loadAuthorInfo(list, ids) { //加载作者信息,头像,机构信息 @@ -492,5 +518,12 @@ font-weight: 700; font-size: 32upx; } } + .cinfo-btns{ + display: flex; + justify-content: center; + .cinfo-btn{ + margin:30upx 60upx; + } + } } \ No newline at end of file