Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website
| | |
| | | import { reactive, ref, onMounted, inject } from 'vue' |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool' |
| | | import { useRouter } from 'vue-router' |
| | | import tool from '@/assets/js/toolClass' |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | |
| | | }, |
| | | }) |
| | | } |
| | | const read = (pItem: any) => { |
| | | |
| | | // 获取教材详情 |
| | | const getBookDetail = async (id: string) => { |
| | | const query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: id, |
| | | coverSize: { |
| | | height: 300, |
| | | width: 210, |
| | | }, |
| | | fields: { |
| | | author: [], |
| | | isbn: [], |
| | | }, |
| | | } |
| | | const res = await MG.store.getProductDetail(query) |
| | | return res.datas ?? null |
| | | } |
| | | |
| | | const read = async (pItem: any) => { |
| | | /** 暂无教材阅读器,跳转至详情 */ |
| | | const detail = await getBookDetail(pItem.id) |
| | | let token = localStorage.getItem(config.tokenKey) |
| | | const url = config.textBookResourceUrl + '#/home' + '?bookId=' + pItem.refCode + '&token=' + token |
| | | const url = |
| | | config.textBookResourceUrl + '#/home' + '?bookId=' + detail.refCode + '&token=' + token |
| | | window.open(url) |
| | | // router.push({ |
| | | // path: '/bookdetail', |