|
|
@@ -122,7 +122,7 @@
|
|
|
<view style="margin: 10rpx;">
|
|
|
<view class="tj_box" v-for="(item, index) in commendList" :key="index" @click="getNavTo(item)">
|
|
|
<image :src="$method.splitImgHost(item.coverUrl)" style="width: 320rpx;height: 160rpx;"></image>
|
|
|
- <view style="font-size: 24rpx;color: #666666;d">{{ item.courseName }}</view>
|
|
|
+ <view style="font-size: 24rpx;color: #666666;text-align: left;">{{ item.courseName }}</view>
|
|
|
<view>
|
|
|
<u-row>
|
|
|
<u-col span="6">
|
|
|
@@ -162,7 +162,7 @@
|
|
|
<view
|
|
|
v-for="(item, index) in boxList"
|
|
|
:key="index"
|
|
|
- style="height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eee;display: flex;align-items: center;justify-content: space-between;"
|
|
|
+ style="line-height: 60rpx;border-bottom: 1rpx solid #eee;display: flex;align-items: center;justify-content: space-between;padding: 15rpx 0;"
|
|
|
:style="infoData.sectionId === item.sectionId ? 'color:#1677ff;' : ''"
|
|
|
@click="getsec(item)"
|
|
|
>
|
|
|
@@ -246,50 +246,10 @@ export default {
|
|
|
this.favoritesStatus();
|
|
|
}
|
|
|
let that = this;
|
|
|
- const query = uni.createSelectorQuery().in(this);
|
|
|
- query
|
|
|
- .select('#modules1')
|
|
|
- .boundingClientRect(data => {
|
|
|
- that.h1 = data.height;
|
|
|
- that.countHeight(that);
|
|
|
- })
|
|
|
- .exec();
|
|
|
- query
|
|
|
- .select('#modules2')
|
|
|
- .boundingClientRect(data => {
|
|
|
- that.h2 = data.height;
|
|
|
- that.countHeight(that);
|
|
|
- })
|
|
|
- .exec();
|
|
|
- query
|
|
|
- .select('#modules3')
|
|
|
- .boundingClientRect(data => {
|
|
|
- that.h3 = data.height;
|
|
|
- that.countHeight(that);
|
|
|
- })
|
|
|
- .exec();
|
|
|
- query
|
|
|
- .select('#modules4')
|
|
|
- .boundingClientRect(data => {
|
|
|
- that.h4 = data.height;
|
|
|
- that.countHeight(that);
|
|
|
- })
|
|
|
- .exec();
|
|
|
- query
|
|
|
- .select('#foot')
|
|
|
- .boundingClientRect(data => {
|
|
|
- that.foot_h = data.height;
|
|
|
- that.countModelusPadding();
|
|
|
- })
|
|
|
- .exec();
|
|
|
- query
|
|
|
- .select('#top')
|
|
|
- .boundingClientRect(data => {
|
|
|
- that.top_h = data.height;
|
|
|
- that.countModelusPadding();
|
|
|
- })
|
|
|
- .exec();
|
|
|
this.windowHeight = uni.getSystemInfoSync().windowHeight;
|
|
|
+ setTimeout(function(){
|
|
|
+ that.getHeight()
|
|
|
+ },1800)
|
|
|
},
|
|
|
onPageScroll: function(e) {
|
|
|
//防止触发两次跳动
|
|
|
@@ -310,6 +270,54 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getHeight(){
|
|
|
+ let that = this
|
|
|
+ const query = uni.createSelectorQuery().in(this);
|
|
|
+ query
|
|
|
+ .select('#modules1')
|
|
|
+ .boundingClientRect(data => {
|
|
|
+ that.h1 = data.height;
|
|
|
+ that.countHeight(that);
|
|
|
+ })
|
|
|
+ .exec();
|
|
|
+ query
|
|
|
+ .select('#modules2')
|
|
|
+ .boundingClientRect(data => {
|
|
|
+ that.h2 = data.height;
|
|
|
+ console.log(data.height,66)
|
|
|
+ that.countHeight(that);
|
|
|
+ })
|
|
|
+ .exec();
|
|
|
+ query
|
|
|
+ .select('#modules3')
|
|
|
+ .boundingClientRect(data => {
|
|
|
+ that.h3 = data.height;
|
|
|
+ that.countHeight(that);
|
|
|
+ })
|
|
|
+ .exec();
|
|
|
+ query
|
|
|
+ .select('#modules4')
|
|
|
+ .boundingClientRect(data => {
|
|
|
+ that.h4 = data.height;
|
|
|
+ console.log(data.height,4444)
|
|
|
+ that.countHeight(that);
|
|
|
+ })
|
|
|
+ .exec();
|
|
|
+ query
|
|
|
+ .select('#foot')
|
|
|
+ .boundingClientRect(data => {
|
|
|
+ that.foot_h = data.height;
|
|
|
+ that.countModelusPadding();
|
|
|
+ })
|
|
|
+ .exec();
|
|
|
+ query
|
|
|
+ .select('#top')
|
|
|
+ .boundingClientRect(data => {
|
|
|
+ that.top_h = data.height;
|
|
|
+ that.countModelusPadding();
|
|
|
+ })
|
|
|
+ .exec();
|
|
|
+ },
|
|
|
favoritesStatus() {
|
|
|
this.$api.coursecollectPD(this.queryData.courseId).then(result => {
|
|
|
if (result.data.data === undefined) {
|
|
|
@@ -344,11 +352,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getcommendList(v) {
|
|
|
+ let self = this
|
|
|
var data = {
|
|
|
courseId: v
|
|
|
};
|
|
|
this.$api.courseInforecommendList(data).then(res => {
|
|
|
- this.commendList = res.data.data;
|
|
|
+ self.commendList = res.data.data;
|
|
|
});
|
|
|
},
|
|
|
activeList(item, index) {
|
|
|
@@ -375,6 +384,7 @@ export default {
|
|
|
if (res.data.code === 200) {
|
|
|
self.pageData = res.data.data;
|
|
|
self.getTeacher(res.data.data.teacherIds);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -399,15 +409,24 @@ export default {
|
|
|
self.$api.coursesectionlist(dataset).then(result => {
|
|
|
self.getsec(result.data.rows[0]);
|
|
|
});
|
|
|
+ if(chaList.length>0){
|
|
|
+ var dataset = {
|
|
|
+ chapterId: res.data.rows[0].chapterId
|
|
|
+ };
|
|
|
+ self.$api.coursesectionlist(dataset).then(result => {
|
|
|
+ self.getsec(result.data.rows[0]);
|
|
|
+ });
|
|
|
+ }
|
|
|
this.chapterList = chaList;
|
|
|
});
|
|
|
},
|
|
|
getTeacher(v) {
|
|
|
+ let self = this
|
|
|
var data = {
|
|
|
teacherIds: v
|
|
|
};
|
|
|
this.$api.teacherList(data).then(res => {
|
|
|
- this.teacherInfo = res.data.rows[0];
|
|
|
+ self.teacherInfo = res.data.rows[0];
|
|
|
});
|
|
|
},
|
|
|
startVideo() {
|