| | |
| | | import axios from "axios"; |
| | | export const requestCtx = "https://jsek.bnuic.com"; // 请求地址 |
| | | export const resourceCtx = "http://182.92.203.7:3007/books/resource/4"; // 资源请求地址 |
| | | export const publicCtx = "http://182.92.203.7:3007/books/book/1"; // 资源请求地址 |
| | | export const resourceCtx = "http://182.92.203.7:3007/books/resource/1"; // 资源请求地址 |
| | | export let activeBook = {}; // 资源请求地址 |
| | | export let goodsStore = ""; |
| | | export let publicStore = ""; |
| | | // 请求教材配置信息 |
| | | const getBookConfig = async () => { |
| | | const response = await axios.get(resourceCtx + "/bookConfig.json"); |
| | | activeBook = response.data; |
| | | goodsStore = activeBook.storeRefcode; |
| | | publicStore = activeBook.storeRefcode; |
| | | goodsStore = response.data.storeRefcode; |
| | | return response.data; |
| | | }; |
| | | |
| | | |
| | | // export const bookList = [ |
| | | // {id:1,name:"childHealth",bookName:"学前儿童卫生与保健",bookId:'2358',rootCmsItemId:'24080',storeRefcode:'defaultGoodsStore3'}, |
| | | // {id:2,name:'content',bookName:"婴幼儿生活护照",bookId: '3335',rootCmsItemId:'66969',storeRefcode:'jsek_jslx'}, |
| | | // {id:3,name:"embedded",bookNmae:"嵌入式组态控制技术",bookId:'',rootCmsItemId:"",} |
| | | // ] |
| | | // activeBook = bookList[2] |
| | | export const appId = 3; |
| | | export const requestTimeOut = 300000; // 请求超时时间 |
| | | export const tokenKey = "jsek-token"; |
| | | export const userInfoKey = "website-front-userInfo"; // 用户信息key |
| | | export const appRefCode = "jingshieke"; |
| | | // export const goodsStore = `defaultGoodsStore${appId}`; // 默认商品库(书城) |
| | | // export const publicStore = `defaultPublicStore${appId}`; // 默认资源开放仓储 |
| | | |
| | | export const publicRepository = `defaultPublicRepository${appId}`; // 默认资源开放库 |
| | | export const digitalCourses = "jsek_digitalCourses"; //数字课程 |
| | | export const digitalTextbooks = "jsek_digitalTextbooks"; //数字教材 |
| | | export const seminar = "jsek_seminar"; //专题研讨 |
| | | export const reg_tel = |
| | | /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; // 电话号正则 |
| | | export const reg_telphone = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/; //座机号正则 |
| | | export const fontUrl = "https://jsek.bnuic.com/website"; |
| | | |
| | | const config = { |
| | | requestCtx, |
| | | resourceCtx, |
| | | publicCtx, |
| | | activeBook, |
| | | requestTimeOut, |
| | | tokenKey, |
| | | userInfoKey, |
| | | appRefCode, |
| | | goodsStore, |
| | | digitalCourses, |
| | | digitalTextbooks, |
| | | seminar, |
| | | fontUrl, |
| | | reg_tel, |
| | | reg_telphone, |
| | | appId, |
| | | getBookConfig, |
| | | }; |
| | |
| | | import request from "@/plugin/axios/index.js"; |
| | | import { publicStore, publicRepository } from "@/assets/js/config"; |
| | | import { tokenKey } from "@/assets/js/config"; |
| | | import { handleQueryResourceListData } from "../tool"; |
| | | import toolClass from "@/assets/js/toolClass"; |
| | |
| | | */ |
| | | getItem: ({ |
| | | path, |
| | | storeInfo = publicStore, |
| | | repositoryInfo = publicRepository, |
| | | storeInfo, |
| | | repositoryInfo, |
| | | queryType, |
| | | linkType, |
| | | paging, |
| | |
| | | if (height) src += `&height=${height}`; |
| | | return src; |
| | | } |
| | | |
| | | export default {} |
| | |
| | | import SparkMD5 from "spark-md5"; |
| | | import { getPublicImage } from "@/assets/js/middleGround/tool.js"; |
| | | // import moment from "moment"; |
| | | |
| | | var tool = { |
| | | secondToTime(second) { |
| | |
| | | return time.getTime(); |
| | | } |
| | | }; |
| | | |
| | | // 处理订单记录 |
| | | // export function setOrderList(res) { |
| | | // // 获取当前年份的开始时间 |
| | | // let currentTimestamp = moment().startOf("year"); |
| | | // let arr = []; |
| | | // for (let i = 0; i < res.length; i++) { |
| | | // const item = res[i]; |
| | | // // 发票状态为审核中或者审核失败,将item选中状态设置选中。 |
| | | // // UI控制禁用(显示的效果为 选中并且禁用) |
| | | // if (item.invoiceInfo) { |
| | | // item.checked = true; |
| | | // } else { |
| | | // item.checked = false; |
| | | // } |
| | | // // 判断是否超出申请发票的日期 |
| | | // item.exceedingTheSpecifiedTime = moment(item.createDate).isBefore( |
| | | // currentTimestamp |
| | | // ); |
| | | // if (item.saleMethodLinks.length > 0) { |
| | | // let itemName = null; |
| | | // let itemIcon = null; |
| | | // let cmsItemList = null; |
| | | // try { |
| | | // cmsItemList = item.saleMethodLinks[0].orderSaleMethod.cmsItemList[0]; |
| | | // } catch (error) { |
| | | // cmsItemList = null; |
| | | // } |
| | | // if (cmsItemList && cmsItemList.icon) { |
| | | // itemName = cmsItemList.name; |
| | | // itemIcon = cmsItemList.icon; |
| | | // } else { |
| | | // itemName = item.saleMethodLinks[0].orderSaleMethod.product.name; |
| | | // itemIcon = item.saleMethodLinks[0].orderSaleMethod.product.icon; |
| | | // } |
| | | // item.saleMethodLinks[0].title = itemName; |
| | | // item.saleMethodLinks[0].icon = getPublicImage(itemIcon); |
| | | // } else { |
| | | // const itemIcon = require("@/assets/images/bookCity/place_img.png"); |
| | | // const saleMethodLink = []; |
| | | // const obj = { |
| | | // icon: itemIcon, |
| | | // orderSaleMethod: { |
| | | // price: item.payPrice, |
| | | // }, |
| | | // }; |
| | | // saleMethodLink.push(obj); |
| | | // item.saleMethodLinks = saleMethodLink; |
| | | // } |
| | | // if (item.state == "Success") { |
| | | // item.CustomState = "支付成功"; |
| | | // } |
| | | // if (item.state == "Cancel") { |
| | | // item.CustomState = "取消支付"; |
| | | // } |
| | | // if (item.state == "WaitPay") { |
| | | // item.CustomState = "等待支付"; |
| | | // } |
| | | // if (item.state == "WaitDeliver") { |
| | | // item.CustomState = "正在支付"; |
| | | // } |
| | | // arr.push(item); |
| | | // } |
| | | // return arr; |
| | | // } |
| | | |
| | | //处理表单提交数据 |
| | | export function worksData(res) { |
| | |
| | | } |
| | | } |
| | | |
| | | // 处理时间,用于显示音视频当前时间 |
| | | // export function realFormatSecond(time) { |
| | | // let duration = parseInt(time); |
| | | // let minute = parseInt(duration / 60); |
| | | // let sec = (duration % 60) + ""; |
| | | // let isM0 = ":"; |
| | | // if (minute == 0) { |
| | | // minute = "00"; |
| | | // } else if (minute < 10) { |
| | | // minute = "0" + minute; |
| | | // } |
| | | // if (sec.length == 1) { |
| | | // sec = "0" + sec; |
| | | // } |
| | | // return minute + isM0 + sec; |
| | | // } |
| | | |
| | | // export function parseHtml(content) { |
| | | // const tagReg = |
| | | // /<\/?div[^>]*>|<\/?span[^>]*>|<\/?table[^>]*>|<\/?th[^>]*>|<\/?thead>|<\/?tbody>|<\/?tr>|<\/?td[^>]*>|<br[^>]*>|<\/?p[^>]*>|<\/?sub>|<\/?sup>|<\/?font[^>]*>|<img[^>]*>|<\/?a[^>]*>|\n|\\n/gi; |
| | | // const escapeReg = |
| | | // /&(lt|gt|le|ge|nbsp|amp|quot|times|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|MU|NU|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|thetasym|upsih|piv|circ|tilde|ndash|permil|lsquo|rsquo|ldquo|rdquo|prime);/gi; |
| | | // const escapeElements = { |
| | | // lt: "<", |
| | | // gt: ">", |
| | | // le: "≤", |
| | | // ge: "≥", |
| | | // nbsp: " ", |
| | | // amp: "&", |
| | | // quot: '""', |
| | | // times: "×", |
| | | // Alpha: "Α", |
| | | // Beta: "Β", |
| | | // Gamma: "Γ", |
| | | // Delta: "Δ", |
| | | // Epsilon: "Ε", |
| | | // Zeta: "Ζ", |
| | | // Eta: "Η", |
| | | // Theta: "Θ", |
| | | // Iota: "Ι", |
| | | // Kappa: "Κ", |
| | | // Lambda: "Λ", |
| | | // Mu: "Μ", |
| | | // Nu: "Ν", |
| | | // Xi: "Ξ", |
| | | // Omicron: "Ο", |
| | | // Pi: "Π", |
| | | // Rho: "Ρ", |
| | | // Sigma: "Σ", |
| | | // Tau: "Τ", |
| | | // Upsilon: "Υ", |
| | | // Phi: "Φ", |
| | | // Chi: "Χ", |
| | | // Psi: "Ψ", |
| | | // Omega: "Ω", |
| | | // alpha: "α", |
| | | // beta: "β", |
| | | // gamma: "γ", |
| | | // delta: "δ", |
| | | // epsilon: "ε", |
| | | // zeta: "ζ", |
| | | // eta: "η", |
| | | // theta: "θ", |
| | | // iota: "ι", |
| | | // kappa: "κ", |
| | | // lambda: "λ", |
| | | // mu: "μ", |
| | | // nu: "ν", |
| | | // xi: "ξ", |
| | | // omicron: "ο", |
| | | // pi: "π", |
| | | // rho: "ρ", |
| | | // sigmaf: "ς", |
| | | // sigma: "σ", |
| | | // tau: "τ", |
| | | // upsilon: "υ", |
| | | // phi: "φ", |
| | | // chi: "χ", |
| | | // psi: "ψ", |
| | | // omega: "ω", |
| | | // thetasym: "ϑ", |
| | | // upsih: "ϒ", |
| | | // piv: "ϖ", |
| | | // circ: "ˆ", |
| | | // tilde: "˜", |
| | | // ndash: "–", |
| | | // permil: "‰", |
| | | // lsquo: "‘", |
| | | // rsquo: "’", |
| | | // ldquo: "“", |
| | | // rdquo: "”", |
| | | // prime: "′", |
| | | // }; |
| | | // const contentWithoutTag = content.replace(tagReg, ""); |
| | | // const contentWithOnlyOneSpace = contentWithoutTag.replace(/ {2,}/g, " "); |
| | | // return contentWithOnlyOneSpace.replace( |
| | | // escapeReg, |
| | | // (all, t) => escapeElements[t] |
| | | // ); |
| | | // } |
| | | |
| | | export default { |
| | | ...tool, |
| | | uuid, |
| | | getFileMd5, |
| | | worksDataBytool, |
| | | UpdateworksDataBytool, |
| | | getPublicImage, |
| | | worksData, |
| | | getParentNodeByClassName |
| | | // parseHtml, |
| | |
| | | @mouseup="handleMouseUp" |
| | | :style="{ |
| | | fontSize: fontSize ? fontSize + 'px' : '16px', |
| | | transform: `scale(${pageZoom ? pageZoom : 1})`, |
| | | transform: `scale(${pageZoom ? pageZoom : 1})` |
| | | }" |
| | | > |
| | | <pageContent></pageContent> |
| | |
| | | <script> |
| | | import pageContent from "./content/index.vue"; |
| | | export default { |
| | | name: "child-health", |
| | | components: { |
| | | pageContent, |
| | | pageContent |
| | | }, |
| | | data() { |
| | | return { |
| | | bookData: {}, |
| | | type: "option", |
| | | idPathList: [], |
| | | cardList: [], |
| | | isMouseDown: false, |
| | | }; |
| | | return {}; |
| | | }, |
| | | computed: { |
| | | fontSize() { |
| | |
| | | }, |
| | | pageZoom() { |
| | | return this.$store.state.qiankun.scale / 100; |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.getBookInfo(); |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | getBookInfo() { |
| | | let query = { |
| | | path: "*", |
| | | queryType: "*", |
| | | productId: this.config.bookId, |
| | | favoriteTypes: "FavoriteBookCity", |
| | | itemFields: { |
| | | "SysType=": "CmsFolder", |
| | | }, |
| | | coverSize: { |
| | | height: 300, |
| | | }, |
| | | fields: { |
| | | seriesName: [], |
| | | author: [], |
| | | isbn: [], |
| | | publicationDate: [], |
| | | bookClassification: [], |
| | | paperPrice: [], |
| | | JDLink: [], |
| | | tmallLink: [], |
| | | dangdangLink: [], |
| | | weidianLink: [], |
| | | content: [], |
| | | authorIntroduction: [], |
| | | // isApplyPaperBook: [], |
| | | // isApplyEBook: [], |
| | | isApplyBook: [], |
| | | isSell: [], |
| | | pdf: [], |
| | | protectedEpub: [], |
| | | probationPage: [], //pdf试读页数 |
| | | freeEpubPage: [], //epub试读百分比 |
| | | }, |
| | | }; |
| | | this.MG.store.getProductDetail(query).then((res) => { |
| | | this.$data.bookData = res.datas; |
| | | this.$store.commit("setRootCmsItemId", res.datas.rootCmsItemId); |
| | | }); |
| | | }, |
| | | getParentWithClass(element, className) { |
| | | while (element.parentElement) { |
| | | element = element.parentElement; |
| | |
| | | txt, |
| | | page, |
| | | x: e.x, |
| | | y: e.y, |
| | | y: e.y |
| | | }); |
| | | } |
| | | } |
| | |
| | | txt: "", |
| | | page: "", |
| | | x: e.x, |
| | | y: e.y, |
| | | y: e.y |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped></style> |
| | | <style lang="less"> |
| | | @import "../assets/main.less"; |
| | | </style> |
| | |
| | | import App from "./App.vue"; |
| | | import less from "less"; |
| | | // 学前儿童卫生与健康 |
| | | // import "./books/childHealth/assets/main.less"; |
| | | |
| | | |
| | | // import './books/content/css/default.less'; |
| | | // 嵌入式组态控制技术 |
| | | import './books/embedded/assets/main.less'; |
| | | // import './books/embedded/assets/main.less'; |
| | | import ElementUI from "element-ui"; |
| | | import "element-ui/lib/theme-chalk/index.css"; |
| | | import store from "./store"; |
| | |
| | | // const { publicCtx } = require("@/assets/js/config"); |
| | | // import {publicCtx} from '@/assets/js/config' |
| | | const { defineConfig } = require("@vue/cli-service"); |
| | | module.exports = defineConfig({ |
| | | // publicPath: 'http://182.92.203.7:3007/books/book/3', |
| | | publicPath:'/books/book/1', |
| | | publicPath:'/books/book', |
| | | transpileDependencies: true, |
| | | lintOnSave: false, |
| | | // devServer: { |