From 18adb406a209f9c6a24fa1ad3b682db7ad18ae94 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Wed, 17 Jul 2024 10:37:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E6=9F=A5=E9=97=AE=E9=A2=981?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PortalHeader.vue | 9 ++++++++- src/components/UserCenter/menu.vue | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 2744601d..039e4283 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -275,7 +275,14 @@ export default { if(this.nums == 0){ window.location.href = `${this.webBaseUrl}/uc/study/task?type=9`; } - window.location.href = `${this.webBaseUrl}/uc/study/task`; + // window.location.href = `${this.webBaseUrl}/uc/study/task?type=${this.fistTotals || this.growTotal || this.pathTotals}`; + 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`; + } }else{ window.location.href = `${this.webBaseUrl}/uc/study/courses`; } diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index 5e6bac12..b17d2a7a 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -446,22 +446,27 @@ export default { console.log(this.fistTotals,this.growTotal,this.pathTotals,'geshu') if(path == '/uc/study/task' || path == '/uc/study/growth'){ this.openedsList = ['mystudy'] + // window.location.href = `${this.webBaseUrl}/uc/study/task?type=${this.fistTotals || this.growTotal || this.pathTotals}` } + console.log('1') if(path == '/uc/study/courses'){ '/uc/study/courses' } if(sessionStorage.getItem('totalNums') == 0&&path == '/uc/study/task'){ return '/uc/study/task?type=9' } + console.log('2') if(path == '/uc/study/task'){ - return '/uc/study/task?type=' + (route.query.type || this.fistTotals || this.growTotal || this.pathTotals || 2) + return '/uc/study/task?type=' + (route.query.type || (this.fistTotals && 1) || 2) } + console.log('3') if(meta.title == '添加受众' || meta.title == '查看受众'){ meta.activeMenu = '/manage/ugroups' } if (meta.activeMenu) { return meta.activeMenu; } + console.log(path,'sendpath') return path; }, }, @@ -475,24 +480,24 @@ export default { overlayShow: false, instructor:0, fistTotal:0, - fistTotals:1, + fistTotals:0, proTotal: 0, proTotals: 1, pathTotal:0, - pathTotals:1, - growTotal: 1, + pathTotals:0, + growTotal: 0, openedsList:[], courseNum: 0, }; }, created() { this.learnTotal() + this.courseNumsData() this.$store.dispatch('refrashReviewed'); this.$store.dispatch('refrashStudyTaskCount'); this.getLastStudy(); //获取讲师认证中条数 this.instructorCertification() - this.courseNumsData() }, mounted() { // this.courseNum = sessionStorage.getItem('courseNums') @@ -523,8 +528,11 @@ export default { }else{ this.courseNum = sessionStorage.getItem('courseNums') } + console.log(this.courseNum,'this.courseNum') }, learnTotal(){ + // const route = this.$route; + // const { meta, path } = route; let params = { pageNo: 1, pageSize: 10, @@ -553,7 +561,6 @@ export default { }) ] Promise.all(promises).then(() => { - console.log('111111111') sessionStorage.setItem('totalNums', this.fistTotals + this.pathTotals + this.growTotal); }); apiManage.queryTaskCounts({}).then(res=>{