From c6a81de8fb82e232f81e1f4aaba8cb7e61718376 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Mon, 9 Dec 2024 10:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=AF=A6=E6=83=85=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- me/detail/detail.nvue | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index 587bcd0..0ad43c0 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -343,7 +343,7 @@ haibaoShow: false, title: '', imgSrc: '', - current: 0, + current: 2, maskCustomStyle: { background: 'rgba(0, 0, 0, 0.5)' }, @@ -479,6 +479,7 @@ this.closePopusPay() }) if(this.courseId){ + this.getDataList(this.courseId, this.courseDetailsId); } httpsRequest.getT('app/course/getRedEnvelopeTips').then(res => { @@ -1131,13 +1132,15 @@ goListPosition(courseDetailsId) { let _this = this; this.$nextTick(() => { - console.log(courseDetailsId, '开始移动了') - const el = _this.$refs['list' + courseDetailsId][0] - listDom.scrollToElement(el, { - animated: false - }) - _this.$forceUpdate() - console.log('移动结束',el) + // setTimeout(()=>{ + console.log(courseDetailsId, '开始移动了') + const el = _this.$refs['list' + courseDetailsId][0] + listDom.scrollToElement(el, { + animated: false + }) + _this.$forceUpdate() + console.log('移动结束',el) + // },1000) }) }, /** @@ -1160,7 +1163,7 @@ Number(courseDetailsId)); this.current = indexs console.log(this.current) - this.scrollIntoView = 'video' + indexs + // this.scrollIntoView = 'video' + indexs arr.map((item, index) => { item.num = index + 1; if (item.videoUrl) { @@ -1201,7 +1204,10 @@ //滚动到记录视频的位置(如果有记录) if (indexs > 0) { console.log(indexs, '有记录吗?') - this.goListPosition(this.videoList[indexs].courseDetailsId) + this.$nextTick(()=>{ + this.appear(this.videoList[indexs].courseDetailsId,indexs) + }) + // this.goListPosition(this.videoList[indexs].courseDetailsId) } this.$nextTick(() => { let indexss = indexs > 0 ? indexs : 0