From c33f71f64f28f73711c939d497e3ab153e6e821e Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 3 Mar 2023 18:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AD=A6=E4=B9=A0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=87=AA=E5=8A=A8=E4=BC=9A=E8=B7=B3=E8=BD=AC=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=AE=A1=E7=90=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UcHeader/Index.vue | 5 ++++- src/store/modules/user.js | 36 +++++++++++++++---------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/components/UcHeader/Index.vue b/src/components/UcHeader/Index.vue index 1fd0ebef..896aad04 100644 --- a/src/components/UcHeader/Index.vue +++ b/src/components/UcHeader/Index.vue @@ -162,7 +162,10 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; setCurIdentity(iden){ this.$store.dispatch('SetCurIdentity',iden); - this.$router.push('/manager/index'); + if(iden>2){ + this.$router.push('/manager/index'); + } + // // if(this.isTest){ // //this.$router.push('/manage/learningpath'); // location.href='/manage/learningpath'; diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 99909eb5..cb1fb17b 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -80,24 +80,24 @@ const user = { }) }, refrashStudyTaskCount({ commit }) { - // apiManage.getTaskNum().then(res=>{ - // if(res.code==200){ - // commit('SET_StudyTaskCount',res.data.todoTaskCounts); - // }else{ - // console.log("获取学习任务数失败:"+res.msg); - // } - // }) - apiBoeCourse.cmtaskList({page:1,size:1,get_count:1}).then(res=>{ - if(res.status==200){ - let count = 0; - if(res.result.count > 0){ - count = res.result.count; - } - commit('SET_StudyTaskCount',count); - }else{ - console.log("读取学习任务数失败:"+res.message); - } - }) + apiManage.getTaskNum().then(res=>{ + if(res.code==200){ + commit('SET_StudyTaskCount',res.data.todoTaskCounts); + }else{ + console.log("获取学习任务数失败:"+res.msg); + } + }) + // apiBoeCourse.cmtaskList({page:1,size:1,get_count:1}).then(res=>{ + // if(res.status==200){ + // let count = 0; + // if(res.result.count > 0){ + // count = res.result.count; + // } + // commit('SET_StudyTaskCount',count); + // }else{ + // console.log("读取学习任务数失败:"+res.message); + // } + // }) }, //设置用户身份 SetIdentity({ commit }, iden) {