视频列表获取优化
This commit is contained in:
@@ -407,7 +407,8 @@
|
||||
scale: 1,
|
||||
// 防抖使用的变量
|
||||
appearTimeout: null,
|
||||
isOrder: true
|
||||
isOrder: true,
|
||||
isGetDataList: false,
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
@@ -432,7 +433,7 @@
|
||||
if (data.flag == true) {
|
||||
that.showPay = false
|
||||
that.getDataList(that.courseId, that.courseDetailsId, true);
|
||||
that.getMyLoveStatus()
|
||||
// that.getMyLoveStatus()
|
||||
that.getMoneyList()
|
||||
that.getMyMoney()
|
||||
}
|
||||
@@ -539,7 +540,7 @@
|
||||
this.courseDetailsId = e.courseDetailsId
|
||||
}
|
||||
console.log(this.courseDetailsId)
|
||||
this.getMyLoveStatus()
|
||||
// this.getMyLoveStatus()
|
||||
this.getMoneyList()
|
||||
this.getMyMoney()
|
||||
} else {
|
||||
@@ -550,7 +551,7 @@
|
||||
if (arr[1] && arr[1] != 'null') {
|
||||
this.courseDetailsId = arr[1]
|
||||
}
|
||||
this.getMyLoveStatus()
|
||||
// this.getMyLoveStatus()
|
||||
this.getMoneyList()
|
||||
this.getMyMoney()
|
||||
}
|
||||
@@ -577,6 +578,10 @@
|
||||
videoPlay(videoId, courseDetailsId) {
|
||||
if (!this.playFlag) {
|
||||
this.playFlag = true
|
||||
if ( this.isGetDataList) {
|
||||
this.getDataList(this.courseId, courseDetailsId,true);
|
||||
}
|
||||
this.isGetDataList = true;
|
||||
httpsRequest.getT('app/course/viewCourse', {
|
||||
courseId: this.courseId,
|
||||
courseDetailsId: courseDetailsId,
|
||||
@@ -1306,11 +1311,16 @@
|
||||
id: courseId,
|
||||
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
||||
};
|
||||
console.log(courseDetailsId)
|
||||
console.log("getDataList==="+courseDetailsId)
|
||||
httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => {
|
||||
|
||||
if (res.code == 0) {
|
||||
console.log(res)
|
||||
if (res.data && res.data.isCollect && res.data.isCollect > 0) {
|
||||
this.isCollect = true
|
||||
} else {
|
||||
this.isCollect = false
|
||||
}
|
||||
if (res.data.listsDetail) {
|
||||
this.info = res.data;
|
||||
this.title = this.info.title;
|
||||
|
||||
Reference in New Issue
Block a user