From f6244aa462d2f720fdc01a573c163eb1044829ab Mon Sep 17 00:00:00 2001 From: zhangsir Date: Wed, 17 Jul 2024 14:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B6=E4=BB=96=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PortalHeader.vue | 3 +++ src/components/UserCenter/menu.vue | 10 +++------ src/views/Index.vue | 33 +++++++++++++++++++++++++++--- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 039e4283..a83c8157 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -260,6 +260,9 @@ export default { ] Promise.all(promises).then(() => { this.nums = this.fistTotals + this.pathTotals + this.growTotal; + sessionStorage.setItem('fistTotals',this.fistTotals) + sessionStorage.setItem('pathTotals',this.pathTotals) + sessionStorage.setItem('growTotal',this.growTotal) this.loadBoeData(); }); }, diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index 77a01cae..95633de3 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -480,12 +480,12 @@ export default { overlayShow: false, instructor:0, fistTotal:0, - fistTotals:0, + fistTotals:1, proTotal: 0, proTotals: 1, pathTotal:0, - pathTotals:0, - growTotal: 0, + pathTotals:1, + growTotal: 1, openedsList:[], courseNum: 0, }; @@ -566,16 +566,12 @@ export default { if(path == '/uc/study/task' && (route.query.type === undefined|| route.query.type === null)){ if(this.fistTotals != 0){ this.$router.push('/uc/study/task?type=1') - this.activeMenu = '/uc/study/task?type=1' }else if (this.growTotal != 0){ this.$router.push('/uc/study/growth') - this.activeMenu = '/uc/study/growth' }else if (this.pathTotals != 0){ this.$router.push('/uc/study/task?type=2') - this.activeMenu = '/uc/study/task?type=2' }else{ this.$router.push('/uc/study/task?type=9') - this.activeMenu = '/uc/study/task?type=9' } } }); diff --git a/src/views/Index.vue b/src/views/Index.vue index 255c1dc9..1594a19b 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -89,7 +89,7 @@

{{ cutOrgNamePath(userInfo.departFullName) }}

- +
学习任务 @@ -106,7 +106,7 @@
-
+
0){ + window.location.href = `${this.webBaseUrl}/uc/study/courses`; + }else{ + if(this.nums == 0){ + window.location.href = `${this.webBaseUrl}/uc/study/task?type=9`; + } + if(this.fistTotals != 0){ + window.location.href = `${this.webBaseUrl}/uc/study/task?type=1`; + }else if (this.growTotal != 0){ + window.location.href = `${this.webBaseUrl}/uc/study/growth`; + }else{ + window.location.href = `${this.webBaseUrl}/uc/study/task?type=2`; + } + } + }, getPositive() { // 这个是案例的好评 // apiCase.queryComments(10).then(res => {