| | |
| | | VUE_APP_ENV = 'product' |
| | | VUE_APP_API_URL = "https://jsek.bnuic.com" |
| | | VUE_APP_RESOURCE_CTX = 'https://jsek.bnuic.com/books/resource/' |
| | | VUE_APP_PUBLIC_PATH = 'https://jsek.bnuic.com/books/book/artAndDrama' |
| | | VUE_APP_PUBLIC_PATH = 'https://jsek.bnuic.com/books/book/english' |
| | | VUE_APP_BOOK_LIST = "childHealth/lifeCare/sportsAndHealth/embedded/english/artAndDance/artAndDrama/mathBook" |
| | | VUE_APP_BOOK_ID = 'artAndDrama' |
| | | VUE_APP_BOOK_ID = 'english' |
| | |
| | | process.env.VUE_APP_RESOURCE_CTX + |
| | | (process.env.VUE_APP_ENV == "product" |
| | | ? process.env.VUE_APP_BOOK_ID |
| | | : "english") |
| | | : "childHealth") |
| | | ); |
| | | // 测试试读30页 |
| | | // this.activeBook.tryPageCount = 10; |
| | |
| | | import MG from "@/assets/js/middleGround/WebMiddleGroundApi"; |
| | | import getPublicImage from "@/assets/js/middleGround/tool"; |
| | | // 获取题目列表 |
| | | const getQuestionList = async (page, questionList, activeBook) => { |
| | | console.log("page", page); |
| | | const collectList = await getCollectList(activeBook) |
| | | console.log('收藏列表',collectList); |
| | | const oldAnswerData = localStorage.getItem(activeBook.name + "oldAnswerData"); |
| | | let oldData = null; |
| | | let oldList = []; |
| | |
| | | isSubmit: false, // 查看解析 |
| | | isRight: null, // 是否正确 |
| | | isComplete: false, |
| | | isCollect: true, |
| | | isCollect: collectList.indexOf(qitem) > -1 ? true : false, |
| | | isUnfold: "", |
| | | }; |
| | | // 多选和填空答案肯为数组,要转换JSON格式 |
| | |
| | | } |
| | | return cardList.filter((item) => item.infoList.length > 0); |
| | | }; |
| | | |
| | | // 获取收藏列表 |
| | | const getCollectList = async(activeBook) => { |
| | | const allCollect = [ |
| | | { |
| | | type:'bits', |
| | | collectList:[] |
| | | }, |
| | | { |
| | | type:'json', |
| | | collectList:[] |
| | | }, |
| | | ] |
| | | await MG.identity |
| | | .getUserKey({ |
| | | domain: 'collectData', |
| | | keys: [activeBook.bookId] |
| | | }) |
| | | .then((res) => { |
| | | try { |
| | | const collect = JSON.parse(res[0].value) |
| | | if (collect.length) { |
| | | allCollect[0].collectList = collect.find( |
| | | (citem) => citem.type == 'bits' |
| | | ).collectList |
| | | allCollect[1].collectList = collect.find( |
| | | (citem) => citem.type == 'json' |
| | | ).collectList |
| | | } |
| | | } catch (error) { |
| | | console.log('暂无数据') |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | console.log('获取收藏报错'); |
| | | }) |
| | | return allCollect.find(item => item.type == 'bits').collectList |
| | | } |
| | | const getQuestionData = async (chapter, chapterData, activeBook) => { |
| | | const data = { ...chapterData }; |
| | | const oldAnswerData = localStorage.getItem("oldAnswerData"); |
| | |
| | | } |
| | | } |
| | | } |
| | | @media (max-width:820px) { |
| | | .ans-dance { |
| | | .page-box { |
| | | min-height: 500px; |
| | | } |
| | | } |
| | | } |
| | | @media (min-width: 660px) { |
| | | .ans-dance { |
| | | .page-padding { |
| | |
| | | x5-playsinline="" |
| | | controls |
| | | controlslist="nodownload" |
| | | class="w100" |
| | | class="w100 video" |
| | | style="margin-top: 40px;" |
| | | ></video> |
| | | </div> |
| | |
| | | x5-playsinline="" |
| | | controls |
| | | controlslist="nodownload" |
| | | class="w100" |
| | | class="w100 video" |
| | | style="margin-top: 40px;" |
| | | ></video> |
| | | <h2 class="lefth2 mt-40" id="b007"> |
| | |
| | | x5-playsinline="" |
| | | controls |
| | | controlslist="nodownload" |
| | | class="w100" |
| | | class="w100 video" |
| | | style="margin-top: 40px;" |
| | | ></video> |
| | | </div> |
| | |
| | | x5-playsinline="" |
| | | controls |
| | | controlslist="nodownload" |
| | | class="w100" |
| | | class="w100 video" |
| | | style="margin-top: 40px;" |
| | | ></video> |
| | | </div> |
| | |
| | | x5-playsinline="" |
| | | controls |
| | | controlslist="nodownload" |
| | | class="w100" |
| | | class="w100 video" |
| | | style="margin:38px 0" |
| | | ></video> |
| | | <h2 class="lefth2" id="b003"> |
| | |
| | | this.initSwiper(); |
| | | this.initViewer(); |
| | | this.closeAudio() |
| | | this.closeVideo() |
| | | }, 200); |
| | | }, |
| | | }, |
| | |
| | | closeMiniAudio() { |
| | | this.audioPath = ""; |
| | | }, |
| | | |
| | | // 点击音频播放,关闭其他音频 |
| | | closeAudio() { |
| | | let allAudio = ( |
| | |
| | | this.closeMiniAudio() |
| | | }) |
| | | } |
| | | }, |
| | | // 点击视频关闭其他 |
| | | closeVideo() { |
| | | let allVideo = ( |
| | | this.container ? this.container : document |
| | | ).querySelectorAll(".video"); |
| | | for (let index = 0; index < allVideo.length; index++) { |
| | | const item = allVideo[index]; |
| | | item.addEventListener('playing',(item) => { |
| | | const path = item.srcElement.src |
| | | const videoList = Array.from(allVideo); |
| | | for (let cindex = 0; cindex < videoList.length; cindex++) { |
| | | const citem = videoList[cindex]; |
| | | if(citem.currentSrc != path && path) { |
| | | citem.pause() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | // 跳转 |
| | | this.gotoPage(data.catalog, data.page, () => {}); |
| | | }, |
| | | // 点击视频关闭其他 |
| | | closeVideo() { |
| | | let allVideo = ( |
| | | this.container ? this.container : document |
| | |
| | | item.addEventListener('playing',(item) => { |
| | | const path = item.srcElement.src |
| | | const videoList = Array.from(allVideo); |
| | | console.log('播放',item); |
| | | for (let cindex = 0; cindex < videoList.length; cindex++) { |
| | | const citem = videoList[cindex]; |
| | | if(citem.currentSrc != path && path) { |
| | |
| | | }) |
| | | } |
| | | } |
| | | // allVideo = Array.from(allVideo); |
| | | // if(allVideo.length) { |
| | | // for (let index = 0; index < allVideo.length; index++) { |
| | | // const item = allVideo[index]; |
| | | // if(item.currentSrc != path) { |
| | | // item.pause() |
| | | // } |
| | | // } |
| | | // } |
| | | }, |
| | | components: { |
| | | pageHeader, |