@x-edu/live-player 0.0.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/babel.config.js +33 -0
- package/dist/XEduLivePlayer.umd.min.js +29419 -0
- package/dist/img/icon_coffee.afc4fe2f.png +0 -0
- package/dist/img/icon_completed.19a464a3.png +0 -0
- package/dist/img/play-button-hover.fdb338b1.png +0 -0
- package/dist/img/play-button.f4b271fb.png +0 -0
- package/dist/img/reload.3cf8ef22.png +0 -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 +96 -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 +18 -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 +52 -0
- package/src/component/Empty/img/empty.png +0 -0
- package/src/component/Empty/index.jsx +36 -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/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/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 +479 -0
- package/src/detail/index.module.less +164 -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 +15 -0
- package/src/lib/getServiceConfig.js +102 -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 +236 -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,323 @@
|
|
|
1
|
+
import { memoize } from 'lodash'
|
|
2
|
+
import config from '@/config/env'
|
|
3
|
+
import { getCdnAPI, getCdnHotAPI } from '@/config/request/cdn'
|
|
4
|
+
import cdnAPISchool, { apiCommon } from '@/config/request/x-cloud-web'
|
|
5
|
+
// import eduAdminPublicBase from '@/config/request/edu-admin-public-base'
|
|
6
|
+
import rawAPI from '@/config/request/raw'
|
|
7
|
+
|
|
8
|
+
const schoolServiceName = config.api.serviceName.school
|
|
9
|
+
const areaServiceName = config.api.serviceName.areaLibrary
|
|
10
|
+
|
|
11
|
+
const other = {
|
|
12
|
+
area: 'bdxcloud/configs/rank_area_info.json',
|
|
13
|
+
school: 'v1/area_infos/{area_code}/school_infos',
|
|
14
|
+
schoolDetail: 'v1/school_infos/{school_id}/actions/detail',
|
|
15
|
+
gradeSection: 'bdxcloud/configs/gradeSection.json',
|
|
16
|
+
subjectCode: 'bdxcloud/configs/subjectCode.json',
|
|
17
|
+
jobTitle: 'bdxcloud/configs/job_title.json',
|
|
18
|
+
schoolSection: 'studio/school/section.json',
|
|
19
|
+
teacherHonor: 'bdxcloud/configs/teacher_honor.json',
|
|
20
|
+
searchSchool: 'v1/school_infos/from_es?grade_section_contain=true&offset={offset}&limit={limit}&school_name={school_name}&area_code={area_code}'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isSchoolUrl(url) {
|
|
24
|
+
return url.indexOf('/school_infos') > -1
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function isSchoolCommonUrl(url) {
|
|
28
|
+
return url.indexOf('v1/school_infos') > -1
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isOtherUrl(url) {
|
|
32
|
+
return url.indexOf('bdxcloud/configs') > -1 || url.indexOf('studio/school/') > -1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getServiceName(url) {
|
|
36
|
+
if (isSchoolUrl(url)) return schoolServiceName
|
|
37
|
+
if (isOtherUrl(url)) return ''
|
|
38
|
+
return areaServiceName
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function getApiRequest(url) {
|
|
42
|
+
if (isSchoolCommonUrl(url)) return apiCommon
|
|
43
|
+
if (isSchoolUrl(url)) return cdnAPISchool
|
|
44
|
+
if (isOtherUrl(url)) return getCdnHotAPI()
|
|
45
|
+
return getCdnAPI()
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 拼接请求信息
|
|
50
|
+
* @param {*} url
|
|
51
|
+
* @param {*} language
|
|
52
|
+
*/
|
|
53
|
+
async function getRequestURL(url) {
|
|
54
|
+
const serviceName = getServiceName(url)
|
|
55
|
+
return serviceName ? `/${serviceName}/${url}` : `/${url}`
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 请求数据
|
|
60
|
+
* @param {*} url
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
async function getLibraryDatas(url) {
|
|
64
|
+
const requestURL = await getRequestURL(url)
|
|
65
|
+
const { data } = await getApiRequest(url).get(requestURL)
|
|
66
|
+
return data
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 获取地区数据
|
|
71
|
+
* @param {*} id
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
74
|
+
export const getAreas = memoize(
|
|
75
|
+
async () => {
|
|
76
|
+
if (process.env.SDP_ENV === 'preproduction') {
|
|
77
|
+
const resp = await rawAPI.get('https://betacs.101.com/v0.1/static/preproduction_content_x_cloud/configs/rank_area_info.json')
|
|
78
|
+
return resp.data
|
|
79
|
+
} else {
|
|
80
|
+
const data = await getLibraryDatas(other.area)
|
|
81
|
+
return data
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
() => 'areas'
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 获取地区下学校数据
|
|
89
|
+
* @param {*} areaCode
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
// export async function getSchools(areaCode) {
|
|
93
|
+
// const data = await getLibraryDatas(other.school.replace('{area_code}', areaCode))
|
|
94
|
+
// return data
|
|
95
|
+
// }
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 新接口 获取地区下学校数据
|
|
99
|
+
* @param {*} areaCode
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
export async function getSchoolSearchApi({
|
|
103
|
+
areaCode,
|
|
104
|
+
isAll = false, // 是否搜索全部, 就是包括所有子集
|
|
105
|
+
schoolName = '',
|
|
106
|
+
offset = 0,
|
|
107
|
+
limit = 100
|
|
108
|
+
}) {
|
|
109
|
+
const params = {
|
|
110
|
+
include_sub_area: isAll,
|
|
111
|
+
offset,
|
|
112
|
+
limit,
|
|
113
|
+
count: true
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (areaCode) {
|
|
117
|
+
params.area_code = areaCode
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (schoolName) {
|
|
121
|
+
params.school_name = schoolName
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const { data } = await apiCommon.get('/v1/school_infos/actions/search', {
|
|
125
|
+
params
|
|
126
|
+
})
|
|
127
|
+
return data
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 获取学校年段
|
|
132
|
+
* @param {*} id
|
|
133
|
+
* @returns
|
|
134
|
+
*/
|
|
135
|
+
export async function getSchoolSectionApi(schoolInfo) {
|
|
136
|
+
const newSchoolInfo = {
|
|
137
|
+
...schoolInfo
|
|
138
|
+
}
|
|
139
|
+
const vals = await getTermMap()
|
|
140
|
+
newSchoolInfo.school_section = newSchoolInfo.school_section.map((section) => Object.keys(vals.find((v) => v.id === section)?.section))
|
|
141
|
+
newSchoolInfo.school_section = newSchoolInfo.school_section.join(',').split(',')
|
|
142
|
+
return newSchoolInfo
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 获取学校数据
|
|
147
|
+
* @param {*} id
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
150
|
+
export async function getSchool(id) {
|
|
151
|
+
const data = await getLibraryDatas(other.schoolDetail.replace('{school_id}', id))
|
|
152
|
+
const vals = await getTermMap()
|
|
153
|
+
data.school_section = data.school_section.map((section) => Object.keys(vals.find((v) => v.id === section)?.section))
|
|
154
|
+
data.school_section = data.school_section.join(',').split(',')
|
|
155
|
+
return data
|
|
156
|
+
}
|
|
157
|
+
// 获取学校详情
|
|
158
|
+
export const getSchoolDetail = memoize(
|
|
159
|
+
async (id) => {
|
|
160
|
+
const data = await getLibraryDatas(other.schoolDetail.replace('{school_id}', id))
|
|
161
|
+
return data
|
|
162
|
+
},
|
|
163
|
+
(id) => `getSchoolDetail_${id}`
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 获取学校数据
|
|
168
|
+
* @param {*} id
|
|
169
|
+
* @returns
|
|
170
|
+
*/
|
|
171
|
+
export async function getSchoolsByName(name, areaCode, offset = 0, limit = 10) {
|
|
172
|
+
let url = ''
|
|
173
|
+
if (!name && areaCode) {
|
|
174
|
+
url = other.searchSchool
|
|
175
|
+
.replace('&school_name={school_name}', '')
|
|
176
|
+
.replace('{area_code}', areaCode)
|
|
177
|
+
.replace('{offset}', offset)
|
|
178
|
+
.replace('{limit}', limit)
|
|
179
|
+
} else if (name && !areaCode) {
|
|
180
|
+
url = other.searchSchool
|
|
181
|
+
.replace('{school_name}', name)
|
|
182
|
+
.replace('&area_code={area_code}', '')
|
|
183
|
+
.replace('{offset}', offset)
|
|
184
|
+
.replace('{limit}', limit)
|
|
185
|
+
} else if (!name && !areaCode) {
|
|
186
|
+
url = other.searchSchool
|
|
187
|
+
.replace('{school_name}', name)
|
|
188
|
+
.replace('&area_code={area_code}', '')
|
|
189
|
+
.replace('{offset}', offset)
|
|
190
|
+
.replace('{limit}', limit)
|
|
191
|
+
} else {
|
|
192
|
+
url = other.searchSchool
|
|
193
|
+
.replace('{school_name}', name)
|
|
194
|
+
.replace('{area_code}', areaCode)
|
|
195
|
+
.replace('{offset}', offset)
|
|
196
|
+
.replace('{limit}', limit)
|
|
197
|
+
}
|
|
198
|
+
const data = await getLibraryDatas(url)
|
|
199
|
+
const vals = await getTermMap()
|
|
200
|
+
let items = data.items.map((item) => {
|
|
201
|
+
// 将编码转为机构
|
|
202
|
+
item.school_section = item.school_section.map((section) => Object.keys(vals.find((v) => v.id === section)?.section))
|
|
203
|
+
item.school_section = item.school_section.join(',').split(',')
|
|
204
|
+
// 将机构转为学段
|
|
205
|
+
return item
|
|
206
|
+
})
|
|
207
|
+
/**
|
|
208
|
+
* 把“其他”排到最后
|
|
209
|
+
*/
|
|
210
|
+
// 搜索了limit个
|
|
211
|
+
// 如果offset为0,说明是第一次搜索
|
|
212
|
+
if (offset === 0) {
|
|
213
|
+
window.tmpSchools = []
|
|
214
|
+
}
|
|
215
|
+
// 取其他学校数据
|
|
216
|
+
let newItems = items.filter((item) => item?.school_name?.indexOf('其他') === -1).sort((data1, data2) => data1?.school_name?.localeCompare(data2?.school_name, 'zh'))
|
|
217
|
+
const otherItems = items.filter((item) => item?.school_name?.indexOf('其他') > -1)
|
|
218
|
+
window.tmpSchools = [...window.tmpSchools, ...otherItems]
|
|
219
|
+
// 如果结果小于limit,说明搜索结束,添加其他地区
|
|
220
|
+
if (items?.length < limit) {
|
|
221
|
+
newItems = [...newItems, ...window.tmpSchools]
|
|
222
|
+
window.tmpSchools = []
|
|
223
|
+
}
|
|
224
|
+
items = [...newItems]
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
...data,
|
|
228
|
+
items
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export async function getSchoolByName(name) {
|
|
233
|
+
const schools = await getSchoolsByName(name)
|
|
234
|
+
return schools?.items?.find((s) => s.school_name === name)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 获取职称
|
|
239
|
+
* @returns
|
|
240
|
+
*/
|
|
241
|
+
export async function getJobTitles() {
|
|
242
|
+
const { data } = await rawAPI.get('https://bdcs-file-1.ykt.cbern.com.cn/bdxcloud/configs/job_title.json')
|
|
243
|
+
// const data = await getLibraryDatas(other.jobTitle)
|
|
244
|
+
return data
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* 获取学段
|
|
249
|
+
* @returns
|
|
250
|
+
*/
|
|
251
|
+
export async function getTerm() {
|
|
252
|
+
// const data = await getLibraryDatas(other.gradeSection)
|
|
253
|
+
const { data } = await rawAPI.get('https://bdcs-file-1.ykt.cbern.com.cn/bdxcloud/configs/gradeSection.json')
|
|
254
|
+
return data
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export async function getTermMap() {
|
|
258
|
+
const { data } = await rawAPI.get('https://bdcs-file-1.ykt.cbern.com.cn/studio/school/section.json')
|
|
259
|
+
return data
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// export function getDetailTerms(arg) {
|
|
263
|
+
// switch (arg) {
|
|
264
|
+
// case '小学':
|
|
265
|
+
// return [2]
|
|
266
|
+
// case '初中':
|
|
267
|
+
// return [3]
|
|
268
|
+
// case '高中':
|
|
269
|
+
// return [4]
|
|
270
|
+
// case '完中':
|
|
271
|
+
// return [3, 4]
|
|
272
|
+
// case '九年一贯制':
|
|
273
|
+
// return [2, 3]
|
|
274
|
+
// case '12年一贯制 ':
|
|
275
|
+
// return [2, 3]
|
|
276
|
+
// case '幼儿园':
|
|
277
|
+
// return [1]
|
|
278
|
+
// case '其他教育类':
|
|
279
|
+
// return [5]
|
|
280
|
+
// case '高等教育':
|
|
281
|
+
// case '中职':
|
|
282
|
+
// case '高职':
|
|
283
|
+
// case '机构':
|
|
284
|
+
// case '教学点':
|
|
285
|
+
// default:
|
|
286
|
+
// return [1, 2, 3, 4, 5]
|
|
287
|
+
// }
|
|
288
|
+
// }
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* 获取学科
|
|
292
|
+
* @returns
|
|
293
|
+
*/
|
|
294
|
+
export async function getTermSubject(key) {
|
|
295
|
+
const { data } = await rawAPI.get('https://bdcs-file-1.ykt.cbern.com.cn/bdxcloud/configs/subjectCode.json')
|
|
296
|
+
// const data = await getLibraryDatas(other.subjectCode)
|
|
297
|
+
const res = {}
|
|
298
|
+
Object.keys(data).forEach((val, idx) => {
|
|
299
|
+
if (String(val).slice(0, 1) === String(key)) {
|
|
300
|
+
res[val] = Object.values(data)[idx]
|
|
301
|
+
}
|
|
302
|
+
})
|
|
303
|
+
return res
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* 获取学校信息
|
|
308
|
+
* @param {*} id
|
|
309
|
+
* @returns
|
|
310
|
+
*/
|
|
311
|
+
export async function getSchoolInfo(id) {
|
|
312
|
+
const data = await getLibraryDatas(other.schoolDetail.replace('{school_id}', id))
|
|
313
|
+
return data
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* 获取荣誉
|
|
318
|
+
* @returns
|
|
319
|
+
*/
|
|
320
|
+
export async function getHonor() {
|
|
321
|
+
const data = await getLibraryDatas(other.teacherHonor)
|
|
322
|
+
return data
|
|
323
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import SearchAPI, { testApi as SearchTestAPI } from '@/config/request/search'
|
|
2
|
+
import cdnAPI from '@/config/request/cdn'
|
|
3
|
+
|
|
4
|
+
const host = window.location.hostname
|
|
5
|
+
// test5.ykt.eduyun.cn 为提测的地址
|
|
6
|
+
// 使用测试环境数据
|
|
7
|
+
const isUseTestData = ['localhost', 'test3.ykt.eduyun.cn', 'test5.ykt.eduyun.cn'].includes(host)
|
|
8
|
+
// const isUseTestData = false
|
|
9
|
+
|
|
10
|
+
export const SearchType = {
|
|
11
|
+
Course: 'SEARCH_COURSE_TYPE',
|
|
12
|
+
Article: 'SEARCH_ARTICLE_TYPE',
|
|
13
|
+
Document: 'SEARCH_DOCUMENT_TYPE',
|
|
14
|
+
AudioVideo: 'SEARCH_AUDIO_VIDEO_TYPE',
|
|
15
|
+
EBook: 'SEARCH_EBOOK_TYPE',
|
|
16
|
+
TMaterial: 'SEARCH_TEACHING_MATERIAL_TYPE',
|
|
17
|
+
Other: 'SEARCH_OTHER_TYPE'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const OrderField = {
|
|
21
|
+
Default: '_score',
|
|
22
|
+
CreateTime: 'create_time',
|
|
23
|
+
UpdateTime: 'update_time',
|
|
24
|
+
VisitCount: 'visit_count'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const OrderDirection = {
|
|
28
|
+
ASC: 'asc',
|
|
29
|
+
Desc: 'desc'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* api: http://api.e.101.com/services/x-search/description/rest/html?env=design&version=0.1.0-SNAPSHOT
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 聚合搜索,获取结果数量,用于判断是否展示 tab
|
|
38
|
+
* @param {string} keyword 关键字
|
|
39
|
+
* @param {string[]} libraryIds 内容库列表
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
export async function aggregate({
|
|
43
|
+
keyword,
|
|
44
|
+
tabCodes,
|
|
45
|
+
searchType,
|
|
46
|
+
crossTenant
|
|
47
|
+
}) {
|
|
48
|
+
const resp = await SearchAPI.post('/resources/aggregate', {
|
|
49
|
+
keyword,
|
|
50
|
+
tab_codes: tabCodes.filter(
|
|
51
|
+
(t) => !(
|
|
52
|
+
[
|
|
53
|
+
'syncClassroom',
|
|
54
|
+
'classActivity'
|
|
55
|
+
].includes(t)
|
|
56
|
+
)
|
|
57
|
+
),
|
|
58
|
+
resource_search_type: searchType,
|
|
59
|
+
cross_tenant: !!crossTenant
|
|
60
|
+
})
|
|
61
|
+
return resp?.data
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 分页搜索
|
|
65
|
+
export async function search({
|
|
66
|
+
keyword,
|
|
67
|
+
tabCodes,
|
|
68
|
+
searchType,
|
|
69
|
+
crossTenant,
|
|
70
|
+
duplicateFilter,
|
|
71
|
+
searchFields,
|
|
72
|
+
orderField = OrderField.Default,
|
|
73
|
+
orderDirection = OrderDirection.Desc,
|
|
74
|
+
limit = 12,
|
|
75
|
+
offset = 0
|
|
76
|
+
}) {
|
|
77
|
+
try {
|
|
78
|
+
// 兼容 测试、正式环境 的数据
|
|
79
|
+
const _API = isUseTestData ? SearchTestAPI : SearchAPI
|
|
80
|
+
const resp = await _API.post('/resources/search', {
|
|
81
|
+
// const resp = await SearchAPI.post('/resources/search', {
|
|
82
|
+
keyword,
|
|
83
|
+
tab_codes: tabCodes.filter(
|
|
84
|
+
(t) => !(
|
|
85
|
+
[
|
|
86
|
+
'syncClassroom',
|
|
87
|
+
'classActivity'
|
|
88
|
+
].includes(t)
|
|
89
|
+
)
|
|
90
|
+
),
|
|
91
|
+
cross_tenant: !!crossTenant,
|
|
92
|
+
resource_search_type: searchType,
|
|
93
|
+
duplicate_filter: duplicateFilter,
|
|
94
|
+
search_order: {
|
|
95
|
+
field: orderField,
|
|
96
|
+
direction: orderDirection
|
|
97
|
+
},
|
|
98
|
+
search_fields: searchFields,
|
|
99
|
+
offset,
|
|
100
|
+
limit
|
|
101
|
+
})
|
|
102
|
+
return resp?.data
|
|
103
|
+
} catch (error) {
|
|
104
|
+
return {
|
|
105
|
+
error: true
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export async function getSearchConfigForZxx() {
|
|
111
|
+
const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/conf_bd/6_5_9/searchconfig_1.json')
|
|
112
|
+
return result.data
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export async function getSearchConfigForVe() {
|
|
116
|
+
const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/conf_bd/6_5_9/searchconfig_4.json')
|
|
117
|
+
return result.data
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export async function getSearchConfigForHe() {
|
|
121
|
+
const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/conf_bd/6_5_9/searchconfig_8.json')
|
|
122
|
+
return result.data
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export async function getSearchConfigForSe() {
|
|
126
|
+
const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/conf_bd/6_5_9/searchconfig_100.json')
|
|
127
|
+
return result.data
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export async function getSearchConfig() {
|
|
131
|
+
const url = isUseTestData
|
|
132
|
+
? 'https://api.ykt.cbern.com.cn/zxx/api_static/conf_bd/searchconfig_platform.json' // 测试环境数据
|
|
133
|
+
: 'https://api.ykt.cbern.com.cn/zxx/api_static/conf/6_7_1/searchconfig_platform.json' // 正式环境数据
|
|
134
|
+
// const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/conf/6_6_7/searchconfig_platform.json')
|
|
135
|
+
// const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/conf_bd/searchconfig_platform.json')
|
|
136
|
+
const result = await cdnAPI.get(url)
|
|
137
|
+
const enabledConfig = result.data.filter((t) => t.enable === 1)
|
|
138
|
+
|
|
139
|
+
await Promise.all(enabledConfig.map(async (t) => {
|
|
140
|
+
const resultData = await cdnAPI.get(t.configure)
|
|
141
|
+
t.config = resultData.data
|
|
142
|
+
}))
|
|
143
|
+
return enabledConfig
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export async function getLibraryList() {
|
|
147
|
+
// const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/data/6_3_22/librarylist.json')
|
|
148
|
+
const result = await cdnAPI.get('https://api.ykt.cbern.com.cn/zxx/api_static/data/6_6_6/librarylist.json')
|
|
149
|
+
return result.data
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// 搜索标签
|
|
153
|
+
export async function searchTags({
|
|
154
|
+
keyword,
|
|
155
|
+
tabCodes,
|
|
156
|
+
crossTenant,
|
|
157
|
+
limit = 20,
|
|
158
|
+
offset = 0
|
|
159
|
+
}) {
|
|
160
|
+
const _API = isUseTestData ? SearchTestAPI : SearchAPI
|
|
161
|
+
const resp = await _API.post('/site/category/search', {
|
|
162
|
+
keyword,
|
|
163
|
+
tab_codes: tabCodes,
|
|
164
|
+
cross_tenant: !!crossTenant,
|
|
165
|
+
limit,
|
|
166
|
+
highlight: true,
|
|
167
|
+
offset
|
|
168
|
+
})
|
|
169
|
+
return resp?.data
|
|
170
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import socialCensorAPI from '@/config/request/social-censor'
|
|
2
|
+
import cdnAPI from '@/config/request/social-censor-cdn'
|
|
3
|
+
|
|
4
|
+
// https://wiki.doc.101.com/index.php?title=%E6%95%8F%E6%84%9F%E8%AF%8D%E6%9C%8D%E5%8A%A1%E7%AB%AFAPI#AppConfig:.E4.BA.A7.E5.93.81.E9.85.8D.E7.BD.AE
|
|
5
|
+
export const getAppConfig = async () => {
|
|
6
|
+
const url = '/c/apps/config'
|
|
7
|
+
const response = await socialCensorAPI.get(url, {
|
|
8
|
+
params: {
|
|
9
|
+
version: 0
|
|
10
|
+
}
|
|
11
|
+
})
|
|
12
|
+
return response.data
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let nameLexicon = null
|
|
16
|
+
export const checkNameCensorWord = async (word) => {
|
|
17
|
+
console.log('word', word)
|
|
18
|
+
const config = await getAppConfig()
|
|
19
|
+
const findInWhiteList = []
|
|
20
|
+
// 没有配置白名单则不处理
|
|
21
|
+
if (config.lexicon_groups.WHITELIST) {
|
|
22
|
+
const whiteWord = await cdnAPI.get(`/v0.1/download?dentryId=${config.lexicon_groups.WHITELIST}`)
|
|
23
|
+
findInWhiteList.push(...whiteWord?.data?.split('\n'))
|
|
24
|
+
}
|
|
25
|
+
const whiteList = findInWhiteList.filter((item) => !!item)
|
|
26
|
+
console.log('whiteList', whiteList)
|
|
27
|
+
const nameConfig = config.lexicon_groups.name || {}
|
|
28
|
+
const dentryIds = [nameConfig.base_dentry_id, nameConfig.dentry_id].filter((_) => !!_)
|
|
29
|
+
const requests = dentryIds.map((detryId) => cdnAPI.get(`/v0.1/download?dentryId=${detryId}`))
|
|
30
|
+
const lexicon = []
|
|
31
|
+
await Promise.all(requests)
|
|
32
|
+
.then((res) => {
|
|
33
|
+
res.forEach((item) => {
|
|
34
|
+
lexicon.push(...item.data.split('\n'))
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
nameLexicon = [...lexicon]
|
|
38
|
+
const aSet = new Set(nameLexicon)
|
|
39
|
+
const bSet = new Set(whiteList)
|
|
40
|
+
const differenceSet = new Set([...aSet].filter((x) => !bSet.has(x)))
|
|
41
|
+
const differenceSetArr = Array.from(differenceSet)
|
|
42
|
+
console.log('differenceSetArr', differenceSetArr)
|
|
43
|
+
return differenceSetArr.some((item) => item && word.toString()
|
|
44
|
+
.includes(item))
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import config from '@/config/env'
|
|
2
|
+
import cdnAPI from '@/config/request/cdn'
|
|
3
|
+
|
|
4
|
+
const xCloudServiceName = config.api.serviceName['x-cloud']
|
|
5
|
+
const eLabourServiceName = config.api.serviceName.eLabour
|
|
6
|
+
|
|
7
|
+
export async function getResourceDetail(
|
|
8
|
+
contentType,
|
|
9
|
+
contentId
|
|
10
|
+
) {
|
|
11
|
+
const { data } = await cdnAPI.get(
|
|
12
|
+
`${xCloudServiceName}/api_static/contents/${contentId}.json`
|
|
13
|
+
)
|
|
14
|
+
return {
|
|
15
|
+
...data,
|
|
16
|
+
property_values: JSON.parse(data.property_values)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export async function getELabourResourceDetail(
|
|
21
|
+
contentType,
|
|
22
|
+
contentId
|
|
23
|
+
) {
|
|
24
|
+
const { data } = await cdnAPI.get(
|
|
25
|
+
`${eLabourServiceName}/api_static/contents/${contentId}.json`
|
|
26
|
+
)
|
|
27
|
+
return {
|
|
28
|
+
...data,
|
|
29
|
+
property_values: JSON.parse(data.property_values)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import xFeedback from '@/config/request/x-feedback'
|
|
2
|
+
|
|
3
|
+
// http://api.e.101.com/services/feedback/description/rest/html?env=design&version=0.0.1-SNAPSHOT#/definitions/TokenEntity
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 获取CS操作使用的Token body内容写死
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @return {*} UranusTokenParam: {
|
|
10
|
+
"date_time": "string",
|
|
11
|
+
"token": "string",
|
|
12
|
+
"policy": "string",
|
|
13
|
+
"expire_at": "string",
|
|
14
|
+
"string_to_sign": "string",
|
|
15
|
+
"service_name": "string",
|
|
16
|
+
"path": "string"
|
|
17
|
+
}
|
|
18
|
+
*/
|
|
19
|
+
export async function getCsToken() {
|
|
20
|
+
const { data } = await xFeedback.post('/cs_tokens', {
|
|
21
|
+
token_type: 'UPLOAD_NORMAL',
|
|
22
|
+
path: '/feedback',
|
|
23
|
+
params: null
|
|
24
|
+
})
|
|
25
|
+
return data
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 新增反馈
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @param {*} [body={
|
|
33
|
+
"biz_id": "string", 反馈对象ID
|
|
34
|
+
"biz_type": "string", 反馈对象类型
|
|
35
|
+
"biz_name": "string", 反馈对象名称
|
|
36
|
+
"custom_type": "string", 接入方类型
|
|
37
|
+
"remark": "string", 反馈备注
|
|
38
|
+
"contact_info": "string", 联系信息
|
|
39
|
+
"pic_urls": [ 反馈图片列表,可选
|
|
40
|
+
"string"
|
|
41
|
+
],
|
|
42
|
+
"ext": {
|
|
43
|
+
"biz_id": "string",
|
|
44
|
+
} 反馈扩展字段
|
|
45
|
+
}]
|
|
46
|
+
* @return {*} null
|
|
47
|
+
*/
|
|
48
|
+
export async function uploadFeedback(body = {}) {
|
|
49
|
+
const { data } = await xFeedback.post('/feedbacks', body)
|
|
50
|
+
return data
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 获取栏目清单
|
|
55
|
+
*
|
|
56
|
+
* @export
|
|
57
|
+
* @returns array[TypeVo]: [
|
|
58
|
+
* {
|
|
59
|
+
"code": "string",
|
|
60
|
+
"name": "string"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export async function getChannelTypes() {
|
|
66
|
+
const { data } = await xFeedback.get('/channel_types')
|
|
67
|
+
return data
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 获取举报类型列表
|
|
72
|
+
*
|
|
73
|
+
* @export
|
|
74
|
+
* @returns array[TypeVo]: [
|
|
75
|
+
* {
|
|
76
|
+
"code": "string",
|
|
77
|
+
"name": "string"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
export async function getContentTypes() {
|
|
83
|
+
const { data } = await xFeedback.get('/content_types')
|
|
84
|
+
return data
|
|
85
|
+
}
|