123
QYF-GitLab1
8 小时以前 456334821bd93057b24b698f4f02d7372aec6c2a
123
1个文件已修改
27 ■■■■ 已修改文件
src/views/personalCenter/myApply.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/myApply.vue
@@ -108,7 +108,6 @@
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')
@@ -193,10 +192,32 @@
    },
  })
}
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',