| | |
| | | export const goodsStore = `defaultGoodsStore${appId}` // 默认商品库(书城) |
| | | export const publicStore = `defaultPublicStore${appId}` // 默认资源开放仓储 |
| | | export const publicRepository = `defaultPublicRepository${appId}` // 默认资源开放库 |
| | | export const textBookResourceUrl = 'https://yxjy.pumcp.com/books/resource/' |
| | | export const textBookResourceUrl = 'https://yxjy.pumcp.com/testBookReader/#/home' |
| | | |
| | | 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}$/ // 电话号正则 |
| | |
| | | }) |
| | | } |
| | | } |
| | | router.go(0) |
| | | if (localStorage.getItem('loginBack')) { |
| | | window.location.href = localStorage.getItem('loginBack') |
| | | localStorage.removeItem('loginBack') |
| | | } else { |
| | | router.go(0) |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | // 获取url参数 |
| | | const getUrlParams = () => { |
| | | let url = window.location.href |
| | | let params = url.split('?')[1] |
| | | let paramsObj = {} |
| | | if (params) { |
| | | paramsObj = params.split('&').reduce((pre, cur) => { |
| | | pre[cur.split('=')[0]] = cur.split('=')[1] |
| | | return pre |
| | | }, {}) |
| | | } |
| | | return paramsObj |
| | | } |
| | | |
| | | onMounted(() => { |
| | | // 监听是否来自数字阅读 |
| | | const params = getUrlParams() |
| | | if (params.login) { |
| | | localStorage.setItem('loginBack', decodeURIComponent(params.callBackUrl)) |
| | | logIn() |
| | | } |
| | | getBanner() |
| | | classifList() |
| | | getInformationList() |
| | |
| | | } |
| | | const read = (pItem: any) => { |
| | | /** 暂无教材阅读器,跳转至详情 */ |
| | | // let token = localStorage.getItem(config.tokenKey) |
| | | // const url = config.textBookResourceUrl + '#/home' + '?bookId=' + pItem.id + '&token=' + token |
| | | // window.open(url) |
| | | router.push({ |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: pItem.id, |
| | | }, |
| | | }) |
| | | let token = localStorage.getItem(config.tokenKey) |
| | | const url = config.textBookResourceUrl + '#/home' + '?bookId=' + pItem.refCode + '&token=' + token |
| | | window.open(url) |
| | | // router.push({ |
| | | // path: '/bookdetail', |
| | | // query: { |
| | | // bookId: pItem.id, |
| | | // }, |
| | | // }) |
| | | } |
| | | const handleSizeChange = (val: number) => { |
| | | paginationData.limit = val |