api.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. import Http from "../utils/http";
  2. class Api {
  3. //合并请求
  4. static async promiseAllSettled(array) {
  5. let res = await Promise.allSettled(array)
  6. res = res.map(item => {
  7. return item.status == "fulfilled" ? item.value : null;
  8. })
  9. return res;
  10. }
  11. static async promiseAll(array) {
  12. let res = await Promise.all(array)
  13. return res;
  14. }
  15. //登录
  16. static login(phone, verify, isLoading) {
  17. return Http.request({
  18. url: `/auth/app/phoneLogin?phone=${phone}&verify=${verify}`,
  19. method: 'POST',
  20. opt: {isLoading}
  21. })
  22. }
  23. static getWXOpenId(code, isLoading){
  24. return Http.request({
  25. url: `/auth/app/getUnionId?code=${code}`,
  26. method: 'POST',
  27. opt: {isLoading}
  28. })
  29. }
  30. //微信登录
  31. static async loginByWX(code, isLoading) {
  32. return Http.request({
  33. url: `/auth/app/wxLogin?code=${code}`,
  34. method: 'POST',
  35. opt: {isLoading}
  36. })
  37. }
  38. //绑定手机号+微信
  39. static binding(code) {
  40. return Http.request({
  41. url: `/auth/app/binding?code=${code}`,
  42. method: 'POST',
  43. })
  44. }
  45. //登出
  46. static appLogout() {
  47. return Http.request({
  48. url: '/auth/app/logout',
  49. method: 'DELETE',
  50. })
  51. }
  52. //发送短信验证码
  53. static sendCode(phone, isLoading) {
  54. return Http.request({
  55. url: `/auth/app/sendVerify?phone=${phone}`,
  56. method: 'POST',
  57. opt: {isLoading}
  58. })
  59. }
  60. //上传文件获取的密钥
  61. static getCosInfo() {
  62. return Http.request({
  63. url: '/video/upload/getCosInfo',
  64. method: 'GET',
  65. })
  66. }
  67. //获取实时音视频的签名
  68. static getSig(data) {
  69. return Http.request({
  70. url: '/video/app/sign/genUserSig',
  71. method: 'GET',
  72. data
  73. })
  74. }
  75. // 注册
  76. static register(data, isLoading) {
  77. return Http.request({
  78. url: `/auth/app/register`,
  79. method: 'POST',
  80. data,
  81. opt: {isLoading}
  82. })
  83. }
  84. //首页
  85. static getIndex(isLoading) {
  86. return Http.request({
  87. url: '/education/app/home/homeIndex/carouselList',
  88. method: 'GET',
  89. opt: {isLoading}
  90. })
  91. }
  92. //获取学员通告列表 0未读 1已读
  93. static getStudentNoticeList(data) {
  94. return Http.request({
  95. url: '/education/app/studentNotice/list',
  96. method: 'GET',
  97. data
  98. })
  99. }
  100. //确认通知为已读
  101. static changeNoticeStatus(data, isLoading) {
  102. return Http.request({
  103. url: '/education/app/studentNotice/changeStatus',
  104. method: 'GET',
  105. data,
  106. opt: {isLoading}
  107. })
  108. }
  109. //获取班级 分类
  110. static getClassList(data) {
  111. return Http.request({
  112. url: '/education/app/home/homeIndex/teamList',
  113. method: 'GET',
  114. data
  115. })
  116. }
  117. //获取往期培训
  118. static getMyHistoryClass(pathV, data) {
  119. return Http.request({
  120. url: `/education/app/team/teamSate/${pathV}`,
  121. method: 'GET',
  122. data
  123. })
  124. }
  125. //获取精品课程 分类
  126. static getCourseMngDict(isLoading) {
  127. return Http.request({
  128. url: '/education/app/home/homeIndex/getDictChild',
  129. method: 'GET',
  130. opt: {isLoading}
  131. })
  132. }
  133. //获取精品课程 列表
  134. static getCourseMngList(data) {
  135. return Http.request({
  136. url: '/education/app/home/homeIndex/courseMngList',
  137. method: 'GET',
  138. data
  139. })
  140. }
  141. //获取教材阅读 分类
  142. static getTextBookDict(isLoading) {
  143. return Http.request({
  144. url: '/resource/app/home/textbookLibrary/selectClassifyList',
  145. method: 'POST',
  146. opt: {isLoading}
  147. })
  148. }
  149. //获取教材阅读 列表
  150. static getTextBookList(id, data) {
  151. return Http.request({
  152. url: `/resource/app/home/textbookLibrary/selectTextbookLibraryClassifyList?textbookClassify=${id}`,
  153. method: 'POST',
  154. data
  155. })
  156. }
  157. //获取教材详细信息
  158. static getBookDetail(pathV, isLoading) {
  159. return Http.request({
  160. url: `/resource/app/home/textbookLibrary/${pathV}`,
  161. method: 'GET',
  162. opt: {isLoading}
  163. })
  164. }
  165. //获取学院简介
  166. static getCollegeList(isLoading) {
  167. return Http.request({
  168. url: '/education/app/home/homeIndex/collegeList',
  169. method: 'GET',
  170. opt: {isLoading}
  171. })
  172. }
  173. //获取指定分类下的新闻列表
  174. static getNewsList(data) {
  175. return Http.request({
  176. url: '/education/app/home/homeIndex/articleList',
  177. method: 'GET',
  178. data
  179. })
  180. }
  181. //获取视频详细信息
  182. static getVideoDetail(pathV, isLoading) {
  183. return Http.request({
  184. url: `/education/app/home/homeIndex/${pathV}`,
  185. method: 'GET',
  186. opt: {isLoading}
  187. })
  188. }
  189. //获取当前用户 正在直播的课
  190. static getUserLiveId(isLoading) {
  191. return Http.request({
  192. url: '/education/app/schedulePerformance/selectSchedulePerformanceMessage',
  193. method: 'GET',
  194. opt: {isLoading}
  195. })
  196. }
  197. //查询课程信息
  198. static getCourseInfo(scheduleId, isLoading = true){
  199. return Http.request({
  200. url: '/education/app/schedulePerformance/noAuth/selectSchedulePerformance',
  201. method: 'GET',
  202. data: {
  203. scheduleId
  204. },
  205. opt: {isLoading}
  206. })
  207. }
  208. //获取当前正在进行的培训
  209. static getUserProjects() {
  210. return Http.request({
  211. url: '/education/app/team/selectRunningByUser',
  212. method: 'GET',
  213. })
  214. }
  215. //获取培训详情
  216. static getProjectsWithTeam(pathV) {
  217. return Http.request({
  218. url: `/education/app/team/userTeamInfo/${pathV}`,
  219. method: 'GET',
  220. })
  221. }
  222. // 提交学员登记表
  223. static submitStudentForm(data) {
  224. return Http.request({
  225. url: '/education/app/student/checkIn',
  226. method: 'POST',
  227. data
  228. })
  229. }
  230. //学员报到
  231. static report(data) {
  232. return Http.request({
  233. url: '/education/app/student/report',
  234. method: 'GET',
  235. data
  236. })
  237. }
  238. //获取上传文件目录
  239. static getUploadFile(data) {
  240. return Http.request({
  241. url: '/education/app/studentUploadFile/getChildren',
  242. method: 'GET',
  243. data,
  244. })
  245. }
  246. //删除文件
  247. static deleteFile(pathV) {
  248. return Http.request({
  249. url: `/education/app/studentUploadFile/${pathV}`,
  250. method: 'DELETE',
  251. })
  252. }
  253. //上传文件
  254. static uploadFile(data) {
  255. return Http.request({
  256. url: '/education/app/studentUploadFile/addFile',
  257. method: 'POST',
  258. data
  259. })
  260. }
  261. //获取班级群
  262. static getTeam(pathV) {
  263. return Http.request({
  264. url: `/education/app/team/infos/${pathV}`,
  265. method: 'GET',
  266. })
  267. }
  268. // 判断是否可以参与期末考试
  269. static checkFinalExam(data, errorHandler) {
  270. return Http.request({
  271. url: '/education/app/courseSchedule/isAllFinish',
  272. method: 'GET',
  273. data
  274. }, errorHandler)
  275. }
  276. //获取结业证样式
  277. static getTemplate(data) {
  278. return Http.request({
  279. url: '/education/app/template/getInfo',
  280. method: 'GET',
  281. data
  282. })
  283. }
  284. //获取结业证编号
  285. static getStudentNum(pathV) {
  286. return Http.request({
  287. url: `/education/app/student/${pathV}`,
  288. method: 'GET'
  289. })
  290. }
  291. //生成结业证编号
  292. static produceGradu(id, teamId, isOnline, isLoading, errorHandler) {
  293. return Http.request({
  294. url: `/education/app/student/produceGradu?id=${id}&teamId=${teamId}&isOnline=${isOnline}`,
  295. method: 'POST',
  296. opt: {isLoading}
  297. }, errorHandler)
  298. }
  299. //获取班级学员列表
  300. static getStudentList(data) {
  301. return Http.request({
  302. url: '/education/app/student/list',
  303. method: 'GET',
  304. data
  305. })
  306. }
  307. static getStudentAvatorList(data){
  308. return Http.request({
  309. url: '/education/app/student/listFive',
  310. method: 'GET',
  311. data
  312. });
  313. }
  314. // 住宿安排
  315. static hotelArrange(data) {
  316. return Http.request({
  317. url: '/education/app/hotelArrange/queryArrangeRoom',
  318. method: 'GET',
  319. data
  320. })
  321. }
  322. //获取班级动态
  323. static getTeamInteraction(data) {
  324. return Http.request({
  325. url: '/community/app/teamInteraction/list',
  326. method: 'GET',
  327. data
  328. })
  329. }
  330. //发布班级动态
  331. static publishTeamInteraction(data, isLoading) {
  332. return Http.request({
  333. url: '/community/app/teamInteraction/add',
  334. method: 'POST',
  335. data,
  336. opt: {isLoading}
  337. })
  338. }
  339. // 获取此条动态的评论列表
  340. static getinteractionCommentList(data) {
  341. return Http.request({
  342. url: '/community/app/interactionComment/list',
  343. method: 'GET',
  344. data
  345. })
  346. }
  347. // 发表评论
  348. static addInteractionComment(data, isLoading) {
  349. return Http.request({
  350. url: '/community/app/interactionComment/add',
  351. method: 'POST',
  352. data,
  353. opy: {isLoading}
  354. })
  355. }
  356. //获取课程计划
  357. static getCourseSchedule(data, isLoading) {
  358. return Http.request({
  359. url: '/education/app/courseSchedule/list',
  360. method: 'GET',
  361. data,
  362. opt: {isLoading}
  363. })
  364. }
  365. //获取课程详情
  366. static getCourseDetail(pathV, eId) {
  367. return Http.request({
  368. url: `/education/app/courseSchedule/${pathV}/${eId}`,
  369. method: 'GET',
  370. })
  371. }
  372. //游客获取课程详情 TODO 不需要了。。。看看直播页面需不需要标题
  373. static getGuestCourseDetail(pathV) {
  374. return Http.request({
  375. url: `/education/app/courseSchedule/getInfo/${pathV}`,
  376. method: 'GET',
  377. })
  378. }
  379. //获取录播信息
  380. static getRecordedLesson(data) {
  381. return Http.request({
  382. url: '/education/app/recordedLesson/selectRecordedLessonByStuIdScheduleId',
  383. method: 'GET',
  384. data
  385. })
  386. }
  387. //获取人脸核身结果
  388. static getFaceIdentifyResult(verifyResult){
  389. return Http.request({
  390. url: '/education/app/faceCheck/getCode',
  391. method: 'GET',
  392. data: {
  393. verifyResult
  394. }
  395. })
  396. }
  397. //签到
  398. static checkIn(scheduleId, studentId, wifiName) {
  399. return Http.request({
  400. url: `/education/app/signIn/insertStudentSign?scheduleId=${scheduleId}&studentId=${studentId}&wifiName=${wifiName}`,
  401. method: 'POST',
  402. })
  403. }
  404. // 提交录播课学习进度
  405. static changeVideoProgress(data, isLoading = true) {
  406. return Http.request({
  407. url: '/education/app/recordedLesson/updateRecordedLessonById',
  408. method: 'GET',
  409. data,
  410. opt: {isLoading}
  411. })
  412. }
  413. //老师
  414. static getTeacher(pathV, isLoading) {
  415. return Http.request({
  416. url: `/resource/app/teacher/${pathV}`,
  417. method: 'GET',
  418. opt: {isLoading}
  419. })
  420. }
  421. //上报连麦成功
  422. static uploadLinkOk(data) {
  423. return Http.request({
  424. url: '/education/integralDetails/integralRuleFour',
  425. method: 'GET',
  426. data
  427. },()=>{})
  428. }
  429. //获取学员信息
  430. static getUserInfo() {
  431. return Http.request({
  432. url: '/resource/app/student/getInfo',
  433. method: 'GET',
  434. })
  435. }
  436. //获取班级-学员信息
  437. static getUserInfoByTeam(data) {
  438. return Http.request({
  439. url: '/resource/app/student/selectStudentByIdAndTeamId',
  440. method: 'GET',
  441. data
  442. })
  443. }
  444. //修改用户信息
  445. static changeUserInfo(data) {
  446. return Http.request({
  447. url: '/resource/app/student/update',
  448. method: 'GET',
  449. data
  450. })
  451. }
  452. // 修改手机号
  453. static updatePhone(data, isLoading) {
  454. return Http.request({
  455. url: '/resource/app/student/updatePhone',
  456. method: 'GET',
  457. data,
  458. opt: {isLoading}
  459. })
  460. }
  461. //获取当前学员兑换的积分课
  462. static getScoreList(data) {
  463. return Http.request({
  464. url: '/resource/app/integralCrouse/selectChangeCourseList',
  465. method: 'GET',
  466. data
  467. })
  468. }
  469. //获取当前学员未兑换的积分课
  470. static getNoScoreList(data) {
  471. return Http.request({
  472. url: '/resource/app/integralCrouse/selectNoChangeCourseList',
  473. method: 'GET',
  474. data
  475. })
  476. }
  477. //获取积分课
  478. static getScore(pathV, isLoading) {
  479. return Http.request({
  480. url: `/resource/app/integralCrouse/${pathV}`,
  481. method: 'GET',
  482. opt: {isLoading}
  483. })
  484. }
  485. //获取积分信息
  486. static getScoreInfo(isLoading) {
  487. return Http.request({
  488. url: '/education/app/integralDetails/selectItemSurplusValueByIdCard',
  489. method: 'GET',
  490. opt: {isLoading}
  491. })
  492. }
  493. //获取积分明细
  494. static getScoreDetail(data) {
  495. return Http.request({
  496. url: '/education/app/integralDetails/selectMiniIntegralDetailsByIntegralType',
  497. method: 'GET',
  498. data
  499. })
  500. }
  501. //兑换积分
  502. static useScore(data, isLoading) {
  503. return Http.request({
  504. url: '/education/app/integralDetails/insertIntegralCourseByEducationStuId',
  505. method: 'GET',
  506. data,
  507. opt: {isLoading}
  508. })
  509. }
  510. //获取我的考试列表
  511. static getPaperList(data) {
  512. return Http.request({
  513. url: '/resource/app/paper/selStuPaperList',
  514. method: 'GET',
  515. data
  516. })
  517. }
  518. //获取考试试卷详情
  519. static getPaper(pathV, isLoading) {
  520. return Http.request({
  521. url: `/resource/app/paper/${pathV}`,
  522. method: 'GET',
  523. opt: {isLoading}
  524. })
  525. }
  526. //获取考试结果
  527. static getPaperResult(pathV, pathV2, isLoading) {
  528. return Http.request({
  529. url: `/resource/app/paper/echopaper/${pathV}/${pathV2}`,
  530. method: 'GET',
  531. opt: {isLoading}
  532. })
  533. }
  534. //获取问卷结果
  535. static getQuestionResult(data, isLoading) {
  536. return Http.request({
  537. url: `/education/app/answerSheet/getYourAnswer`,
  538. method: 'GET',
  539. data,
  540. opt: {isLoading}
  541. })
  542. }
  543. //提交答案
  544. static putPaper(data, isLoading) {
  545. return Http.request({
  546. url: '/education/app/answerSheet/add',
  547. method: 'POST',
  548. data,
  549. opt: {isLoading}
  550. })
  551. }
  552. //获取我的问卷列表
  553. static getQuestionList(data) {
  554. return Http.request({
  555. url: '/resource/app/questionnaire/stuQuestionnairelist',
  556. method: 'GET',
  557. data
  558. })
  559. }
  560. //获取问卷详情
  561. static getQuestion(pathV, isLoading) {
  562. return Http.request({
  563. url: `/resource/app/questionnaire/${pathV}`,
  564. method: 'GET',
  565. opt: {isLoading}
  566. })
  567. }
  568. //提交问卷
  569. static putQuestion(data, isLoading) {
  570. return Http.request({
  571. url: '/education/app/questionnaireSheet/add',
  572. method: 'POST',
  573. data,
  574. opt: {isLoading}
  575. })
  576. }
  577. // 获取推荐项目
  578. // 0 未报名 1 已报名
  579. static getRecommend(data) {
  580. return Http.request({
  581. url: `/education/app/item/selSignedUpRecommendItem/${data.type}`,
  582. method: 'GET',
  583. data
  584. })
  585. }
  586. // 获取推荐项目详情
  587. static getRecommendInfo(id, isLoading) {
  588. return Http.request({
  589. url: `/education/app/item/selSignedUpRecommendItemTeamInfo/${id}`,
  590. method: 'GET',
  591. opt: {isLoading}
  592. })
  593. }
  594. // 推荐项目报名
  595. static signUp(data, isLoading) {
  596. return Http.request({
  597. url: '/education/app/student/signUp',
  598. method: 'POST',
  599. data,
  600. opt: {isLoading}
  601. })
  602. }
  603. //获取我的消息
  604. static getMsgList(data) {
  605. return Http.request({
  606. url: '/management/app/messageLog/list',
  607. method: 'GET',
  608. data
  609. })
  610. }
  611. //获取app信息
  612. static getHelpInfo(pathV, isLoading) {
  613. return Http.request({
  614. url: `/education/app/home/homeIndex/appInfo/${pathV}`,
  615. method: 'GET',
  616. opt: {isLoading}
  617. })
  618. }
  619. //获取社区互动首页信息
  620. static getTrainIndex(isLoading) {
  621. return Http.request({
  622. url: '/community/app/train/manage/queryTrainInfo',
  623. method: 'GET',
  624. opt: {isLoading}
  625. })
  626. }
  627. // 获取消息动态
  628. static getMyMessage(data) {
  629. return Http.request({
  630. url: '/community/app/train/detail/queryAllList',
  631. method: 'GET',
  632. data
  633. })
  634. }
  635. //获取我的发布
  636. static getTrainList(data) {
  637. return Http.request({
  638. url: '/community/app/train/manage/list',
  639. method: 'GET',
  640. data
  641. })
  642. }
  643. // 获取我的发布每一条详情
  644. static getTrainListDetail(data, isLoading) {
  645. return Http.request({
  646. url: '/community/app/train/manage/queryInfo',
  647. method: 'GET',
  648. data,
  649. opt: {isLoading}
  650. })
  651. }
  652. // 获取我的评论
  653. static getMyComment(data) {
  654. return Http.request({
  655. url: '/community/app/train/detail/list',
  656. method: 'GET',
  657. data
  658. })
  659. }
  660. // 发布评论
  661. static ReleaseComment(data, isLoading) {
  662. return Http.request({
  663. url: '/community/app/train/detail',
  664. method: 'POST',
  665. data,
  666. opt: {isLoading}
  667. })
  668. }
  669. //获取培训方向,培训形式,课程类型,典型分类,注册按钮显示状态数据 sys_train_direct、sys_train_form、sys_kc_type、sys_example_type,wifi_config,sys_register_status
  670. static getPulishDict(pathV, isLoading) {
  671. return Http.request({
  672. url: `/system/app/home/dict/data/type/${pathV}`,
  673. method: 'GET',
  674. opt: {isLoading}
  675. })
  676. }
  677. // 发布培训需求
  678. static ReleaseNeeds(data, isLoading) {
  679. return Http.request({
  680. url: '/community/app/train/manage',
  681. method: 'POST',
  682. data,
  683. opt: {isLoading}
  684. })
  685. }
  686. // 发布热点难点
  687. static ReleaseHot(data, isLoading) {
  688. return Http.request({
  689. url: '/community/app/focusIssues/add',
  690. method: 'POST',
  691. data,
  692. opt: {isLoading}
  693. })
  694. }
  695. // 发布典型案例
  696. static ReleaseExamples(data, isLoading) {
  697. return Http.request({
  698. url: '/community/app/example',
  699. method: 'POST',
  700. data,
  701. opt: {isLoading}
  702. })
  703. }
  704. // 查询四级行政区
  705. static getRegionList(data) {
  706. return Http.request({
  707. url: '/system/app/home/region/list',
  708. method: 'GET',
  709. data
  710. })
  711. }
  712. // 查询单位
  713. static getUnitList(data) {
  714. return Http.request({
  715. url: '/system/app/home/unit/list',
  716. method: 'GET',
  717. data
  718. })
  719. }
  720. // 根据code查上级行政id 和 单位id
  721. static getRegionByCode(data) {
  722. return Http.request({
  723. url: '/system/app/home/region/infos',
  724. method: 'GET',
  725. data
  726. });
  727. }
  728. // 获取学员手册资料
  729. static getBook(data, isLoading) {
  730. return Http.request({
  731. url: '/education/app/manual/list',
  732. method: 'GET',
  733. data,
  734. opt: {isLoading}
  735. })
  736. }
  737. // 通过索引获取学员手册
  738. static getStudentBookByIndex(index) {
  739. return Http.request({
  740. url: `/education/app/manualConfig/infos/${index}`,
  741. method: 'GET'
  742. });
  743. }
  744. // 学员手册日程安排
  745. static studentBookSchedule(data) {
  746. return Http.request({
  747. url: '/education/app/classScheduleCard/list',
  748. method: 'GET',
  749. data
  750. });
  751. }
  752. // 学员手册座位图
  753. static studentBookSeat(params) {
  754. return Http.request({
  755. url: `/education/app/courseSchedule/infos/${params}`,
  756. method: 'GET'
  757. });
  758. }
  759. // 学员手册 学员名单
  760. static studentBookLists(data) {
  761. return Http.request({
  762. url: '/education/app/student/studentNameList',
  763. method: 'GET',
  764. data
  765. });
  766. }
  767. // 学员手册 项目组名单
  768. static studentBookGroups(id) {
  769. return Http.request({
  770. url: `/education/app/team/infos/${id}`,
  771. method: 'GET'
  772. });
  773. }
  774. // 学员手册 教师简介
  775. static studentBookTeacher(url) {
  776. return Http.request({
  777. url: `/resource/app/teacher/queryTeacherInfos/${url}`,
  778. method: 'GET'
  779. });
  780. }
  781. //学员手册 基地介绍
  782. static studentBaseLibrary(url) {
  783. return Http.request({
  784. url: `/resource/manage/app/library/queryBaseLibraryDesc/${url}`,
  785. method: 'GET'
  786. })
  787. }
  788. //获取课程是否开启
  789. static getCourseOpenStatus(scheduleId, errorHandler) {
  790. return Http.request({
  791. url: `/education/app/courseSchedule/getTimer`,
  792. method: 'GET',
  793. data: {
  794. scheduleId
  795. }
  796. }, errorHandler);
  797. }
  798. //获取积分规则
  799. static getRule(){
  800. return Http.request({
  801. url: '/education/app/integralRule/list',
  802. method: 'GET'
  803. })
  804. }
  805. static getTeamTeacherPhone(data){
  806. return Http.request({
  807. url: '/education/app/team/getTeamByDirector',
  808. method: 'GET',
  809. data
  810. });
  811. }
  812. // static insertRedisGuest({name, id}, isLoading = true){
  813. // return Http.request({
  814. // url: `/education/app/home/homeIndex/insertSelectRedisGuest?nickName=${name}&openId=${id}`,
  815. // method: 'GET',
  816. // opt: {isLoading}
  817. // // data
  818. // });
  819. // }
  820. // static queryGuestName(openId, isLoading = true) {
  821. // return Http.request({
  822. // url: `/education/app/home/homeIndex/insertSelectRedisGuest?openId=${openId}`,
  823. // method: 'GET',
  824. // opt: {isLoading}
  825. // // data
  826. // });
  827. // }
  828. }
  829. export default Api