pdf
litian
2024-09-19 b9d08f45e3dc1fce9b8ae37ae8b95562843d4cbe
packageDomain/pages/resourceDetails/document/index.js
@@ -70,10 +70,16 @@
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {} else {}
        if (data) {
          this.resourceDetailsData()
        } else {
          this.resourceDetailsData()
        }
      })
    } else {
      this.resourceDetailsData()
    }
    this.resourceDetailsData()
  },
  /**
@@ -153,9 +159,8 @@
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  },
  onShareAppMessage() {},
  onShareTimeline() {},
  goBack() {
    wx.navigateBack()
  },
@@ -302,8 +307,8 @@
      app.MG.file.getPdfInfo({
        md5: item.file
      }).then((res) => {
        if (res && res.totalPages) {
          for (let i = 0; i < res.totalPages; i++) {
        if (res && JSON.parse(res).totalPages) {
          for (let i = 0; i < JSON.parse(res).totalPages; i++) {
            const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + item.file + '&index=' + (i + 1) + '&dpi=300'
            this.data.naturalResources.push(src)
            // console.log(this.data.naturalResources, ' this.data.naturalResources');