From c53fb5502d7b889ac6ce65b5e5dff14b716d1d78 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 3 Jan 2025 22:29:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9C=8B=E5=89=A7=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8CgetDataList=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E9=87=8C=E5=A6=82=E6=9E=9C=E6=9C=AA=E6=89=BE=E5=88=B0?= =?UTF-8?q?=E5=AF=B9=E5=BA=94courseDetailsId=EF=BC=8C=E5=B0=86current?= =?UTF-8?q?=E5=80=BC=E6=94=B9=E4=B8=BA0=EF=BC=8C=E5=90=A6=E5=88=99?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E9=80=89=E9=9B=86=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=EF=BC=8C=E5=BC=B9=E7=AA=97=E5=90=8E=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=9B=B8=E5=AF=B9=E5=BA=94=E9=9B=86=E6=95=B0=E4=B9=9F?= =?UTF-8?q?=E6=97=A0=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- me/detail/detail.nvue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue index 8ca774d..c180667 100644 --- a/me/detail/detail.nvue +++ b/me/detail/detail.nvue @@ -1343,7 +1343,8 @@ let arr = JSON.parse(JSON.stringify(res.data.listsDetail)); const indexs = arr.findIndex(menu => menu.courseDetailsId === Number(courseDetailsId)); - this.current = indexs + //如果未找到将current值改为0,否则会导致选集无法弹窗,弹窗后点击相对应集数也无反应 + this.current = indexs===-1?0:indexs; this.scrollIntoViews = 'video' + indexs this.scrollIntoView = 'video' + indexs console.log(this.current)