@x-edu/live-player 0.0.1-0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +10 -0
- package/.eslintignore +8 -0
- package/.eslintrc.js +26 -0
- package/.gem-mine +11 -0
- package/.postcssrc.js +6 -0
- package/README.md +146 -0
- package/babel.config.js +33 -0
- package/dist/XEduLivePlayer.common.js +61933 -0
- package/dist/XEduLivePlayerPre.common.js +61588 -0
- package/doc/develop.md +24 -0
- package/gem-mine.config.js +86 -0
- package/jest.config.js +9 -0
- package/jsconfig.json +15 -0
- package/mock/helper.js +8 -0
- package/mock/index.js +34 -0
- package/package.json +99 -0
- package/public/.well-known/apple-app-site-association +1 -0
- package/public/3rd/ali-player/alipayercomponents-1.0.8.min.js +26 -0
- package/public/3rd/ali-player/aliplayer-hls-min.js +28 -0
- package/public/3rd/ali-player/aliplayer-min.css +1 -0
- package/public/3rd/ali-player/aliplayer-min.js +2 -0
- package/public/3rd/ali-player/img/fullscreen.png +0 -0
- package/public/3rd/ali-player/img/playanimation.png +0 -0
- package/public/3rd/ali-player/img/smallscreen.png +0 -0
- package/public/3rd/ali-player/img/volume.png +0 -0
- package/public/3rd/im-web-push/index.umd.js +14 -0
- package/public/JsBridge.js +1602 -0
- package/public/fish/editor/lang/zh-cn/zh-cn.min.js +1 -0
- package/public/fish/editor/loading.gif +0 -0
- package/public/fish/editor/themes/default/css/ueditor.css +1906 -0
- package/public/fish/editor/themes/default/images/icons.png +0 -0
- package/public/fish/editor/themes/default/images/scale.png +0 -0
- package/public/fish/editor/themes/default/images/spacer.gif +0 -0
- package/public/fish/editor/themes/default/images/videologo.gif +0 -0
- package/public/fish/editor/themes/iframe.css +0 -0
- package/public/fish/editor/third-party/codemirror/codemirror.css +104 -0
- package/public/fish/editor/third-party/codemirror/codemirror.js +3581 -0
- package/public/fish/editor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
- package/public/fish/editor/ueditor.all.min.js +17 -0
- package/public/fish/editor/ueditor.config.js +467 -0
- package/public/fish/icon/umd-4.1.2.js +2 -0
- package/public/fish/video/icon_active.gif +0 -0
- package/public/fish/video/videoplayer.min.css +7 -0
- package/public/fish/video/videoplayer.min.js +32 -0
- package/public/fish/video/zh-CN.js +83 -0
- package/public/icon/demo.css +539 -0
- package/public/icon/demo_index.html +2189 -0
- package/public/icon/iconfont.css +363 -0
- package/public/icon/iconfont.js +1 -0
- package/public/icon/iconfont.json +618 -0
- package/public/icon/iconfont.ttf +0 -0
- package/public/icon/iconfont.woff +0 -0
- package/public/icon/iconfont.woff2 +0 -0
- package/public/index.html +50 -0
- package/script/image/readme.md +77 -0
- package/script/postcss.js +48 -0
- package/src/App.jsx +24 -0
- package/src/asset/img/activeBanner//342/200/234/345/217/214/345/207/217/342/200/235/345/267/245/344/275/234.png +0 -0
- package/src/asset/img/activeBanner//344/271/211/345/212/241/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//344/274/230/347/247/200/344/274/240/347/273/237/346/226/207/345/214/226.png +0 -0
- package/src/asset/img/activeBanner//344/275/223/350/202/262/351/224/273/347/202/274.png +0 -0
- package/src/asset/img/activeBanner//345/205/232/345/217/262/345/255/246/344/271/240.png +0 -0
- package/src/asset/img/activeBanner//345/205/232/345/273/272/345/276/267/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//345/212/263/345/212/250/345/205/211/350/215/243.png +0 -0
- package/src/asset/img/activeBanner//345/212/263/345/212/250/345/257/274/350/210/252.png +0 -0
- package/src/asset/img/activeBanner//345/212/263/345/212/250/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//345/212/263/345/212/250/346/231/272/346/205/247.png +0 -0
- package/src/asset/img/activeBanner//345/223/201/345/276/267/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//345/255/246/345/211/215/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//345/256/252/346/263/225/346/263/225/346/262/273.png +0 -0
- package/src/asset/img/activeBanner//345/256/266/345/272/255/346/225/231/350/202/262/346/214/207/345/257/274.png +0 -0
- package/src/asset/img/activeBanner//345/256/266/345/272/255/346/225/231/350/202/262/346/226/271/346/263/225.png +0 -0
- package/src/asset/img/activeBanner//345/256/266/345/272/255/346/225/231/350/202/262/350/247/202/345/277/265.png +0 -0
- package/src/asset/img/activeBanner//345/275/261/350/247/206/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//345/277/203/347/220/206/345/201/245/345/272/267.png +0 -0
- package/src/asset/img/activeBanner//346/200/235/346/224/277/350/257/276/347/250/213.png +0 -0
- package/src/asset/img/activeBanner//346/225/231/345/255/246/346/210/220/346/236/234.png +0 -0
- package/src/asset/img/activeBanner//346/225/231/346/235/220/344/270/223/345/214/272.png +0 -0
- package/src/asset/img/activeBanner//346/225/231/350/202/262/344/277/241/346/201/257/345/214/226.png +0 -0
- package/src/asset/img/activeBanner//346/226/207/345/214/226/350/211/272/346/234/257.png +0 -0
- package/src/asset/img/activeBanner//346/231/256/351/200/232/351/253/230/344/270/255.png +0 -0
- package/src/asset/img/activeBanner//347/210/261/345/233/275/344/270/273/344/271/211.png +0 -0
- package/src/asset/img/activeBanner//347/211/271/346/256/212/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//347/224/237/345/221/275/344/270/216/345/256/211/345/205/250.png +0 -0
- package/src/asset/img/activeBanner//347/224/237/346/200/201/346/226/207/346/230/216.png +0 -0
- package/src/asset/img/activeBanner//347/240/224/345/255/246/345/256/236/350/267/265.png +0 -0
- package/src/asset/img/activeBanner//347/247/221/346/231/256/346/225/231/350/202/262.png +0 -0
- package/src/asset/img/activeBanner//347/273/217/345/205/270/351/230/205/350/257/273.png +0 -0
- package/src/asset/img/activeBanner//347/273/274/345/220/210/346/224/271/351/235/251.png +0 -0
- package/src/asset/img/advertisement.png +0 -0
- package/src/asset/img/bg-block.png +0 -0
- package/src/asset/img/bookhover.png +0 -0
- package/src/asset/img/card.png +0 -0
- package/src/asset/img/catalog/article.png +0 -0
- package/src/asset/img/catalog/audio.png +0 -0
- package/src/asset/img/catalog/course.png +0 -0
- package/src/asset/img/catalog/document.png +0 -0
- package/src/asset/img/catalog/image.png +0 -0
- package/src/asset/img/catalog/link.png +0 -0
- package/src/asset/img/catalog/openClassLive.png +0 -0
- package/src/asset/img/catalog/other.png +0 -0
- package/src/asset/img/catalog/video.png +0 -0
- package/src/asset/img/class-live-header-icon.png +0 -0
- package/src/asset/img/content/article.png +0 -0
- package/src/asset/img/content/document.png +0 -0
- package/src/asset/img/content/image.png +0 -0
- package/src/asset/img/content/url.png +0 -0
- package/src/asset/img/content/video.png +0 -0
- package/src/asset/img/contentType/default.png +0 -0
- package/src/asset/img/contentType/x_article.png +0 -0
- package/src/asset/img/contentType/x_audio_video.png +0 -0
- package/src/asset/img/contentType/x_course.png +0 -0
- package/src/asset/img/contentType/x_document.png +0 -0
- package/src/asset/img/contentType/x_image_list.png +0 -0
- package/src/asset/img/course/book.svg +1 -0
- package/src/asset/img/course/courseBg.png +0 -0
- package/src/asset/img/course/default.png +0 -0
- package/src/asset/img/course/document.png +0 -0
- package/src/asset/img/course/done.png +0 -0
- package/src/asset/img/course/file_doc.svg +1 -0
- package/src/asset/img/course/file_doc_active.svg +1 -0
- package/src/asset/img/course/file_video.svg +1 -0
- package/src/asset/img/course/file_video_active.svg +1 -0
- package/src/asset/img/course/icon_checkbox_linear.svg +1 -0
- package/src/asset/img/course/icondown.png +0 -0
- package/src/asset/img/course/learning.png +0 -0
- package/src/asset/img/course/lecturerDefault.png +0 -0
- package/src/asset/img/course/nolearn.png +0 -0
- package/src/asset/img/course/noplay.png +0 -0
- package/src/asset/img/course/pause.png +0 -0
- package/src/asset/img/course/people.png +0 -0
- package/src/asset/img/course/play.png +0 -0
- package/src/asset/img/course/playing.svg +22 -0
- package/src/asset/img/course/reload.png +0 -0
- package/src/asset/img/course/shouqi_icon.png +0 -0
- package/src/asset/img/course/test.png +0 -0
- package/src/asset/img/course/video.png +0 -0
- package/src/asset/img/def/resource_def.png +0 -0
- package/src/asset/img/def/studio_def.png +0 -0
- package/src/asset/img/def-avatar.jpg +0 -0
- package/src/asset/img/download-active.png +0 -0
- package/src/asset/img/download.png +0 -0
- package/src/asset/img/eduReform/djdy-cover.png +0 -0
- package/src/asset/img/eduReform/djdy.png +0 -0
- package/src/asset/img/eduReform/jxcg-1.png +0 -0
- package/src/asset/img/eduReform/jxcg-2.png +0 -0
- package/src/asset/img/eduReform/jxcg-3.png +0 -0
- package/src/asset/img/eduReform/jxcg-4.png +0 -0
- package/src/asset/img/eduReform/jxcg-cover.png +0 -0
- package/src/asset/img/eduReform/jxgg.png +0 -0
- package/src/asset/img/eduReform/jyxxh-cover.png +0 -0
- package/src/asset/img/eduReform/jyxxh.png +0 -0
- package/src/asset/img/eduReform/ptgz-cover.png +0 -0
- package/src/asset/img/eduReform/ptgz.png +0 -0
- package/src/asset/img/eduReform/sjgz-cover.png +0 -0
- package/src/asset/img/eduReform/sjgz.png +0 -0
- package/src/asset/img/eduReform/tsjy-cover.png +0 -0
- package/src/asset/img/eduReform/tsjy.png +0 -0
- package/src/asset/img/eduReform/xqjy-1.png +0 -0
- package/src/asset/img/eduReform/xqjy-2.png +0 -0
- package/src/asset/img/eduReform/xqjy-3.png +0 -0
- package/src/asset/img/eduReform/xqjy-4.png +0 -0
- package/src/asset/img/eduReform/xqjy-cover.png +0 -0
- package/src/asset/img/eduReform/xqjy.png +0 -0
- package/src/asset/img/eduReform/ywjy-1.png +0 -0
- package/src/asset/img/eduReform/ywjy-2.png +0 -0
- package/src/asset/img/eduReform/ywjy-cover.png +0 -0
- package/src/asset/img/eduReform/ywjy.png +0 -0
- package/src/asset/img/eduReform/zhgg-1.png +0 -0
- package/src/asset/img/eduReform/zhgg-2.png +0 -0
- package/src/asset/img/eduReform/zhgg-cover.png +0 -0
- package/src/asset/img/eduReform/zhgg.png +0 -0
- package/src/asset/img/family/1.jpg +0 -0
- package/src/asset/img/family/ff-1.png +0 -0
- package/src/asset/img/family/ff-2.png +0 -0
- package/src/asset/img/family/ff-3.png +0 -0
- package/src/asset/img/family/ff-cover.png +0 -0
- package/src/asset/img/family/gn-1.png +0 -0
- package/src/asset/img/family/gn-2.png +0 -0
- package/src/asset/img/family/gn-3.png +0 -0
- package/src/asset/img/family/gn-cover.png +0 -0
- package/src/asset/img/family/icon/jyff.png +0 -0
- package/src/asset/img/family/icon/jygn.png +0 -0
- package/src/asset/img/family/icon/jyzd.png +0 -0
- package/src/asset/img/family/zd-1.png +0 -0
- package/src/asset/img/family/zd-2.png +0 -0
- package/src/asset/img/family/zd-3.png +0 -0
- package/src/asset/img/family/zd-cover.png +0 -0
- package/src/asset/img/favicon-m.png +0 -0
- package/src/asset/img/favicon.png +0 -0
- package/src/asset/img/icon-course-white.svg +3 -0
- package/src/asset/img/icon-course.svg +3 -0
- package/src/asset/img/icon-eye-white.svg +4 -0
- package/src/asset/img/icon-eye.svg +4 -0
- package/src/asset/img/icon-school-white.svg +3 -0
- package/src/asset/img/icon-school.svg +3 -0
- package/src/asset/img/img-jgsj/10.png +0 -0
- package/src/asset/img/img-jgsj/3.png +0 -0
- package/src/asset/img/img-jgsj/4.png +0 -0
- package/src/asset/img/img-jgsj/5.png +0 -0
- package/src/asset/img/img-jgsj/6.png +0 -0
- package/src/asset/img/img-jgsj/7-1.png +0 -0
- package/src/asset/img/img-jgsj/7-2.png +0 -0
- package/src/asset/img/img-jgsj/8.png +0 -0
- package/src/asset/img/img-jgsj/8s.png +0 -0
- package/src/asset/img/img-jgsj/9.png +0 -0
- package/src/asset/img/img-search-tag-bottom.png +0 -0
- package/src/asset/img/img-ztjy/1.png +0 -0
- package/src/asset/img/img-ztjy/2.png +0 -0
- package/src/asset/img/img-ztjy/3.png +0 -0
- package/src/asset/img/img-ztjy/4.png +0 -0
- package/src/asset/img/img-ztjy/5.png +0 -0
- package/src/asset/img/img-ztjy/6.png +0 -0
- package/src/asset/img/img-ztjy/icon/agzy.png +0 -0
- package/src/asset/img/img-ztjy/icon/dsxx.png +0 -0
- package/src/asset/img/img-ztjy/icon/kcjx.png +0 -0
- package/src/asset/img/img-ztjy/icon/pdjy.png +0 -0
- package/src/asset/img/img-ztjy/icon/smyaq.png +0 -0
- package/src/asset/img/img-ztjy/icon/stwm.png +0 -0
- package/src/asset/img/img-ztjy/icon/xffz.png +0 -0
- package/src/asset/img/img-ztjy/icon/xljk.png +0 -0
- package/src/asset/img/img-ztjy/icon/yxctwh.png +0 -0
- package/src/asset/img/incentives/star.png +0 -0
- package/src/asset/img/juhe-bg.png +0 -0
- package/src/asset/img/left-hover.png +0 -0
- package/src/asset/img/left-nor.png +0 -0
- package/src/asset/img/living-gif-web.gif +0 -0
- package/src/asset/img/loading.svg +52 -0
- package/src/asset/img/person.png +0 -0
- package/src/asset/img/personalCenter/calendar_icon.png +0 -0
- package/src/asset/img/personalCenter/clock.png +0 -0
- package/src/asset/img/personalCenter/cover.jpg +0 -0
- package/src/asset/img/personalCenter/default_cover.png +0 -0
- package/src/asset/img/personalCenter/header_bg.png +0 -0
- package/src/asset/img/personalCenter/video_icon.png +0 -0
- package/src/asset/img/resource/cover.png +0 -0
- package/src/asset/img/resource/more_close.png +0 -0
- package/src/asset/img/resource/more_open.png +0 -0
- package/src/asset/img/resource/remove.png +0 -0
- package/src/asset/img/resource/tags.png +0 -0
- package/src/asset/img/resource/upload.png +0 -0
- package/src/asset/img/resource//346/211/271/351/207/217/347/274/226/350/276/221@2x.png +0 -0
- package/src/asset/img/right-hover.png +0 -0
- package/src/asset/img/right-icon.png +0 -0
- package/src/asset/img/right-nor.png +0 -0
- package/src/asset/img/schoolService/jdyd-1.png +0 -0
- package/src/asset/img/schoolService/jdyd-2.png +0 -0
- package/src/asset/img/schoolService/jdyd-3.png +0 -0
- package/src/asset/img/schoolService/jdyd-cover.png +0 -0
- package/src/asset/img/schoolService/jdyd.png +0 -0
- package/src/asset/img/schoolService/kpjy-1.png +0 -0
- package/src/asset/img/schoolService/kpjy-2.png +0 -0
- package/src/asset/img/schoolService/kpjy-3.png +0 -0
- package/src/asset/img/schoolService/kpjy-cover.png +0 -0
- package/src/asset/img/schoolService/kpjy.png +0 -0
- package/src/asset/img/schoolService/tydl-1.png +0 -0
- package/src/asset/img/schoolService/tydl-2.png +0 -0
- package/src/asset/img/schoolService/tydl-3.png +0 -0
- package/src/asset/img/schoolService/tydl-cover.png +0 -0
- package/src/asset/img/schoolService/tydl.png +0 -0
- package/src/asset/img/schoolService/whys-1.png +0 -0
- package/src/asset/img/schoolService/whys-2.png +0 -0
- package/src/asset/img/schoolService/whys-3.png +0 -0
- package/src/asset/img/schoolService/whys-4.png +0 -0
- package/src/asset/img/schoolService/whys-cover.png +0 -0
- package/src/asset/img/schoolService/whys.png +0 -0
- package/src/asset/img/schoolService/ysjy-1.png +0 -0
- package/src/asset/img/schoolService/ysjy-2.png +0 -0
- package/src/asset/img/schoolService/ysjy-3.png +0 -0
- package/src/asset/img/schoolService/ysjy-4.png +0 -0
- package/src/asset/img/schoolService/ysjy-cover.png +0 -0
- package/src/asset/img/schoolService/ysjy.png +0 -0
- package/src/asset/img/schoolService/yxjy-cover.png +0 -0
- package/src/asset/img/schoolService/yxsj-1.png +0 -0
- package/src/asset/img/schoolService/yxsj-2.png +0 -0
- package/src/asset/img/schoolService/yxsj-3.png +0 -0
- package/src/asset/img/schoolService/yxsj.png +0 -0
- package/src/asset/img/sedu/catalog/list.png +0 -0
- package/src/asset/img/sedu/icon/agzy-prefix.png +0 -0
- package/src/asset/img/sedu/icon/agzy.png +0 -0
- package/src/asset/img/sedu/icon/arrow-hover.png +0 -0
- package/src/asset/img/sedu/icon/arrow.png +0 -0
- package/src/asset/img/sedu/icon/dsxx-prefix.png +0 -0
- package/src/asset/img/sedu/icon/dsxx.png +0 -0
- package/src/asset/img/sedu/icon/epidemic-prevention-bg.png +0 -0
- package/src/asset/img/sedu/icon/epidemic-prevention.png +0 -0
- package/src/asset/img/sedu/icon/family-bg.png +0 -0
- package/src/asset/img/sedu/icon/family.png +0 -0
- package/src/asset/img/sedu/icon/film-bg.png +0 -0
- package/src/asset/img/sedu/icon/film.png +0 -0
- package/src/asset/img/sedu/icon/go-more-hover.png +0 -0
- package/src/asset/img/sedu/icon/go-more.png +0 -0
- package/src/asset/img/sedu/icon/kcjx.png +0 -0
- package/src/asset/img/sedu/icon/ldjy-prefix.png +0 -0
- package/src/asset/img/sedu/icon/life-safe-bg.png +0 -0
- package/src/asset/img/sedu/icon/life-safe.png +0 -0
- package/src/asset/img/sedu/icon/morality-bg.png +0 -0
- package/src/asset/img/sedu/icon/morality.png +0 -0
- package/src/asset/img/sedu/icon/more-bg.png +0 -0
- package/src/asset/img/sedu/icon/more.png +0 -0
- package/src/asset/img/sedu/icon/party-history-bg.png +0 -0
- package/src/asset/img/sedu/icon/party-history.png +0 -0
- package/src/asset/img/sedu/icon/pdjy-prefix.png +0 -0
- package/src/asset/img/sedu/icon/pdjy.png +0 -0
- package/src/asset/img/sedu/icon/psychological-bg.png +0 -0
- package/src/asset/img/sedu/icon/psychological.png +0 -0
- package/src/asset/img/sedu/icon/read-bg.png +0 -0
- package/src/asset/img/sedu/icon/read.png +0 -0
- package/src/asset/img/sedu/icon/smaq-prefix.png +0 -0
- package/src/asset/img/sedu/icon/smyaq.png +0 -0
- package/src/asset/img/sedu/icon/study-bg.png +0 -0
- package/src/asset/img/sedu/icon/study.png +0 -0
- package/src/asset/img/sedu/icon/stwm-prefix.png +0 -0
- package/src/asset/img/sedu/icon/stwm.png +0 -0
- package/src/asset/img/sedu/icon/xffz-prefix.png +0 -0
- package/src/asset/img/sedu/icon/xffz.png +0 -0
- package/src/asset/img/sedu/icon/xljk-prefix.png +0 -0
- package/src/asset/img/sedu/icon/xljk.png +0 -0
- package/src/asset/img/sedu/icon/yxctwh-prefix.png +0 -0
- package/src/asset/img/sedu/icon/yxctwh.png +0 -0
- package/src/asset/img/sedu/nav_new/agzy-1.png +0 -0
- package/src/asset/img/sedu/nav_new/agzy-2.png +0 -0
- package/src/asset/img/sedu/nav_new/agzy-3.png +0 -0
- package/src/asset/img/sedu/nav_new/agzy-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/agzy.png +0 -0
- package/src/asset/img/sedu/nav_new/dsxx-1.png +0 -0
- package/src/asset/img/sedu/nav_new/dsxx-2.png +0 -0
- package/src/asset/img/sedu/nav_new/dsxx-3.png +0 -0
- package/src/asset/img/sedu/nav_new/dsxx-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/dsxx.png +0 -0
- package/src/asset/img/sedu/nav_new/jdwy-1.png +0 -0
- package/src/asset/img/sedu/nav_new/jdwy-2.png +0 -0
- package/src/asset/img/sedu/nav_new/jdwy-3.png +0 -0
- package/src/asset/img/sedu/nav_new/ldjy-1.png +0 -0
- package/src/asset/img/sedu/nav_new/ldjy-2.png +0 -0
- package/src/asset/img/sedu/nav_new/ldjy-3.png +0 -0
- package/src/asset/img/sedu/nav_new/ldjy-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/ldjy.png +0 -0
- package/src/asset/img/sedu/nav_new/pdjy-1.png +0 -0
- package/src/asset/img/sedu/nav_new/pdjy-2.png +0 -0
- package/src/asset/img/sedu/nav_new/pdjy-3.png +0 -0
- package/src/asset/img/sedu/nav_new/pdjy-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/pdjy.png +0 -0
- package/src/asset/img/sedu/nav_new/smyaq-1.png +0 -0
- package/src/asset/img/sedu/nav_new/smyaq-2.png +0 -0
- package/src/asset/img/sedu/nav_new/smyaq-3.png +0 -0
- package/src/asset/img/sedu/nav_new/smyaq-4.png +0 -0
- package/src/asset/img/sedu/nav_new/smyaq-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/smyaq.png +0 -0
- package/src/asset/img/sedu/nav_new/stwm-1.png +0 -0
- package/src/asset/img/sedu/nav_new/stwm-2.png +0 -0
- package/src/asset/img/sedu/nav_new/stwm-3.png +0 -0
- package/src/asset/img/sedu/nav_new/stwm-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/stwm.png +0 -0
- package/src/asset/img/sedu/nav_new/xffz-1.png +0 -0
- package/src/asset/img/sedu/nav_new/xffz-2.png +0 -0
- package/src/asset/img/sedu/nav_new/xffz-3.png +0 -0
- package/src/asset/img/sedu/nav_new/xffz-4.png +0 -0
- package/src/asset/img/sedu/nav_new/xffz-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/xffz.png +0 -0
- package/src/asset/img/sedu/nav_new/xljk-1.png +0 -0
- package/src/asset/img/sedu/nav_new/xljk-2.png +0 -0
- package/src/asset/img/sedu/nav_new/xljk-3.png +0 -0
- package/src/asset/img/sedu/nav_new/xljk-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/xljk.png +0 -0
- package/src/asset/img/sedu/nav_new/yxctwh-1.png +0 -0
- package/src/asset/img/sedu/nav_new/yxctwh-2.png +0 -0
- package/src/asset/img/sedu/nav_new/yxctwh-3.png +0 -0
- package/src/asset/img/sedu/nav_new/zgwhct-cover.png +0 -0
- package/src/asset/img/sedu/nav_new/zgwhct.png +0 -0
- package/src/asset/img/star.png +0 -0
- package/src/asset/img/star_filled.png +0 -0
- package/src/asset/img/star_hover.png +0 -0
- package/src/asset/img/up-hover.png +0 -0
- package/src/asset/img/up-nor.png +0 -0
- package/src/asset/img/video-play.svg +6 -0
- package/src/asset/style/background.less +20 -0
- package/src/asset/style/banner.less +36 -0
- package/src/asset/style/base.less +74 -0
- package/src/asset/style/index.less +114 -0
- package/src/asset/style/reset-theme.less +142 -0
- package/src/asset/style/theme/index.less +55 -0
- package/src/asset/style/theme/party/global.less +20 -0
- package/src/asset/style/theme/party/img/footer-bg.png +0 -0
- package/src/asset/style/theme/party/img/header-bg-1.png +0 -0
- package/src/asset/style/theme/party/img/header-bg-2.png +0 -0
- package/src/asset/style/theme/party/img/header-bg.png +0 -0
- package/src/asset/style/theme/party/img/logo.png +0 -0
- package/src/asset/style/theme/party/override.less +57 -0
- package/src/asset/style/theme/test/global.less +18 -0
- package/src/asset/style/theme/test/img/footer-bg.png +0 -0
- package/src/asset/style/theme/test/img/header-bg-1.png +0 -0
- package/src/asset/style/theme/test/img/header-bg-2.png +0 -0
- package/src/asset/style/theme/test/img/header-bg.png +0 -0
- package/src/asset/style/theme/test/img/logo.png +0 -0
- package/src/asset/style/theme/test/override.less +45 -0
- package/src/asset/style/variable.less +12 -0
- package/src/component/AliPlayer/index.jsx +46 -0
- package/src/component/Avatar/index.jsx +50 -0
- package/src/component/Empty/img/empty.png +0 -0
- package/src/component/Empty/index.jsx +34 -0
- package/src/component/Empty/index.module.less +37 -0
- package/src/component/IMChatroom/asset/style/images/welcome-m.png +0 -0
- package/src/component/IMChatroom/asset/style/images/welcome.png +0 -0
- package/src/component/IMChatroom/asset/style/index.module.less +0 -0
- package/src/component/IMChatroom/component/status/403.jsx +13 -0
- package/src/component/IMChatroom/component/status/404.jsx +13 -0
- package/src/component/IMChatroom/component/status/Error.jsx +23 -0
- package/src/component/IMChatroom/component/status/Loading.jsx +5 -0
- package/src/component/IMChatroom/config/app/config.js +118 -0
- package/src/component/IMChatroom/config/app/index.js +60 -0
- package/src/component/IMChatroom/config/env.js +5 -0
- package/src/component/IMChatroom/config/index.js +3 -0
- package/src/component/IMChatroom/config/request/config/base.js +124 -0
- package/src/component/IMChatroom/config/request/config/chatroom.js +26 -0
- package/src/component/IMChatroom/config/request/config/imCoreApi.js +21 -0
- package/src/component/IMChatroom/config/request/index.js +21 -0
- package/src/component/IMChatroom/config/request/proxy.js +39 -0
- package/src/component/IMChatroom/config/url.js +7 -0
- package/src/component/IMChatroom/constants/errorCode.js +9 -0
- package/src/component/IMChatroom/constants/index.js +84 -0
- package/src/component/IMChatroom/constants/origin.js +27 -0
- package/src/component/IMChatroom/context/chatroom.js +154 -0
- package/src/component/IMChatroom/context/connect.js +28 -0
- package/src/component/IMChatroom/i18n/en/index.json +73 -0
- package/src/component/IMChatroom/i18n/index.jsx +14 -0
- package/src/component/IMChatroom/i18n/language.js +9 -0
- package/src/component/IMChatroom/i18n/zh-CN/index.json +73 -0
- package/src/component/IMChatroom/index.jsx +49 -0
- package/src/component/IMChatroom/page/chat/index.jsx +27 -0
- package/src/component/IMChatroom/page/chat/messageEditor/index.jsx +375 -0
- package/src/component/IMChatroom/page/chat/messageList/index.jsx +354 -0
- package/src/component/IMChatroom/page/chat/stickedMessage/index.jsx +59 -0
- package/src/component/IMChatroom/page/chat/stickedMessage/style/index.module.less +8 -0
- package/src/component/IMChatroom/page/chat/style/index.module.less +52 -0
- package/src/component/IMChatroom/page/home/connect/index.jsx +188 -0
- package/src/component/IMChatroom/page/home/connect/status.jsx +124 -0
- package/src/component/IMChatroom/page/home/context/cmd.jsx +37 -0
- package/src/component/IMChatroom/page/home/context/index.jsx +67 -0
- package/src/component/IMChatroom/page/home/index.jsx +164 -0
- package/src/component/IMChatroom/page/home/notice/index.jsx +123 -0
- package/src/component/IMChatroom/page/home/notice/style/index.module.less +50 -0
- package/src/component/IMChatroom/page/home/style/images/font-size-active-m.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/font-size-active.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/font-size-m.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/font-size.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/notice-active-m.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/notice-active.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/notice-m.png +0 -0
- package/src/component/IMChatroom/page/home/style/images/notice.png +0 -0
- package/src/component/IMChatroom/page/home/style/index.module.less +111 -0
- package/src/component/IMChatroom/page/member/index.jsx +15 -0
- package/src/component/IMChatroom/page/member/memberCount/index.jsx +44 -0
- package/src/component/IMChatroom/page/member/memberList/index.jsx +121 -0
- package/src/component/IMChatroom/page/member/style/index.module.less +3 -0
- package/src/component/IMChatroom/sdk/bridge.js +39 -0
- package/src/component/IMChatroom/sdk/cs/constants.js +20 -0
- package/src/component/IMChatroom/sdk/cs/index.js +101 -0
- package/src/component/IMChatroom/sdk/imChatroom.js +15 -0
- package/src/component/IMChatroom/sdk/imcore/constants.js +128 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomDestroyed.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomInfoGetFail.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomKickedByAdmin.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomKickedBySelf.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomLoginFail.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomLoginSuccess.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomMemberLogin.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/chatroomMemberLogout.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/connectionConnected.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/connectionConnecting.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/connectionDisconnect.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/index.js +57 -0
- package/src/component/IMChatroom/sdk/imcore/emitters/messageReceive.js +36 -0
- package/src/component/IMChatroom/sdk/imcore/index.js +178 -0
- package/src/component/IMChatroom/sdk/imcore/interceptors/request.js +7 -0
- package/src/component/IMChatroom/sdk/imcore/interceptors/response.js +5 -0
- package/src/component/IMChatroom/sdk/imcore/plugins/getAuth.js +64 -0
- package/src/component/IMChatroom/sdk/imcore/plugins/getConversationId.js +20 -0
- package/src/component/IMChatroom/sdk/imcore/plugins/getExtInfo.js +10 -0
- package/src/component/IMChatroom/sdk/imcore/plugins/getLoginInfo.js +48 -0
- package/src/component/IMChatroom/sdk/imcore/plugins/getPlatformType.js +12 -0
- package/src/component/IMChatroom/sdk/imcore/plugins/index.js +22 -0
- package/src/component/IMChatroom/sdk/imcore/util/format.js +177 -0
- package/src/component/IMChatroom/sdk/imcore/util/parser.js +35 -0
- package/src/component/IMChatroom/sdk/oms.js +18 -0
- package/src/component/IMChatroom/sdk/uc.js +3 -0
- package/src/component/IMChatroom/subscription/channel/app.js +5 -0
- package/src/component/IMChatroom/subscription/channel/ctl.js +22 -0
- package/src/component/IMChatroom/subscription/channel/member.js +40 -0
- package/src/component/IMChatroom/subscription/channel/message.js +13 -0
- package/src/component/IMChatroom/subscription/channel/ntf.js +86 -0
- package/src/component/IMChatroom/subscription/channel/tel.js +5 -0
- package/src/component/IMChatroom/subscription/channel/websocket.js +5 -0
- package/src/component/IMChatroom/subscription/event.js +37 -0
- package/src/component/IMChatroom/subscription/index.js +19 -0
- package/src/component/IMChatroom/util/account.js +8 -0
- package/src/component/IMChatroom/util/chatroom.js +255 -0
- package/src/component/IMChatroom/util/jsonBigInt.js +5 -0
- package/src/component/IMChatroom/util/location.js +12 -0
- package/src/component/Icon/index.jsx +16 -0
- package/src/component/Icon/index.module.less +3 -0
- package/src/component/Pagination/LocalPagination.jsx +27 -0
- package/src/component/Pagination/RemotePagination.jsx +32 -0
- package/src/component/Pagination/index.jsx +31 -0
- package/src/component/Pagination/index.module.less +110 -0
- package/src/component/PlayerTip/index.jsx +34 -0
- package/src/component/VideoBase/index.jsx +242 -0
- package/src/component/VideoBase/style.less +66 -0
- package/src/component/VideoBase/utils.js +81 -0
- package/src/component/mixin.less +10 -0
- package/src/component/status/403.jsx +15 -0
- package/src/component/status/404/img/404.png +0 -0
- package/src/component/status/404/index.jsx +73 -0
- package/src/component/status/404/index.module.less +36 -0
- package/src/component/status/Error/error.module.less +14 -0
- package/src/component/status/Error/img/error.png +0 -0
- package/src/component/status/Error/index.jsx +47 -0
- package/src/component/status/Loading/img/loading.svg +52 -0
- package/src/component/status/Loading/index.jsx +31 -0
- package/src/component/status/Loading/index.less +57 -0
- package/src/component/status/None/img/404.png +0 -0
- package/src/component/status/None/index.jsx +20 -0
- package/src/component/status/None/index.module.less +35 -0
- package/src/component/status/Status/index.jsx +26 -0
- package/src/component/status/Status/index.module.less +9 -0
- package/src/config/constant/commonUrl.js +2 -0
- package/src/config/constant/user.js +6 -0
- package/src/config/context/site-config.js +48 -0
- package/src/config/env/index.js +5 -0
- package/src/config/env/local/index.js +13 -0
- package/src/config/env/ncet-xedu/api.js +175 -0
- package/src/config/env/ncet-xedu/app.js +12 -0
- package/src/config/env/ncet-xedu/cs.js +8 -0
- package/src/config/env/ncet-xedu/index.js +14 -0
- package/src/config/env/ncet-xedu/push.js +5 -0
- package/src/config/env/preproduction/api.js +144 -0
- package/src/config/env/preproduction/app.js +12 -0
- package/src/config/env/preproduction/cs.js +8 -0
- package/src/config/env/preproduction/index.js +14 -0
- package/src/config/env/preproduction/push.js +5 -0
- package/src/config/env/product/api.js +113 -0
- package/src/config/env/product/app.js +12 -0
- package/src/config/env/product/cs.js +5 -0
- package/src/config/env/product/index.js +14 -0
- package/src/config/env/product/push.js +5 -0
- package/src/config/live.js +80 -0
- package/src/config/publicLive.js +53 -0
- package/src/config/request/assessments.js +24 -0
- package/src/config/request/config-center.js +8 -0
- package/src/config/request/helper.js +166 -0
- package/src/config/request/im-broadcasts.js +12 -0
- package/src/config/request/live-activity-gateway.js +8 -0
- package/src/config/request/live-activity.js +13 -0
- package/src/config/request/raw.js +6 -0
- package/src/config/request/x-cloud-web.js +13 -0
- package/src/config/request/x-proxy.js +34 -0
- package/src/demo/Detail.jsx +11 -0
- package/src/demo/List.jsx +48 -0
- package/src/demo/index.jsx +17 -0
- package/src/detail/LineSwitch/index.jsx +71 -0
- package/src/detail/LineSwitch/index.module.less +0 -0
- package/src/detail/LiveCountDown/index.jsx +44 -0
- package/src/detail/LiveCountDown/index.module.less +32 -0
- package/src/detail/LiveOnlineCount/img/icon.svg +16 -0
- package/src/detail/LiveOnlineCount/index.jsx +68 -0
- package/src/detail/LiveOnlineCount/index.module.less +33 -0
- package/src/detail/LiveOnlineCount/util.js +74 -0
- package/src/detail/LiveStatus/AnchorOnTheWay.jsx +78 -0
- package/src/detail/LiveStatus/index.jsx +186 -0
- package/src/detail/LiveStatus/index.module.less +193 -0
- package/src/detail/LiveVideo/asset/play-button-hover-m.png +0 -0
- package/src/detail/LiveVideo/asset/play-button-hover.png +0 -0
- package/src/detail/LiveVideo/asset/play-button-m.png +0 -0
- package/src/detail/LiveVideo/asset/play-button.png +0 -0
- package/src/detail/LiveVideo/config.js +37 -0
- package/src/detail/LiveVideo/index.jsx +186 -0
- package/src/detail/LiveVideo/index.module.less +41 -0
- package/src/detail/NotLoginChatroom/asset/empty-m.png +0 -0
- package/src/detail/NotLoginChatroom/asset/empty.png +0 -0
- package/src/detail/NotLoginChatroom/index.jsx +37 -0
- package/src/detail/NotLoginChatroom/index.module.less +46 -0
- package/src/detail/RecordVideo/index.jsx +148 -0
- package/src/detail/RecordVideo/index.module.less +32 -0
- package/src/detail/ReplayVideo/index.jsx +93 -0
- package/src/detail/ReplayVideo/index.module.less +65 -0
- package/src/detail/const.js +20 -0
- package/src/detail/hook/usePullSource.js +50 -0
- package/src/detail/hook/usePullState.js +51 -0
- package/src/detail/img/icon_coffee.png +0 -0
- package/src/detail/img/icon_completed.png +0 -0
- package/src/detail/index.jsx +501 -0
- package/src/detail/index.module.less +189 -0
- package/src/hook/useAsync.js +84 -0
- package/src/hook/useGoToPage.js +83 -0
- package/src/hook/useInterval.js +28 -0
- package/src/hook/useIsMounted.js +17 -0
- package/src/hook/useModuleByRole.js +53 -0
- package/src/hook/usePageScrollable.js +52 -0
- package/src/hook/usePortal.js +83 -0
- package/src/hook/useScrollRestore/index.js +32 -0
- package/src/hook/useScrollRestore/scrollContext.js +20 -0
- package/src/hook/useTrackRef.js +11 -0
- package/src/hook/useWindowSize.js +28 -0
- package/src/hook/useZoom.js +47 -0
- package/src/index.js +10 -0
- package/src/lib/getLiveOnlineCount.js +10 -0
- package/src/lib/getServiceConfig.js +102 -0
- package/src/list/Empty/img/empty.png +0 -0
- package/src/list/Empty/index.jsx +20 -0
- package/src/list/Empty/index.module.less +23 -0
- package/src/list/ListItem/Action/index.jsx +77 -0
- package/src/list/ListItem/Action/index.module.less +17 -0
- package/src/list/ListItem/img/live.png +0 -0
- package/src/list/ListItem/img/play.svg +16 -0
- package/src/list/ListItem/index.jsx +94 -0
- package/src/list/ListItem/index.module.less +123 -0
- package/src/list/index.jsx +148 -0
- package/src/list/index.module.less +36 -0
- package/src/service/common.js +73 -0
- package/src/service/content-mgr.js +73 -0
- package/src/service/im-group.js +12 -0
- package/src/service/im.js +7 -0
- package/src/service/imBroadcasts.js +33 -0
- package/src/service/like.js +134 -0
- package/src/service/live.js +293 -0
- package/src/service/manageApi.js +7 -0
- package/src/service/managePortal.js +6 -0
- package/src/service/myStudyRecord.js +93 -0
- package/src/service/navigation.js +47 -0
- package/src/service/ndMeeting.js +10 -0
- package/src/service/ndr.js +122 -0
- package/src/service/news.js +93 -0
- package/src/service/personalCenter.js +270 -0
- package/src/service/qualityCourse.js +31 -0
- package/src/service/recommend.js +81 -0
- package/src/service/school.js +323 -0
- package/src/service/search.js +170 -0
- package/src/service/site-config.js +7 -0
- package/src/service/socialCensor.js +45 -0
- package/src/service/specialEdu.js +31 -0
- package/src/service/suggestion.js +85 -0
- package/src/service/syncClassroom.js +321 -0
- package/src/service/tCourse.js +204 -0
- package/src/service/tchTraining.js +37 -0
- package/src/service/uc.js +45 -0
- package/src/util/app.js +1 -0
- package/src/util/array.js +3 -0
- package/src/util/auth/func.js +57 -0
- package/src/util/date.js +53 -0
- package/src/util/env.js +9 -0
- package/src/util/getTimestamp.js +10 -0
- package/src/util/hof.js +105 -0
- package/src/util/live/index.js +42 -0
- package/src/util/netUrl.js +35 -0
- package/src/util/object.js +13 -0
- package/src/util/push/index.js +58 -0
- package/src/util/request.js +227 -0
- package/src/util/type.js +17 -0
- package/src/util/url.js +203 -0
- package/src/util/video.js +26 -0
- package/test/setup.js +21 -0
- package/test/unit/component/header/logo.spec.jsx +8 -0
- package/test/unit/helper.jsx +25 -0
- package/test/unit/util/date.spec.js +40 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import imBroadcastsAPI, {
|
|
2
|
+
staticAPI as imBroadcastsStaticAPI
|
|
3
|
+
} from '@/config/request/im-broadcasts'
|
|
4
|
+
|
|
5
|
+
// https://wiki.doc.101.com/index.php?title=IM%E7%9B%B4%E6%92%ADv2#.5BGET.5D_.2Fapis.2Fbroadcasts.2F.7BroomId.7D_.E6.A0.B9.E6.8D.AEroomId_.E8.8E.B7.E5.8F.96.E7.9B.B4.E6.92.AD.E4.BF.A1.E6.81.AF
|
|
6
|
+
export const getIMLiveInfo = async (roomId) => {
|
|
7
|
+
const url = `/v4/apis/broadcasts/${roomId}`
|
|
8
|
+
const response = await imBroadcastsAPI.get(url)
|
|
9
|
+
return response.data
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 预生产
|
|
14
|
+
https://betacs.101.com/v0.1/static/preproduction_content_chatroom/livecache/{bid}.json
|
|
15
|
+
百度
|
|
16
|
+
https://bdcs-file-1.ykt.cbern.com.cn/xxuexiimbr/livecache/{bid}.json
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
export const getGuestIMLiveInfoStatic = async (bId) => {
|
|
20
|
+
const { data } = await imBroadcastsStaticAPI.get(`/livecache/${bId}.json`)
|
|
21
|
+
return data
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// https://wiki.doc.101.com/index.php?title=IM%E7%9B%B4%E6%92%ADv2#.5BGET.5D_.2Fguest.2Fbroadcasts.2F.7Bbid.7D_.E8.8E.B7.E5.8F.96.E7.9B.B4.E6.92.AD
|
|
25
|
+
// 访客获取直播接口
|
|
26
|
+
export const getGuestIMLiveInfo = async (bId) => {
|
|
27
|
+
try {
|
|
28
|
+
return await getGuestIMLiveInfoStatic(bId)
|
|
29
|
+
} catch (e) {
|
|
30
|
+
const { data } = await imBroadcastsAPI.get(`/v2/guest/broadcasts/${bId}`)
|
|
31
|
+
return data
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import xCloudWeb from '@/config/request/x-cloud-web'
|
|
2
|
+
import { assessmentApi } from '@/config/request/assessments'
|
|
3
|
+
import xProxy from '@/config/request/x-proxy'
|
|
4
|
+
import config from '@/config/env'
|
|
5
|
+
|
|
6
|
+
const { appid } = config.app
|
|
7
|
+
|
|
8
|
+
// 获取资源点赞
|
|
9
|
+
export async function getResourceLikes(resId, type) {
|
|
10
|
+
const { data } = await xProxy.get(`/v1/res_stats/${resId}`, {
|
|
11
|
+
params: {
|
|
12
|
+
type
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
return data
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 获取资源点赞
|
|
19
|
+
export async function getResourceLikesForLive(resId, type) {
|
|
20
|
+
const { data } = await xProxy.get(`/v1/res_stats/open_lives/${resId}`, {
|
|
21
|
+
params: {
|
|
22
|
+
type
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
return data
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 资源点赞
|
|
29
|
+
export async function postResourceLikes(resId, type = 'like') {
|
|
30
|
+
await xCloudWeb.post(`/v1/res_stats/${resId}?type=${type}`, {
|
|
31
|
+
headers: {
|
|
32
|
+
'sdp-app-id': appid
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function getStatByChunk(resIds, requestFn) {
|
|
38
|
+
const chunkSize = 100
|
|
39
|
+
if (resIds.length <= chunkSize) {
|
|
40
|
+
const { data } = await requestFn(resIds)
|
|
41
|
+
return data
|
|
42
|
+
} else {
|
|
43
|
+
const chunkCount = Math.ceil(resIds.length / chunkSize)
|
|
44
|
+
const result = []
|
|
45
|
+
const t = new Array(chunkCount).fill(0)
|
|
46
|
+
await Promise.all(t.map(async (v, i) => {
|
|
47
|
+
const chunk = resIds.slice(chunkSize * i, chunkSize * i + chunkSize)
|
|
48
|
+
const { data } = await requestFn(chunk)
|
|
49
|
+
result[i] = data
|
|
50
|
+
}))
|
|
51
|
+
return [].concat(...result)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 批量获取资源点赞、访问统计
|
|
56
|
+
export async function getResourceStat(resIds) {
|
|
57
|
+
return getStatByChunk(resIds, async (chunk) => xProxy.get(`/v1/res_stats/actions/query?res_ids=${chunk.join(',')}`))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 批量获取评价统计
|
|
61
|
+
export async function getAssessmentStat(resIds, assessmentTypes) {
|
|
62
|
+
return getStatByChunk(resIds, async (chunk) => assessmentApi
|
|
63
|
+
.post('/assessments/actions/stats', chunk.map((t, i) => ({
|
|
64
|
+
assessment_id: t,
|
|
65
|
+
assessment_type: assessmentTypes[i]
|
|
66
|
+
}))))
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 每 maxCount 个分为一组,默认每 100 个分为一组
|
|
71
|
+
* @param {array} data 带分组数据
|
|
72
|
+
* @param {number} [maxNum=100] 每组最大数量
|
|
73
|
+
* @return {array} [[data1], [data2], ...]
|
|
74
|
+
*/
|
|
75
|
+
function groupData(data, maxNum = 100) {
|
|
76
|
+
const result = []
|
|
77
|
+
for (let i = 0; i < data.length;) {
|
|
78
|
+
result.push(data.slice(i, i += maxNum))
|
|
79
|
+
}
|
|
80
|
+
return result
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 一次性获取资源点赞、访问统计
|
|
84
|
+
export function getAllResourceStat(data = []) {
|
|
85
|
+
const groupIds = groupData(data)
|
|
86
|
+
const maxNum = groupIds.length
|
|
87
|
+
// 请求总数量
|
|
88
|
+
const len = groupIds.length
|
|
89
|
+
// 根据请求数量创建一个数组来保存请求的结果
|
|
90
|
+
const result = new Array(len).fill(false)
|
|
91
|
+
// 当前完成的数量
|
|
92
|
+
let count = -1
|
|
93
|
+
|
|
94
|
+
return new Promise((resolve) => {
|
|
95
|
+
// 请求 maxNum 个
|
|
96
|
+
while (count < maxNum) {
|
|
97
|
+
next()
|
|
98
|
+
}
|
|
99
|
+
function next() {
|
|
100
|
+
const current = count + 1
|
|
101
|
+
count = current
|
|
102
|
+
// 处理边界条件
|
|
103
|
+
if (current >= len) {
|
|
104
|
+
// 请求全部完成就将promise置为成功状态, 然后将result作为promise值返回
|
|
105
|
+
if (!result.includes(false)) {
|
|
106
|
+
let r = []
|
|
107
|
+
result.forEach((arr) => {
|
|
108
|
+
r = r.concat(arr)
|
|
109
|
+
})
|
|
110
|
+
resolve(r)
|
|
111
|
+
}
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
const ids = groupIds[current]
|
|
115
|
+
getResourceStat(ids)
|
|
116
|
+
.then((res) => {
|
|
117
|
+
// 保存请求结果
|
|
118
|
+
result[current] = res
|
|
119
|
+
// 请求没有全部完成, 就递归
|
|
120
|
+
if (current < len) {
|
|
121
|
+
next()
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
.catch((err) => {
|
|
125
|
+
console.error(err)
|
|
126
|
+
result[current] = []
|
|
127
|
+
// 请求没有全部完成, 就递归
|
|
128
|
+
if (current < len) {
|
|
129
|
+
next()
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import dayjs from 'dayjs'
|
|
3
|
+
import config from '@/config/env'
|
|
4
|
+
import liveActivityAPI, { proxyApi } from '@/config/request/live-activity'
|
|
5
|
+
import liveActivityGatewayAPI from '@/config/request/live-activity-gateway'
|
|
6
|
+
import { PUBLIC_LIVE_STATUS, LIVING_CLOSE_LOGIN, PUBLIC_LIVE_MODE, VIEW_REPLAY, PROVIDE_RECORD, SUB_TYPE } from '@/config/publicLive'
|
|
7
|
+
import getServiceConfig from '@/lib/getServiceConfig'
|
|
8
|
+
import { getAvatarURL } from '@/util/auth/func'
|
|
9
|
+
import { getLocalHlsLiveStatus } from '@/util/live'
|
|
10
|
+
import { withOnce } from '@/util/hof'
|
|
11
|
+
import { liveProxy } from '@/config/request/x-proxy'
|
|
12
|
+
|
|
13
|
+
export async function getLiveActivities(params) {
|
|
14
|
+
const { liveDateString, isTeacher, ...requestParams } = params
|
|
15
|
+
if (requestParams.status < 0) {
|
|
16
|
+
delete requestParams.status
|
|
17
|
+
}
|
|
18
|
+
if (liveDateString) {
|
|
19
|
+
requestParams.begin_time = `${liveDateString} 00:00:00`
|
|
20
|
+
requestParams.end_time = `${liveDateString} 23:59:59`
|
|
21
|
+
}
|
|
22
|
+
if (!isTeacher) {
|
|
23
|
+
delete requestParams.filter_creator
|
|
24
|
+
}
|
|
25
|
+
const requestFn = isTeacher ? getTeacherLiveActivities : getStudentLiveActivities
|
|
26
|
+
return requestFn(requestParams)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 获取老师的直播列表
|
|
30
|
+
export async function getTeacherLiveActivities(params) {
|
|
31
|
+
const url = '/live_activities/actions/teacher_search'
|
|
32
|
+
const { data } = await liveActivityGatewayAPI.get(url, {
|
|
33
|
+
params
|
|
34
|
+
})
|
|
35
|
+
return data
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 获取学生的直播列表
|
|
39
|
+
export async function getStudentLiveActivities(params) {
|
|
40
|
+
const url = '/live_activities/actions/user_search'
|
|
41
|
+
const { data } = await liveActivityGatewayAPI.get(url, {
|
|
42
|
+
params
|
|
43
|
+
})
|
|
44
|
+
return data
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 获取直播详情
|
|
48
|
+
export async function getLiveActivity(id) {
|
|
49
|
+
const url = `/live_activities/${id}/actions/full_info`
|
|
50
|
+
const { data } = await liveActivityGatewayAPI.get(url)
|
|
51
|
+
return data
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 获取直播回放详情
|
|
55
|
+
export async function getLiveActivityReplay(id, params) {
|
|
56
|
+
const url = `/live_activity_replays/${id}/actions/full_info`
|
|
57
|
+
const { data } = await liveActivityGatewayAPI.get(url, {
|
|
58
|
+
params
|
|
59
|
+
})
|
|
60
|
+
return data
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 直播举报
|
|
64
|
+
export async function postLiveActivityAudit(data) {
|
|
65
|
+
const url = '/v1/live_activity_audit_report'
|
|
66
|
+
await liveActivityAPI.post(url, data)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 获取 csToken
|
|
70
|
+
export async function getCsToken(data) {
|
|
71
|
+
// todo: 服务端为什么此接口没有版本号
|
|
72
|
+
const url = '/uranus/cs/tokens'
|
|
73
|
+
const response = await liveActivityAPI.post(url, data)
|
|
74
|
+
return response.data
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export async function postLiveActivity(data) {
|
|
78
|
+
const url = '/v1/live_activities'
|
|
79
|
+
const response = await liveActivityAPI.post(url, data)
|
|
80
|
+
return response.data
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 获取用户是否被禁止直播
|
|
84
|
+
export async function getUserLiveStatus(id) {
|
|
85
|
+
const url = '/v1/live_activity_banned/actions/by_user_id'
|
|
86
|
+
const response = await liveActivityAPI.get(url, {
|
|
87
|
+
params: {
|
|
88
|
+
banned_user_id: id
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
return response.data
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 服务器时间
|
|
95
|
+
export async function getServerTime() {
|
|
96
|
+
// https://pms.101.com/index.php?m=bug&f=view&bugID=692948 返回浏览器会走disk cache 加时间戳
|
|
97
|
+
const url = `/v1/server_time?v=${Date.now()}`
|
|
98
|
+
const response = await liveActivityAPI.get(url).catch(() => ({
|
|
99
|
+
data: {
|
|
100
|
+
server_time: Date.now()
|
|
101
|
+
}
|
|
102
|
+
}))
|
|
103
|
+
return response.data
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function _getLiveAPICache() {
|
|
107
|
+
const url = config.api['live-static-json']
|
|
108
|
+
try {
|
|
109
|
+
const result = await axios.get(url)
|
|
110
|
+
const serverTime = dayjs(result.headers.date).valueOf()
|
|
111
|
+
return {
|
|
112
|
+
data: result.data,
|
|
113
|
+
serverTime,
|
|
114
|
+
diffTime: Date.now() - serverTime
|
|
115
|
+
}
|
|
116
|
+
} catch (e) {
|
|
117
|
+
console.error('getLiveAPICache fail', e)
|
|
118
|
+
return null
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const getLiveAPICache = withOnce(_getLiveAPICache)
|
|
123
|
+
|
|
124
|
+
export async function getOpenClassWithCache(url) {
|
|
125
|
+
const fullUrl = `${window.location.protocol}${proxyApi.defaults.baseURL}${url}`
|
|
126
|
+
const cacheInfo = await getLiveAPICache()
|
|
127
|
+
if (cacheInfo) {
|
|
128
|
+
const cacheData = cacheInfo.data.find((item) => item.source_key === fullUrl)
|
|
129
|
+
if (cacheData) {
|
|
130
|
+
try {
|
|
131
|
+
return {
|
|
132
|
+
...JSON.parse(cacheData.json_value),
|
|
133
|
+
serverTime: cacheInfo.serverTime,
|
|
134
|
+
diffTime: cacheInfo.diffTime
|
|
135
|
+
}
|
|
136
|
+
} catch (e) {
|
|
137
|
+
console.error('getOpenClassWithCache parse error', e)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const result = await proxyApi.get(url)
|
|
142
|
+
if (result.headers.date) {
|
|
143
|
+
const serverTime = dayjs(result.headers.date).valueOf()
|
|
144
|
+
return {
|
|
145
|
+
...result.data,
|
|
146
|
+
serverTime,
|
|
147
|
+
diffTime: Date.now() - serverTime
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return result.data
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 公开直播详情变化部分,失败要降级处理
|
|
154
|
+
export async function getOpenClassLiveSimple(liveInfo) {
|
|
155
|
+
const url = `/v1/open_class_lives/${liveInfo.live_id}/simple`
|
|
156
|
+
const data = await getOpenClassWithCache(url)
|
|
157
|
+
.catch(() => {
|
|
158
|
+
const isRecordLive = liveInfo.type === PUBLIC_LIVE_MODE.RECORDED
|
|
159
|
+
// 录播组件会计算状态,设置为0即可
|
|
160
|
+
const status = isRecordLive ? 0 : getLocalHlsLiveStatus(Date.now(), liveInfo.begin_time, liveInfo.end_time)
|
|
161
|
+
return {
|
|
162
|
+
live_id: liveInfo.live_id,
|
|
163
|
+
view_replay: VIEW_REPLAY.NOT_ALLOW,
|
|
164
|
+
replay_url: '',
|
|
165
|
+
provide_record: PROVIDE_RECORD.NOT_PROVIDED,
|
|
166
|
+
status
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
return data
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 公开直播详情拆分成两个接口
|
|
173
|
+
export async function getOpenClassLiveBase(id) {
|
|
174
|
+
const url = `/v3/open_class_lives/${id}`
|
|
175
|
+
const data = await getOpenClassWithCache(url)
|
|
176
|
+
const { sub_type: subType } = data
|
|
177
|
+
|
|
178
|
+
// 外部推流则直接返回, 不去请求兼容接口
|
|
179
|
+
if (subType === SUB_TYPE.OUTSIDE) {
|
|
180
|
+
return data
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const dynamicInfo = await getOpenClassLiveSimple(data)
|
|
184
|
+
return {
|
|
185
|
+
...data,
|
|
186
|
+
...dynamicInfo
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// 公开实时直播-发起直播-公共直播邀请页使用,适配为班级直播数据
|
|
191
|
+
export async function getOpenClassLiveAdapter(id) {
|
|
192
|
+
const data = await getOpenClassLiveBase(id)
|
|
193
|
+
return {
|
|
194
|
+
...data,
|
|
195
|
+
live_activity_id: data.live_id,
|
|
196
|
+
name: data.live_name,
|
|
197
|
+
stat: data.status === PUBLIC_LIVE_STATUS.PASUED ? PUBLIC_LIVE_STATUS.LIVEING : data.status, // 暂停按直播显示
|
|
198
|
+
is_deleted: data.status === PUBLIC_LIVE_STATUS.OFFLINE,
|
|
199
|
+
create_user_user_facade: {
|
|
200
|
+
icon: getAvatarURL(data.lecture_user_id),
|
|
201
|
+
display_real_name: data.lecture_user_name
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export async function getOpenClassLive(id) {
|
|
207
|
+
const serviceConfig = await getServiceConfig('x-cloud')
|
|
208
|
+
const liveCloseLogin = serviceConfig.properties.live_close_login || LIVING_CLOSE_LOGIN.NORMAL
|
|
209
|
+
const data = await getOpenClassLiveBase(id)
|
|
210
|
+
if (liveCloseLogin === LIVING_CLOSE_LOGIN.CLOSE) {
|
|
211
|
+
data.login = false
|
|
212
|
+
}
|
|
213
|
+
return data
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export async function getMyOpenClassLives({
|
|
217
|
+
offset = 0,
|
|
218
|
+
limit = 10
|
|
219
|
+
}) {
|
|
220
|
+
const url = '/v1/open_class_lives'
|
|
221
|
+
const response = await liveActivityAPI.get(url, {
|
|
222
|
+
params: {
|
|
223
|
+
offset,
|
|
224
|
+
limit
|
|
225
|
+
}
|
|
226
|
+
})
|
|
227
|
+
return response.data
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* 获取直播详情数据 */
|
|
231
|
+
export async function getLiveInfo(ids) {
|
|
232
|
+
const promies = ids.map((id) => liveProxy.get(`/v3/open_class_lives/${id}`))
|
|
233
|
+
const result = await Promise.all(promies)
|
|
234
|
+
return result.map((res) => res.data)
|
|
235
|
+
// return result?.data || {}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* 查询直播列表-前台
|
|
240
|
+
*/
|
|
241
|
+
export async function OpenLiveSearchFront({
|
|
242
|
+
status,
|
|
243
|
+
scopeType,
|
|
244
|
+
scopeId,
|
|
245
|
+
offset,
|
|
246
|
+
limit
|
|
247
|
+
}) {
|
|
248
|
+
try {
|
|
249
|
+
const url = '/v1/open_class_lives/search_front'
|
|
250
|
+
const response = await proxyApi.get(url, {
|
|
251
|
+
params: {
|
|
252
|
+
status: status === 'all' ? undefined : status,
|
|
253
|
+
scope_type: scopeType,
|
|
254
|
+
scope_id: scopeId,
|
|
255
|
+
offset,
|
|
256
|
+
limit
|
|
257
|
+
}
|
|
258
|
+
})
|
|
259
|
+
return response?.data || {
|
|
260
|
+
count: 0,
|
|
261
|
+
items: []
|
|
262
|
+
}
|
|
263
|
+
} catch (_) {
|
|
264
|
+
return {
|
|
265
|
+
count: 0,
|
|
266
|
+
items: []
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* 获取预约直播
|
|
273
|
+
*/
|
|
274
|
+
export async function getSubscription() {
|
|
275
|
+
try {
|
|
276
|
+
const url = '/v1/open_class_lives/actions/get_subscription'
|
|
277
|
+
const response = await liveActivityAPI.get(url)
|
|
278
|
+
return response.data
|
|
279
|
+
} catch (_) {
|
|
280
|
+
return []
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* 预约直播
|
|
286
|
+
*/
|
|
287
|
+
export async function openLiveSubscribe({
|
|
288
|
+
liveId
|
|
289
|
+
}) {
|
|
290
|
+
const url = `/v1/open_class_lives/${liveId}/actions/subscribe`
|
|
291
|
+
const response = await liveActivityAPI.post(url)
|
|
292
|
+
return response?.data
|
|
293
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import myStudyRecordApi from '@/config/request/my-study-record'
|
|
2
|
+
import openLiveAPI from '@/config/request/open-live'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 获取学习进度列表
|
|
6
|
+
* @param {Object} params
|
|
7
|
+
* @return {Object} { total, items } | {} // total: 总数,items:当前页的资源数据
|
|
8
|
+
*/
|
|
9
|
+
export async function getLearningList({
|
|
10
|
+
catalogType,
|
|
11
|
+
offset,
|
|
12
|
+
limit
|
|
13
|
+
}) {
|
|
14
|
+
const { data } = await myStudyRecordApi.get('/study_details', {
|
|
15
|
+
params: {
|
|
16
|
+
catalog_type: catalogType,
|
|
17
|
+
offset,
|
|
18
|
+
limit
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
return data
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 获取学习进度列表
|
|
26
|
+
* @param {Object} params
|
|
27
|
+
* @return {Object} { total, items } | {} // total: 总数,items:当前页的资源数据
|
|
28
|
+
*/
|
|
29
|
+
export async function getLearningProgress({
|
|
30
|
+
resourceId,
|
|
31
|
+
userId
|
|
32
|
+
}) {
|
|
33
|
+
const result = await myStudyRecordApi.get(`/study_details/${resourceId}/${userId}`)
|
|
34
|
+
if (result.data) {
|
|
35
|
+
return {
|
|
36
|
+
...result.data,
|
|
37
|
+
ext_info: JSON.parse(result.data.ext_info)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 报告学习进度
|
|
44
|
+
* https://wiki.doc.101.com/index.php?title=X%E5%AD%A6%E4%B9%A0%E9%A1%B9%E7%9B%AE%E6%B5%8F%E8%A7%88%E5%8E%86%E5%8F%B2
|
|
45
|
+
* @param {Object} body
|
|
46
|
+
* @return {void}
|
|
47
|
+
*/
|
|
48
|
+
export async function reportLearningProgress(body) {
|
|
49
|
+
const url = '/study_details'
|
|
50
|
+
const {
|
|
51
|
+
ext_info: extInfo,
|
|
52
|
+
...rest
|
|
53
|
+
} = body
|
|
54
|
+
await myStudyRecordApi.post(url, {
|
|
55
|
+
...rest,
|
|
56
|
+
ext_info: JSON.stringify(extInfo)
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 获取学习位置
|
|
62
|
+
*/
|
|
63
|
+
export async function getLearningPosition({
|
|
64
|
+
resourceId,
|
|
65
|
+
userId
|
|
66
|
+
}) {
|
|
67
|
+
const { data } = await myStudyRecordApi.get(`/resource_learning_positions/${resourceId}/${userId}`)
|
|
68
|
+
return data
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 报告学习位置
|
|
73
|
+
*/
|
|
74
|
+
export async function reportLearningPosition({
|
|
75
|
+
resourceId,
|
|
76
|
+
userId,
|
|
77
|
+
position
|
|
78
|
+
}) {
|
|
79
|
+
const { data } = await myStudyRecordApi.put(`/resource_learning_positions/${resourceId}/${userId}`, {
|
|
80
|
+
position
|
|
81
|
+
})
|
|
82
|
+
return data
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 获取公开直播列表
|
|
87
|
+
* @return {Object} { total, items } | {} // total: 总数,items:所有资源数据(一次性)
|
|
88
|
+
*/
|
|
89
|
+
export async function getLiveList() {
|
|
90
|
+
const url = '/study_details'
|
|
91
|
+
const { data } = await openLiveAPI.get(url)
|
|
92
|
+
return data || {}
|
|
93
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import cdnAPI from '@/config/request/cdn'
|
|
2
|
+
import config from '@/config/env'
|
|
3
|
+
|
|
4
|
+
const xCloudServiceName = config.api.serviceName.eLabour
|
|
5
|
+
|
|
6
|
+
// https://pretest-s-file-1.ykt.cbern.com.cn/ldjy/api_static/providers/95594b88-6a65-42c4-bd83-a81a49b71bc2.json
|
|
7
|
+
/**
|
|
8
|
+
* 获取机构的文件信息
|
|
9
|
+
* @param {*} contentId 机构id
|
|
10
|
+
*/
|
|
11
|
+
export async function getOrganizationDetail(contentId) {
|
|
12
|
+
const requestURL = `/${xCloudServiceName}/api_static/providers/${contentId}.json`
|
|
13
|
+
const { data } = await cdnAPI.get(requestURL)
|
|
14
|
+
return data
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// https://pretest-s-file-1.ykt.cbern.com.cn/ldjy/s_course/v2/business_courses/52a86556-32da-43ab-85a6-9c805b83e886/course_relative_infos/zh-CN.json
|
|
18
|
+
/**
|
|
19
|
+
* 获取课程详情
|
|
20
|
+
* @param {*} contentId 课程id
|
|
21
|
+
*/
|
|
22
|
+
export async function getCourseDetail(contentId) {
|
|
23
|
+
const requestURL = `/${xCloudServiceName}/s_course/v2/business_courses/${contentId}/course_relative_infos/zh-CN.json`
|
|
24
|
+
const { data } = await cdnAPI.get(requestURL)
|
|
25
|
+
return data
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// https://pretest-s-file-1.ykt.cbern.com.cn/ldjy/s_course/v2/business_courses/52a86556-32da-43ab-85a6-9c805b83e886/course_lecturers.json
|
|
29
|
+
/**
|
|
30
|
+
* 获取课程详情里授课教师信息
|
|
31
|
+
* @param {*} contentId 课程id
|
|
32
|
+
*/
|
|
33
|
+
export async function getCourseLectures(contentId) {
|
|
34
|
+
const requestURL = `/${xCloudServiceName}/s_course/v2/business_courses/${contentId}/course_lecturers.json`
|
|
35
|
+
const { data } = await cdnAPI.get(requestURL)
|
|
36
|
+
return data
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 获取课程详情里关联的机构清单
|
|
41
|
+
* @param {*} courseId 课程id
|
|
42
|
+
*/
|
|
43
|
+
export async function getCourseProvides(courseId) {
|
|
44
|
+
const requestURL = `/${xCloudServiceName}/s_course/v2/business_courses/${courseId}/course_providers.json`
|
|
45
|
+
const { data } = await cdnAPI.get(requestURL)
|
|
46
|
+
return data
|
|
47
|
+
}
|