diff --git a/components/recommend-index/recommend-index.vue b/components/recommend-index/recommend-index.vue
index ae3ea61..b081896 100644
--- a/components/recommend-index/recommend-index.vue
+++ b/components/recommend-index/recommend-index.vue
@@ -155,15 +155,20 @@
let key = 'mobileIndex1';
apiPlace.detail(key).then(res => {
this.resonimg = [];
- let lmj = JSON.parse(res.result.content)
- lmj.forEach(item=>{
- this.resonimg.push(this.fileUrl+item.image);
- })
+ if(res.result.content && res.result.content.length>10){
+ let lmj = JSON.parse(res.result.content)
+ lmj.forEach(item=>{
+ this.resonimg.push(this.fileUrl+item.image);
+ })
+ }
+
});
let keyImg = 'mobileIndex2';
apiPlace.detail(keyImg).then(res => {
- let lmj = JSON.parse(res.result.content)
- this.placeholderImg = lmj[0];
+ if(res.result.content && res.result.content.length>10){
+ let lmj = JSON.parse(res.result.content)
+ this.placeholderImg = lmj[0];
+ }
});
},
//文章跳转详情
diff --git a/pages/study/courseStudy.vue b/pages/study/courseStudy.vue
index 0eef212..d600e25 100644
--- a/pages/study/courseStudy.vue
+++ b/pages/study/courseStudy.vue
@@ -41,41 +41,63 @@
4.9
-
+
目录
- 全部>
+ 全部>
-
-
-
-
-
-
-
- {{con.cataName}}
-
-
-
-
- {{con.contentName}}
+
+
+
+
+
+
+ {{con.contentName}}
+
+
+
+
+
+
+
+
+ {{con.contentName}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{con.cataName}}
+
-
+
+
-
-
-
+
+
+
@@ -112,7 +134,7 @@
×
-
+
@@ -141,6 +163,22 @@
+
+
+
+
+
+
+ {{con.contentName}}
+
+
+ 未开始
+ 进行中
+ 已完成
+
+
+
+
@@ -205,7 +243,8 @@
teachers:[],//课程老师列表
recommendCourses:[],//推荐课程列表
catalogShow:false,//是否显示目录
- catalogNum:1,//一个目录时不显示,两个时显示占满,三个时类似UI一样的显示了
+ totalContent:0,//课程内容数量
+ hasSection:false,//是否有目录
tabIndex:1,//显示的tab内容
scoreInfo:{dlgShow:false, score:5, has:false},//评分控制项
isPraise:false,//是否已点赞
@@ -233,7 +272,7 @@
conLink:{openType:1,url:''},//外连接内容
curriculumData:{url:'',isDrag:true,completeSetup:1,setupTage:0,second:0},// 课件内容
- totalContent:0,//课程内容数量
+
authorInfo:{aid:'',name:'',code:'',orgInfo:''},
sectionList:[],
@@ -356,7 +395,7 @@
userIds.push(item.teacherId);
ctoUsers.push({ aid: item.teacherId, name: item.teacherName });
});
- //this.toUsers = ctoUsers;
+ this.toUsers = ctoUsers;//关注老师,关注多个考试
this.loadAuthorInfo(rs.result.teachers, userIds);
}
let showConId=this.initContentId;
@@ -400,8 +439,8 @@
})
}
}
- this.contentList=rs.result.contents;
- this.totalContent=rs.result.contents.length;
+ this.contentList=rs.result.contents;//内容列表
+ this.totalContent=rs.result.contents.length;//一共有向个可以播放的内容
this.sectionList=rs.result.sections;
//设置正在学习的章节
if(showConId==''){
@@ -425,26 +464,25 @@
if(rs.status==200){
// uni.setNavigationBarTitle({ title:rs.result.course.name })
this.courseInfo=rs.result.course;
+ //老师信息
this.teachers=rs.result.teachers;
if(rs.result.teachers && rs.result.teachers.length > 0) {
let userIds = [];
- let ctoUsers = [];
rs.result.teachers.forEach(item => {
- // item.aid='';
item.name= '';
item.orgInfo= '';
item.avatar= '';
item.code= '';
item.sex=null;
userIds.push(item.teacherId);
- ctoUsers.push({ aid: item.teacherId, name: item.teacherName });
});
- // this.toUsers = ctoUsers;
this.loadAuthorInfo(rs.result.teachers, userIds);
}
this.loadUserInfo(this.courseInfo.sysCreateAid);
//设置必须的字段
+
let showConId=this.initContentId;
+
rs.result.sections.forEach(sec=>{
sec.status=1;//加入状态表未开始
rs.result.contents.forEach(c=>{
@@ -800,6 +838,39 @@
}
}
}
+ .citembox1{
+ display: flex;
+ .citembox1-item{
+ width: 50%;
+ }
+ }
+ .citem{
+ margin: 20upx;
+ .citem-title{
+ color: #333333;
+ word-break: break-all;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ overflow: hidden;
+ }
+ .citem-body{
+ background-color: #F7F8F9;
+ color: #333333;
+ padding: 40upx;
+ word-break: break-all;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ overflow: hidden;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+
+ }
+ .citem-active{
+ color: #387DF7;
+ border: 1px dotted #387DF7;
+ }
+
+ }
.catalog{
background: #FFFFFF;
padding:20upx;