QYF-GitLab1
2 小时以前 49a435043b0b1a289a24606e35253365d7ab3956
src/views/personalCenter/myApply.vue
@@ -31,7 +31,9 @@
              试用期限:<span>{{ item.updateDate }}</span> --
              <span>{{ item.feedBack.endDate }}</span>
            </div>
            <div style="color: orangered" v-if="item.isExpiry">阅读期限:<span>已过期</span></div>
            <div class="no" style="color: orangered" v-if="item.isExpiry">
              阅读期限:<span>已过期</span>
            </div>
            <div class="time">申请时间:{{ item.updateDate }}</div>
          </div>
          <div class="reasonForFailure" style="margin: 10px 0" v-if="item.state == 'Reject'">
@@ -106,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')
@@ -191,17 +192,39 @@
    },
  })
}
const read = (pItem: any) => {
  // let token = tool.getCookie(config.tokenKey)
  // const url = config.textReaderUrl + '#/home' + '?bookId=' + pItem.id + '&token=' + token
  // debugger
  // window.open(url)
  router.push({
    path: '/bookdetail',
    query: {
      bookId: pItem.id,
// 获取教材详情
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=' + detail.refCode + '&token=' + token
  window.open(url)
  // router.push({
  //   path: '/bookdetail',
  //   query: {
  //     bookId: pItem.id,
  //   },
  // })
}
const handleSizeChange = (val: number) => {
  paginationData.limit = val