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 => {