视频列表获取优化

This commit is contained in:
GaoHao 2024-12-26 19:32:01 +08:00
parent 0362307423
commit e01198b1dd
3 changed files with 31 additions and 10 deletions

View File

@ -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;

View File

@ -446,6 +446,7 @@
getRedEnvelopeTips: '',
scale: 1,
isOrder: true,
isGetDataList: false
};
},
onShareAppMessage(res) {
@ -573,7 +574,7 @@
this.tt_episode_id = scene[5]
}
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
// this.getMyLoveStatus()
}
this.isGuanggao = uni.getStorageSync('isGuanggao') //
this.isGuanggaody = uni.getStorageSync('isGuanggaody') //
@ -603,7 +604,7 @@
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId, '跳转进来的id')
this.getMyLoveStatus()
// this.getMyLoveStatus()
}
if (e.tt_album_id) {
this.tt_album_id = e.tt_album_id
@ -624,7 +625,7 @@
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
this.getMyLoveStatus()
// this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
@ -1459,6 +1460,7 @@
this.num = item.num
}
})
this.playFlag = false
},
//
setVideoList(index) {
@ -1546,6 +1548,11 @@
this.dyCourseId = "" + res.data.dyCourseId;
console.log("dyCourseId__" + this.dyCourseId)
}
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
@ -1942,7 +1949,10 @@
videoPlay(videoId) {
// this.courseDetailsId = courseDetailsId
if (!this.playFlag) {
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,true);
if ( this.isGetDataList) {
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,true);
}
this.isGetDataList = true;
this.playFlag = true
this.$Request.getT('app/course/viewCourse', {
courseId: this.courseId,

View File

@ -47,7 +47,7 @@
src="../../static/images/signIn_icon1.png" mode="" />
<view class="radius"></view>
<view class="_label">{{item.showText}}</view>
<view class="_label" style="font-size: 18rpx;color: #999;margin-top: 2rpx;">{{item.signDay.slice(5,10)}}</view>
<view class="_label" style="font-size: 18rpx;color: #999;margin-top: 2rpx;">{{item.signDay.slice(6,10)}}</view>
</view>
</view>
@ -271,6 +271,7 @@
} else if (item.jumpType == 1) {
let source, buttonUrl;
buttonUrl = item.buttonUrl
console.log(item.title && item.title.indexOf('每周打卡奖励') != -1)
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
source = 2
buttonUrl = item.buttonUrl + '?source=' + source