From e01198b1ddcd4914ee3e28dc39dd9ab67f70c40e Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 26 Dec 2024 19:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=88=97=E8=A1=A8=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- me/detail/detail.nvue | 20 +++++++++++++++----- me/detail/detail.vue | 18 ++++++++++++++---- pages/task/index.vue | 3 ++- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index 26b3d55..2dbc432 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -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; diff --git a/me/detail/detail.vue b/me/detail/detail.vue index f8e72ce..02c01ae 100644 --- a/me/detail/detail.vue +++ b/me/detail/detail.vue @@ -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, diff --git a/pages/task/index.vue b/pages/task/index.vue index 66856f0..d8d04a7 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -47,7 +47,7 @@ src="../../static/images/signIn_icon1.png" mode="" /> {{item.showText}} - {{item.signDay.slice(5,10)}} + {{item.signDay.slice(6,10)}} @@ -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