diff --git a/src/api/manage/manage.js b/src/api/manage/manage.js index 14319a43..25f7bd8f 100644 --- a/src/api/manage/manage.js +++ b/src/api/manage/manage.js @@ -20,6 +20,10 @@ const getTaskNum = function(){ const userTaskList = function(data){ return ajax.postJson(baseURL,'/todoTask/queryTodoTaskDetail',data); } +//查询未读数量 +const queryTaskCounts = function(){ + return ajax.get(baseURL,'/todoTask/queryTaskCounts'); +} //领导力必修 const leadership = function(data){ return ajax.postJson(baseURL,'/todoTask/leadership',data); @@ -51,5 +55,6 @@ export default { customized, compulsoryList, userDeleteStudy, - userRsSginupCourse + userRsSginupCourse, + queryTaskCounts } diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index a4b778ac..3404c8f5 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -426,7 +426,6 @@ import {pageList} from "@/api/modules/lecturer" import courseImage from "@/components/Course/courseImage.vue" import testUser from '@/utils/testUsers.js' import apiManage from '@/api/manage/manage.js' -import {getList} from '@/api/growth' export default { name: 'UcMenu', components: { @@ -438,7 +437,7 @@ export default { const route = this.$route; const { meta, path } = route; if(path == '/uc/study/task'){ - return '/uc/study/task?type='+route.query.type + return '/uc/study/task?type=' + (route.query.type || 1) } if(meta.title == '添加受众' || meta.title == '查看受众'){ meta.activeMenu = '/manage/ugroups' @@ -485,28 +484,11 @@ export default { }, methods: { learnTotal(){ - let params = { - pageNo: 1, - pageSize: 10, - cmtask_user_status: "", - cmtask_name: "" - } - //领导力 - apiManage.leadership(params).then(res=>{ - this.fistTotal =parseInt(res.data.total); - }) - //项目 - apiManage.customized(params).then(res=>{ - this.proTotal =parseInt(res.data.total); - }) - //学习路径 - apiManage.compulsoryList(params).then(res=>{ - this.pathTotal =parseInt(res.data.total); - }) - getList(this.userInfo.aid).then(res=>{ - if(res.code == 200 ){ - this.growTotal = 1 - } + apiManage.queryTaskCounts().then(res=>{ + this.proTotal =parseInt(res.data.count); //学习项目 + this.fistTotal =parseInt(res.data.count1); // 领导力必修 + this.pathTotal =parseInt(res.data.count2); // 学习路径 + this.growTotal = parseInt(res.data.count3); //成长路径 }) }, //讲师认证条数 diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index dd66197a..7e3025a3 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -756,7 +756,7 @@ if (this.contentData.status < 2) { // this.contentData.status = 2; //进行中 if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){ - setTimeout(() => { + setTimeout(() => { this.isContentTypeTwo = r.contentType $this.isShowTime() }, 2000);