|
@@ -14,7 +14,9 @@ Page({
|
|
|
num2: 0,
|
|
|
position: '',
|
|
|
questionsdian: '',
|
|
|
- list: ''
|
|
|
+ list: [],
|
|
|
+ lessonListHeight: '',
|
|
|
+ previewHeight: ''
|
|
|
},
|
|
|
/* 区分答疑和分享 */
|
|
|
distinction: function(type, columnId, pageNo, pageSize, success) {
|
|
@@ -132,6 +134,19 @@ Page({
|
|
|
"category": 5
|
|
|
}).success((res) => {
|
|
|
//console.log('科目信息' + JSON.stringify(res));
|
|
|
+ const lessonListLength = res.data.data.lessonPage.list.length;
|
|
|
+ const previewLength = util.preview(res.data.data.lessonPage.list).length;
|
|
|
+ console.log(res)
|
|
|
+ if(lessonListLength > 4) {
|
|
|
+ this.setData({
|
|
|
+ lessonListHeight: 280
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(previewLength > 4){
|
|
|
+ this.setData({
|
|
|
+ previewHeight: 280
|
|
|
+ })
|
|
|
+ }
|
|
|
this.setData({
|
|
|
courseData: res.data.data,
|
|
|
list: util.studyPageTime(res.data.data.lessonPage.list)
|