From dae8db63bcb05c0d2dbc1f9ec7f3f548552c15f9 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 18 Jul 2023 12:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=B9=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E5=A4=96=E8=BF=9E=E6=89=93=E5=BC=80=E9=97=AE=E9=A2=98=E5=92=8C?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E6=95=B0=E6=8D=AE=E5=8A=A0=E8=BD=BD=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/study/courseStudy.vue | 16 +++++++++++++--- pages/study/index.vue | 19 ++++++++++--------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/pages/study/courseStudy.vue b/pages/study/courseStudy.vue index 5597bbe..6b87b66 100644 --- a/pages/study/courseStudy.vue +++ b/pages/study/courseStudy.vue @@ -88,9 +88,15 @@ - - - + + + + + + +
{{ curContent.contentName }}
+
{{ conLink.url }}
+
@@ -907,6 +913,10 @@ this.conLink.url=con.content; this.conLink.openType=1; } + if (this.conLink.openType == 2) { + //新的窗口直接打开 + location.href=this.conLink.url + } } else if(con.contentType==10 || con.contentType==20) { if(con.content.startsWith('\{')){ diff --git a/pages/study/index.vue b/pages/study/index.vue index ff42804..358a1cc 100644 --- a/pages/study/index.vue +++ b/pages/study/index.vue @@ -262,8 +262,6 @@ //document.cookie = "mytest=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; }, onLoad() { - this.loadBoeData(true); - let $this = this; uni.getSystemInfo({ success: (res) => { @@ -285,6 +283,12 @@ apiManage.getTaskNum().then(res => { if(res.code==200){ this.value=res.data.todoTaskCounts; + if(this.value>0){ + this.loadBoeData(true); + }else{ + this.tabIndex = 1;//切换到我报名的 + this.getLearning(true); + } } }); }, @@ -545,13 +549,10 @@ this.taskHasMore = false; this.loadStatus='noMore'; } - //下面的isOne没有看太明白,后续要去掉 - if (this.isOne) { - //this.value = this.taskCount; - } - if (this.isOne && res.data.records.length == 0) { - this.tabIndex = 1; - } + //检查是否是第一次加载,这里的控制已经移到 初次加载中了 + // if (this.isOne && res.data.records.length == 0) { + // this.tabIndex = 1; + // } this.isOne = false; }else{ uni.showToast({