123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946 |
- import Http from "../utils/http";
- class Api {
- //合并请求
- static async promiseAllSettled(array) {
- let res = await Promise.allSettled(array)
- res = res.map(item => {
- return item.status == "fulfilled" ? item.value : null;
- })
- return res;
- }
- static async promiseAll(array) {
- let res = await Promise.all(array)
- return res;
- }
- //登录
- static login(phone, verify, isLoading) {
- return Http.request({
- url: `/auth/app/phoneLogin?phone=${phone}&verify=${verify}`,
- method: 'POST',
- opt: {isLoading}
- })
- }
- static getWXOpenId(code, isLoading){
- return Http.request({
- url: `/auth/app/getUnionId?code=${code}`,
- method: 'POST',
- opt: {isLoading}
- })
- }
- //微信登录
- static async loginByWX(code, isLoading) {
- return Http.request({
- url: `/auth/app/wxLogin?code=${code}`,
- method: 'POST',
- opt: {isLoading}
- })
- }
- //绑定手机号+微信
- static binding(code) {
- return Http.request({
- url: `/auth/app/binding?code=${code}`,
- method: 'POST',
- })
- }
- //登出
- static appLogout() {
- return Http.request({
- url: '/auth/app/logout',
- method: 'DELETE',
- })
- }
- //发送短信验证码
- static sendCode(phone, isLoading) {
- return Http.request({
- url: `/auth/app/sendVerify?phone=${phone}`,
- method: 'POST',
- opt: {isLoading}
- })
- }
- //上传文件获取的密钥
- static getCosInfo() {
- return Http.request({
- url: '/video/upload/getCosInfo',
- method: 'GET',
- })
- }
- //获取实时音视频的签名
- static getSig(data) {
- return Http.request({
- url: '/video/app/sign/genUserSig',
- method: 'GET',
- data
- })
- }
- // 注册
- static register(data, isLoading) {
- return Http.request({
- url: `/auth/app/register`,
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- //首页
- static getIndex(isLoading) {
- return Http.request({
- url: '/education/app/home/homeIndex/carouselList',
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取学员通告列表 0未读 1已读
- static getStudentNoticeList(data) {
- return Http.request({
- url: '/education/app/studentNotice/list',
- method: 'GET',
- data
- })
- }
- //确认通知为已读
- static changeNoticeStatus(data, isLoading) {
- return Http.request({
- url: '/education/app/studentNotice/changeStatus',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- //获取班级 分类
- static getClassList(data) {
- return Http.request({
- url: '/education/app/home/homeIndex/teamList',
- method: 'GET',
- data
- })
- }
- //获取往期培训
- static getMyHistoryClass(pathV, data) {
- return Http.request({
- url: `/education/app/team/teamSate/${pathV}`,
- method: 'GET',
- data
- })
- }
- //获取精品课程 分类
- static getCourseMngDict(isLoading) {
- return Http.request({
- url: '/education/app/home/homeIndex/getDictChild',
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取精品课程 列表
- static getCourseMngList(data) {
- return Http.request({
- url: '/education/app/home/homeIndex/courseMngList',
- method: 'GET',
- data
- })
- }
- //获取教材阅读 分类
- static getTextBookDict(isLoading) {
- return Http.request({
- url: '/resource/app/home/textbookLibrary/selectClassifyList',
- method: 'POST',
- opt: {isLoading}
- })
- }
- //获取教材阅读 列表
- static getTextBookList(id, data) {
- return Http.request({
- url: `/resource/app/home/textbookLibrary/selectTextbookLibraryClassifyList?textbookClassify=${id}`,
- method: 'POST',
- data
- })
- }
- //获取教材详细信息
- static getBookDetail(pathV, isLoading) {
- return Http.request({
- url: `/resource/app/home/textbookLibrary/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取学院简介
- static getCollegeList(isLoading) {
- return Http.request({
- url: '/education/app/home/homeIndex/collegeList',
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取指定分类下的新闻列表
- static getNewsList(data) {
- return Http.request({
- url: '/education/app/home/homeIndex/articleList',
- method: 'GET',
- data
- })
- }
- //获取视频详细信息
- static getVideoDetail(pathV, isLoading) {
- return Http.request({
- url: `/education/app/home/homeIndex/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取当前用户 正在直播的课
- static getUserLiveId(isLoading) {
- return Http.request({
- url: '/education/app/schedulePerformance/selectSchedulePerformanceMessage',
- method: 'GET',
- opt: {isLoading}
- })
- }
- //查询课程信息
- static getCourseInfo(scheduleId, isLoading = true){
- return Http.request({
- url: '/education/app/schedulePerformance/noAuth/selectSchedulePerformance',
- method: 'GET',
- data: {
- scheduleId
- },
- opt: {isLoading}
- })
- }
- //获取当前正在进行的培训
- static getUserProjects() {
- return Http.request({
- url: '/education/app/team/selectRunningByUser',
- method: 'GET',
- })
- }
- //获取培训详情
- static getProjectsWithTeam(pathV) {
- return Http.request({
- url: `/education/app/team/userTeamInfo/${pathV}`,
- method: 'GET',
- })
- }
- // 提交学员登记表
- static submitStudentForm(data) {
- return Http.request({
- url: '/education/app/student/checkIn',
- method: 'POST',
- data
- })
- }
- //学员报到
- static report(data) {
- return Http.request({
- url: '/education/app/student/report',
- method: 'GET',
- data
- })
- }
- //获取上传文件目录
- static getUploadFile(data) {
- return Http.request({
- url: '/education/app/studentUploadFile/getChildren',
- method: 'GET',
- data,
- })
- }
- //删除文件
- static deleteFile(pathV) {
- return Http.request({
- url: `/education/app/studentUploadFile/${pathV}`,
- method: 'DELETE',
- })
- }
- //上传文件
- static uploadFile(data) {
- return Http.request({
- url: '/education/app/studentUploadFile/addFile',
- method: 'POST',
- data
- })
- }
- //获取班级群
- static getTeam(pathV) {
- return Http.request({
- url: `/education/app/team/infos/${pathV}`,
- method: 'GET',
- })
- }
- // 判断是否可以参与期末考试
- static checkFinalExam(data, errorHandler) {
- return Http.request({
- url: '/education/app/courseSchedule/isAllFinish',
- method: 'GET',
- data
- }, errorHandler)
- }
- //获取结业证样式
- static getTemplate(data) {
- return Http.request({
- url: '/education/app/template/getInfo',
- method: 'GET',
- data
- })
- }
- //获取结业证编号
- static getStudentNum(pathV) {
- return Http.request({
- url: `/education/app/student/${pathV}`,
- method: 'GET'
- })
- }
- //生成结业证编号
- static produceGradu(id, teamId, isOnline, isLoading, errorHandler) {
- return Http.request({
- url: `/education/app/student/produceGradu?id=${id}&teamId=${teamId}&isOnline=${isOnline}`,
- method: 'POST',
- opt: {isLoading}
- }, errorHandler)
- }
- //获取班级学员列表
- static getStudentList(data) {
- return Http.request({
- url: '/education/app/student/list',
- method: 'GET',
- data
- })
- }
- static getStudentAvatorList(data){
- return Http.request({
- url: '/education/app/student/listFive',
- method: 'GET',
- data
- });
- }
- // 住宿安排
- static hotelArrange(data) {
- return Http.request({
- url: '/education/app/hotelArrange/queryArrangeRoom',
- method: 'GET',
- data
- })
- }
- //获取班级动态
- static getTeamInteraction(data) {
- return Http.request({
- url: '/community/app/teamInteraction/list',
- method: 'GET',
- data
- })
- }
- //发布班级动态
- static publishTeamInteraction(data, isLoading) {
- return Http.request({
- url: '/community/app/teamInteraction/add',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- // 获取此条动态的评论列表
- static getinteractionCommentList(data) {
- return Http.request({
- url: '/community/app/interactionComment/list',
- method: 'GET',
- data
- })
- }
- // 发表评论
- static addInteractionComment(data, isLoading) {
- return Http.request({
- url: '/community/app/interactionComment/add',
- method: 'POST',
- data,
- opy: {isLoading}
- })
- }
- //获取课程计划
- static getCourseSchedule(data, isLoading) {
- return Http.request({
- url: '/education/app/courseSchedule/list',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- //获取课程详情
- static getCourseDetail(pathV, eId) {
- return Http.request({
- url: `/education/app/courseSchedule/${pathV}/${eId}`,
- method: 'GET',
- })
- }
- //游客获取课程详情 TODO 不需要了。。。看看直播页面需不需要标题
- static getGuestCourseDetail(pathV) {
- return Http.request({
- url: `/education/app/courseSchedule/getInfo/${pathV}`,
- method: 'GET',
- })
- }
- //获取录播信息
- static getRecordedLesson(data) {
- return Http.request({
- url: '/education/app/recordedLesson/selectRecordedLessonByStuIdScheduleId',
- method: 'GET',
- data
- })
- }
- //获取人脸核身结果
- static getFaceIdentifyResult(verifyResult){
- return Http.request({
- url: '/education/app/faceCheck/getCode',
- method: 'GET',
- data: {
- verifyResult
- }
- })
- }
- //签到
- static checkIn(scheduleId, studentId, wifiName) {
- return Http.request({
- url: `/education/app/signIn/insertStudentSign?scheduleId=${scheduleId}&studentId=${studentId}&wifiName=${wifiName}`,
- method: 'POST',
- })
- }
- // 提交录播课学习进度
- static changeVideoProgress(data, isLoading = true) {
- return Http.request({
- url: '/education/app/recordedLesson/updateRecordedLessonById',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- //老师
- static getTeacher(pathV, isLoading) {
- return Http.request({
- url: `/resource/app/teacher/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //上报连麦成功
- static uploadLinkOk(data) {
- return Http.request({
- url: '/education/integralDetails/integralRuleFour',
- method: 'GET',
- data
- },()=>{})
- }
- //获取学员信息
- static getUserInfo() {
- return Http.request({
- url: '/resource/app/student/getInfo',
- method: 'GET',
- })
- }
- //获取班级-学员信息
- static getUserInfoByTeam(data) {
- return Http.request({
- url: '/resource/app/student/selectStudentByIdAndTeamId',
- method: 'GET',
- data
- })
- }
- //修改用户信息
- static changeUserInfo(data) {
- return Http.request({
- url: '/resource/app/student/update',
- method: 'GET',
- data
- })
- }
- // 修改手机号
- static updatePhone(data, isLoading) {
- return Http.request({
- url: '/resource/app/student/updatePhone',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- //获取当前学员兑换的积分课
- static getScoreList(data) {
- return Http.request({
- url: '/resource/app/integralCrouse/selectChangeCourseList',
- method: 'GET',
- data
- })
- }
- //获取当前学员未兑换的积分课
- static getNoScoreList(data) {
- return Http.request({
- url: '/resource/app/integralCrouse/selectNoChangeCourseList',
- method: 'GET',
- data
- })
- }
- //获取积分课
- static getScore(pathV, isLoading) {
- return Http.request({
- url: `/resource/app/integralCrouse/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取积分信息
- static getScoreInfo(isLoading) {
- return Http.request({
- url: '/education/app/integralDetails/selectItemSurplusValueByIdCard',
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取积分明细
- static getScoreDetail(data) {
- return Http.request({
- url: '/education/app/integralDetails/selectMiniIntegralDetailsByIntegralType',
- method: 'GET',
- data
- })
- }
- //兑换积分
- static useScore(data, isLoading) {
- return Http.request({
- url: '/education/app/integralDetails/insertIntegralCourseByEducationStuId',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- //获取我的考试列表
- static getPaperList(data) {
- return Http.request({
- url: '/resource/app/paper/selStuPaperList',
- method: 'GET',
- data
- })
- }
- //获取考试试卷详情
- static getPaper(pathV, isLoading) {
- return Http.request({
- url: `/resource/app/paper/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取考试结果
- static getPaperResult(pathV, pathV2, isLoading) {
- return Http.request({
- url: `/resource/app/paper/echopaper/${pathV}/${pathV2}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取问卷结果
- static getQuestionResult(data, isLoading) {
- return Http.request({
- url: `/education/app/answerSheet/getYourAnswer`,
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- //提交答案
- static putPaper(data, isLoading) {
- return Http.request({
- url: '/education/app/answerSheet/add',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- //获取我的问卷列表
- static getQuestionList(data) {
- return Http.request({
- url: '/resource/app/questionnaire/stuQuestionnairelist',
- method: 'GET',
- data
- })
- }
- //获取问卷详情
- static getQuestion(pathV, isLoading) {
- return Http.request({
- url: `/resource/app/questionnaire/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //提交问卷
- static putQuestion(data, isLoading) {
- return Http.request({
- url: '/education/app/questionnaireSheet/add',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- // 获取推荐项目
- // 0 未报名 1 已报名
- static getRecommend(data) {
- return Http.request({
- url: `/education/app/item/selSignedUpRecommendItem/${data.type}`,
- method: 'GET',
- data
- })
- }
- // 获取推荐项目详情
- static getRecommendInfo(id, isLoading) {
- return Http.request({
- url: `/education/app/item/selSignedUpRecommendItemTeamInfo/${id}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- // 推荐项目报名
- static signUp(data, isLoading) {
- return Http.request({
- url: '/education/app/student/signUp',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- //获取我的消息
- static getMsgList(data) {
- return Http.request({
- url: '/management/app/messageLog/list',
- method: 'GET',
- data
- })
- }
- //获取app信息
- static getHelpInfo(pathV, isLoading) {
- return Http.request({
- url: `/education/app/home/homeIndex/appInfo/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- //获取社区互动首页信息
- static getTrainIndex(isLoading) {
- return Http.request({
- url: '/community/app/train/manage/queryTrainInfo',
- method: 'GET',
- opt: {isLoading}
- })
- }
- // 获取消息动态
- static getMyMessage(data) {
- return Http.request({
- url: '/community/app/train/detail/queryAllList',
- method: 'GET',
- data
- })
- }
- //获取我的发布
- static getTrainList(data) {
- return Http.request({
- url: '/community/app/train/manage/list',
- method: 'GET',
- data
- })
- }
- // 获取我的发布每一条详情
- static getTrainListDetail(data, isLoading) {
- return Http.request({
- url: '/community/app/train/manage/queryInfo',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- // 获取我的评论
- static getMyComment(data) {
- return Http.request({
- url: '/community/app/train/detail/list',
- method: 'GET',
- data
- })
- }
- // 发布评论
- static ReleaseComment(data, isLoading) {
- return Http.request({
- url: '/community/app/train/detail',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- //获取培训方向,培训形式,课程类型,典型分类,注册按钮显示状态数据 sys_train_direct、sys_train_form、sys_kc_type、sys_example_type,wifi_config,sys_register_status
- static getPulishDict(pathV, isLoading) {
- return Http.request({
- url: `/system/app/home/dict/data/type/${pathV}`,
- method: 'GET',
- opt: {isLoading}
- })
- }
- // 发布培训需求
- static ReleaseNeeds(data, isLoading) {
- return Http.request({
- url: '/community/app/train/manage',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- // 发布热点难点
- static ReleaseHot(data, isLoading) {
- return Http.request({
- url: '/community/app/focusIssues/add',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- // 发布典型案例
- static ReleaseExamples(data, isLoading) {
- return Http.request({
- url: '/community/app/example',
- method: 'POST',
- data,
- opt: {isLoading}
- })
- }
- // 查询四级行政区
- static getRegionList(data) {
- return Http.request({
- url: '/system/app/home/region/list',
- method: 'GET',
- data
- })
- }
- // 查询单位
- static getUnitList(data) {
- return Http.request({
- url: '/system/app/home/unit/list',
- method: 'GET',
- data
- })
- }
- // 根据code查上级行政id 和 单位id
- static getRegionByCode(data) {
- return Http.request({
- url: '/system/app/home/region/infos',
- method: 'GET',
- data
- });
- }
- // 获取学员手册资料
- static getBook(data, isLoading) {
- return Http.request({
- url: '/education/app/manual/list',
- method: 'GET',
- data,
- opt: {isLoading}
- })
- }
- // 通过索引获取学员手册
- static getStudentBookByIndex(index) {
- return Http.request({
- url: `/education/app/manualConfig/infos/${index}`,
- method: 'GET'
- });
- }
- // 学员手册日程安排
- static studentBookSchedule(data) {
- return Http.request({
- url: '/education/app/classScheduleCard/list',
- method: 'GET',
- data
- });
- }
- // 学员手册座位图
- static studentBookSeat(params) {
- return Http.request({
- url: `/education/app/courseSchedule/infos/${params}`,
- method: 'GET'
- });
- }
- // 学员手册 学员名单
- static studentBookLists(data) {
- return Http.request({
- url: '/education/app/student/studentNameList',
- method: 'GET',
- data
- });
- }
- // 学员手册 项目组名单
- static studentBookGroups(id) {
- return Http.request({
- url: `/education/app/team/infos/${id}`,
- method: 'GET'
- });
- }
- // 学员手册 教师简介
- static studentBookTeacher(url) {
- return Http.request({
- url: `/resource/app/teacher/queryTeacherInfos/${url}`,
- method: 'GET'
- });
- }
- //学员手册 基地介绍
- static studentBaseLibrary(url) {
- return Http.request({
- url: `/resource/manage/app/library/queryBaseLibraryDesc/${url}`,
- method: 'GET'
- })
- }
- //获取课程是否开启
- static getCourseOpenStatus(scheduleId, errorHandler) {
- return Http.request({
- url: `/education/app/courseSchedule/getTimer`,
- method: 'GET',
- data: {
- scheduleId
- }
- }, errorHandler);
- }
- //获取积分规则
- static getRule(){
- return Http.request({
- url: '/education/app/integralRule/list',
- method: 'GET'
- })
- }
- static getTeamTeacherPhone(data){
- return Http.request({
- url: '/education/app/team/getTeamByDirector',
- method: 'GET',
- data
- });
- }
- // static insertRedisGuest({name, id}, isLoading = true){
- // return Http.request({
- // url: `/education/app/home/homeIndex/insertSelectRedisGuest?nickName=${name}&openId=${id}`,
- // method: 'GET',
- // opt: {isLoading}
- // // data
- // });
- // }
-
- // static queryGuestName(openId, isLoading = true) {
- // return Http.request({
- // url: `/education/app/home/homeIndex/insertSelectRedisGuest?openId=${openId}`,
- // method: 'GET',
- // opt: {isLoading}
- // // data
- // });
- // }
- }
- export default Api
|