From c8064b4bbc51568a3e7b96e0fbef46b0c7e0aeb2 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 7 Feb 2023 16:56:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AF=BE=E7=A8=8B=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E4=B8=80=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/study/courseStudy.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pages/study/courseStudy.vue b/pages/study/courseStudy.vue index e4d0050..97a20ac 100644 --- a/pages/study/courseStudy.vue +++ b/pages/study/courseStudy.vue @@ -711,10 +711,14 @@ //this.curSection=this.sectionList[0]; }else{ let treelist=this.catalogTree; - this.curSection=treelist[0].sec; - this.curContent=treelist[0].children[0]; - // this.curContent=this.contentList[0]; - // this.curSection=this.sectionList[0]; + //console.log(treelist,'treelist') + if(treelist.length>0){ + this.curSection=treelist[0].sec; + this.curContent=treelist[0].children[0]; + }else{ + this.curContent=this.contentList[0]; + this.curSection=this.sectionList[0]; + } //要不要在这里处理? // if(this.curContent.contentType==10 || this.curContent.contentType==20){ // if(this.contentList[0].content.startsWith('\{')){