From 9186d435aa712ea5ee89ba6131e59a6bc3731b87 Mon Sep 17 00:00:00 2001 From: daihh Date: Wed, 1 Mar 2023 12:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E6=88=B7=E8=AF=BE=E7=A8=8B=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=EF=BC=8C=E8=8E=B7=E5=8F=96=E5=8F=97=E4=BC=97=E6=9D=83?= =?UTF-8?q?=E9=99=90=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/userbasic.js | 8 +++++++- src/views/portal/course/Index.vue | 31 +++++++++++++++++++------------ src/views/study/coursenew.vue | 4 ++-- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/api/boe/userbasic.js b/src/api/boe/userbasic.js index efdaa20d..6170e2ce 100644 --- a/src/api/boe/userbasic.js +++ b/src/api/boe/userbasic.js @@ -63,6 +63,11 @@ const modifyPassword = function(data) { return ajax.postJson(baseURL,'/user/resetPassword',data); } +/**获取加入的受众的id集合*/ +const getInAudienceIds = function() { + return ajax.post(baseURL,'/audience/audienceByUser',{}); +} + export default { userParentOrg, findOrgsByKeyword, @@ -72,5 +77,6 @@ export default { getUserCrowds, getUserAudiences, getOrgHrbpInfo, - modifyPassword + modifyPassword, + getInAudienceIds } diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index 749dcd3f..e6961ca1 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -317,7 +317,7 @@ import apiOldCourse from "@/api/boe/course.js"; import apiTeacher from "@/api/modules/teacher.js"; import apiUser from "@/api/system/user.js"; import scene from "@/api/modules/scene.js"; -import apiUserGroup from "@/api/modules/usergroup.js"; +import apiUserbasic from "@/api/boe/userbasic.js"; import interactBar from "@/components/Portal/interactBar.vue"; import courseImage from "@/components/Course/courseImage.vue"; import { courseType, getType, toScore,formatDate,formatUserNumber,formatDateByFmt } from "@/utils/tools.js"; @@ -515,19 +515,26 @@ export default { this.audiences=hasIds.split(","); this.search(); }else{ - Promise.all([apiOldCourse.audience(this.userInfo.sysId),apiUserGroup.userGroupIds()]).then(rs=>{ - //console.log(rs,'rs'); - let aids=[]; - if(rs[0].status==200){ - aids.push(rs[0].result); + apiUserbasic.getInAudienceIds().then(rs=>{ + if(rs.status==200){ + this.audiences=rs.result; + }else{ + console.log(rs.message); } - if(rs[1].status==200){ - aids.push(rs[1].result); - } - this.audiences=aids; - sessionStorage.setItem(localKey,this.audiences); - this.search(); }) + // Promise.all([apiOldCourse.audience(this.userInfo.sysId),apiUserGroup.userGroupIds()]).then(rs=>{ + // //console.log(rs,'rs'); + // let aids=[]; + // if(rs[0].status==200){ + // aids.push(rs[0].result); + // } + // if(rs[1].status==200){ + // aids.push(rs[1].result); + // } + // this.audiences=aids; + // sessionStorage.setItem(localKey,this.audiences); + // this.search(); + // }) } } diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index fbad4316..c0c49fb0 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -1279,8 +1279,8 @@ contentId: this.contentData.id, //内容id, contentType: this.contentData.contentType, contentName: this.contentData.contentName, //内容名称 - progress: 0, - status: 1, + progress: 1, + status: 2, contentTotal: this.totalContent }; apiStudy.studyContent(params).then(res => {