| | |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <meta http-equiv="Cache-Control" content="no-cache"> |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| | | <title><%= htmlWebpackPlugin.options.title %></title> |
| | | </head> |
| | |
| | | // export const requestCtx = "http://182.92.203.7:3001"; // 请æ±å°å |
| | | // export const appId = 27; |
| | | export const requestCtx = "http://jsysf.bnuic.com"; // 请æ±å°å |
| | | export const resourceCtx = "http://182.92.203.7:3007/books/resource/1"; // èµæºè¯·æ±å°å |
| | | export const appId = 3; |
| | | export const requestTimeOut = 300000; // 请æ±è¶
æ¶æ¶é´ |
| | | export const tokenKey = "jsek-token"; |
| | |
| | | |
| | | const config = { |
| | | requestCtx, |
| | | resourceCtx, |
| | | requestTimeOut, |
| | | tokenKey, |
| | | userInfoKey, |
| | |
| | | <span v-if="videoOne"> |
| | | <video |
| | | poster="../../../assets/images/chapterOne/people-video-img.jpg" |
| | | src="http://182.92.203.7:3007/books/resource/1/video/chapterOne/overview.mp4" |
| | | :src="config.resourceCtx + '/video/chapterOne/overview.mp4'" |
| | | webkit-playsinline="true" |
| | | x-webkit-airplay="true" |
| | | playsinline="true" |
| | |
| | | components: { |
| | | pageHeader, |
| | | pageContent, |
| | | examinations, |
| | | examinations |
| | | }, |
| | | data() { |
| | | return { |
| | | type: "option", |
| | | idPathList: [], |
| | | cardList: [], |
| | | cardList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getBookInfo(); |
| | | console.log(this.$store.state.qiankun, "this.$store.state.qiankun"); |
| | | }, |
| | | methods: { |
| | | getBookInfo() { |
| | |
| | | productId: this.config.bookId, |
| | | favoriteTypes: "FavoriteBookCity", |
| | | itemFields: { |
| | | "SysType=": "CmsFolder", |
| | | "SysType=": "CmsFolder" |
| | | }, |
| | | coverSize: { |
| | | height: 300, |
| | | height: 300 |
| | | }, |
| | | fields: { |
| | | seriesName: [], |
| | |
| | | pdf: [], |
| | | protectedEpub: [], |
| | | probationPage: [], //pdfè¯è¯»é¡µæ° |
| | | freeEpubPage: [], //epubè¯è¯»ç¾åæ¯ |
| | | }, |
| | | freeEpubPage: [] //epubè¯è¯»ç¾åæ¯ |
| | | } |
| | | }; |
| | | this.MG.store.getProductDetail(query).then((res) => { |
| | | console.log("å¾ä¹¦ä¿¡æ¯", res.datas.cmsDatas[0].datas); |
| | |
| | | isDownload: [], |
| | | jsek_resourceBrief: [], |
| | | jsek_link: [], |
| | | jsek_questionBank: [], |
| | | jsek_questionBank: [] |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999, |
| | | }, |
| | | size: 999 |
| | | } |
| | | }; |
| | | this.MG.store |
| | | .getProductDetail(query) |
| | |
| | | cmsPath: data.productLinkPath, |
| | | pading: { |
| | | start: 0, |
| | | size: 999, |
| | | }, |
| | | size: 999 |
| | | } |
| | | }; |
| | | this.MG.store.getProductDetail(query).then((res) => { |
| | | console.log("é¢ç®", res.datas.cmsDatas[0].datas); |
| | |
| | | pathList.push({ |
| | | path: pathitem.productLinkPath, |
| | | catalogName: pathitem.name, |
| | | infoList: [], |
| | | infoList: [] |
| | | }); |
| | | this.$data.cardList = pathList; |
| | | // è·åé¢ç® |
| | |
| | | Embedded_QuestionBank_StemStyle: [], |
| | | Embedded_QuestionBank_OptionStyle: [], |
| | | Embedded_QuestionBank_KnowledgePoint: [], |
| | | Embedded_QuestionBank_Difficulty: [], |
| | | Embedded_QuestionBank_Difficulty: [] |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999, |
| | | }, |
| | | size: 999 |
| | | } |
| | | }; |
| | | this.MG.store.getProductDetail(query).then((res) => { |
| | | let oldList; |
| | |
| | | (item) => item.path == pathitem.productLinkPath |
| | | ).infoList; |
| | | this.setData({ |
| | | submitStatus: true, |
| | | submitStatus: true |
| | | }); |
| | | } |
| | | res.datas.cmsDatas[0].datas.forEach((item, index) => { |
| | |
| | | isRight: oldObj ? oldObj.isRight : null, |
| | | isComplete: oldObj ? oldObj.isComplete : false, |
| | | isCollect: false, |
| | | isUnfold: "", // æ§å¶è§£æçæå 颿¿æ¯å¦å±å¼ |
| | | isUnfold: "" // æ§å¶è§£æçæå 颿¿æ¯å¦å±å¼ |
| | | }; |
| | | // å¤éåå¡«ç©ºçæ¡è¯ä¸ºæ°ç»ï¼è¦è½¬æ¢JSONæ ¼å¼ |
| | | if ( |
| | |
| | | if (item == "input") { |
| | | questionObj.stem[i] = { |
| | | num: index, |
| | | data: "input", |
| | | data: "input" |
| | | }; |
| | | if (!oldObj) questionObj.userAnswer[index] = ""; |
| | | index++; |
| | |
| | | }, |
| | | handleMouseUp(e) { |
| | | const txt = window.getSelection()?.toString(); |
| | | const node = window.getSelection(); |
| | | let html = node.anchorNode.parentNode.parentNode.parentNode; |
| | | let nextHtml = html.firstChild.innerHTML; |
| | | let pageHtml = this.getParentWithClass(node.anchorNode,'page-box') |
| | | if (txt) { |
| | | console.log(pageHtml); |
| | | } |
| | | if (html) { |
| | | const page = html.getAttribute("page"); |
| | | console.log("page", page,this.$actions); |
| | | this.$actions.setGlobalState({ |
| | | aa:page |
| | | }) |
| | | |
| | | } |
| | | const selection = window.getSelection(); |
| | | if (selection.type != "none") { |
| | | let node = selection.anchorNode.parentNode.parentNode.parentNode; |
| | | let nextHtml = node.firstChild.innerHTML; |
| | | let pageHtml = this.getParentWithClass( |
| | | selection.anchorNode, |
| | | "page-box" |
| | | ); |
| | | if (txt && node) { |
| | | const page = node.getAttribute("page"); |
| | | // çå¬é䏿æ¬äºä»¶ï¼å¹¶è§¦åç¶å±æ¹æ³ |
| | | if (this.$store.state.qiankun.windowSelection) |
| | | console.log( |
| | | { |
| | | txt, |
| | | selection, |
| | | node, |
| | | page, |
| | | x: e.x, |
| | | y: e.y |
| | | }, |
| | | }, |
| | | "sendData" |
| | | ); |
| | | this.$store.state.qiankun.windowSelection({ |
| | | txt, |
| | | selection, |
| | | node, |
| | | page, |
| | | x: e.x, |
| | | y: e.y |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | |
| | | let instance = null; |
| | | |
| | | function render(actions = {}) { |
| | | // const { container } = props; |
| | | function render(props = {}) { |
| | | const { container } = props; |
| | | instance = new Vue({ |
| | | // router, |
| | | actions, |
| | | store, |
| | | render: (h) => h(App) |
| | | }).$mount(actions.container ? actions.container.querySelector("#app") : "#app"); |
| | | }).$mount(container ? container.querySelector("#app") : "#app"); |
| | | } |
| | | |
| | | // ç¬ç«è¿è¡æ¶ |
| | |
| | | // qiankun |
| | | export async function bootstrap() {} |
| | | export async function mount(props) { |
| | | console.log(props, "åå±è·åçprops"); |
| | | console.log(props, "åå±propspropspropsprops"); |
| | | props.onGlobalStateChange((state, prev) => { |
| | | // state: åæ´åçç¶æ; prev åæ´åçç¶æ |
| | | console.log("åå±changeï¼",state, prev); |
| | | if (state.bb) state.bb(123) |
| | | console.log("åå±ååï¼", state, prev); |
| | | // ç¶æåå忥vuexï¼ç¨äºå页é¢è°ç¨ |
| | | store.commit("setQiankun", state); |
| | | }); |
| | | |
| | | props.setGlobalState({ |
| | | aa: 2 |
| | | state: 3 // åºç¨æè½½å®æï¼åæ¶ç¨äºè§¦å䏿¬¡stateChangeå°stateæè½½å¨vuexå½ä¸ |
| | | }); |
| | | |
| | | render(props); |
| | |
| | | instance = null; |
| | | } |
| | | |
| | | // new Vue({ |
| | | // store, |
| | | // render: (h) => h(App) |
| | | // }).$mount("#app"); |
| | | // å¢å update é©å以便主åºç¨æå¨æ´æ°å¾®åºç¨ |
| | | // export async function update(props) { |
| | | // render(props); |
| | | // } |
| | | |
| | |
| | | mutations: { |
| | | setTestList(state,value) { |
| | | state.testList = value |
| | | }, |
| | | setQiankun(state,value) { |
| | | state.qiankun = value |
| | | } |
| | | }, |
| | | state: { |
| | | // ç¶ææ°æ®å®ä¹ |
| | | num:1, |
| | | testList:[] |
| | | testList:[], |
| | | qiankun: {} |
| | | }, |
| | | getters: { |
| | | // è®¡ç®æ´¾çç¶æ |
| | |
| | | const { defineConfig } = require("@vue/cli-service"); |
| | | module.exports = defineConfig({ |
| | | publicPath: "./", |
| | | publicPath: "http://182.92.203.7:3007/books/book/1", |
| | | transpileDependencies: true, |
| | | lintOnSave: false, |
| | | // devServer: { |