litian
2024-07-05 2f9305515c7264637164c9e03c2840f4219ca1e3
pages/index/resourceCover.js
@@ -12,7 +12,8 @@
    cmsId: '',
    productLinkPath: '',
    parentProductLinkPath: '',
    formPath: ''
    formPath: '',
    copyUrl: '',
  },
  /**
@@ -112,6 +113,9 @@
          "/file/api/ApiDownload?md5=" +
          book.freeFile;
        console.log(fileLink, "fileLink");
        this.setData({
          copyUrl: fileLink
        })
        // wx.redirectTo({
        //   url: "/packageBookService/pages/bookServices/webView/index?url=" + fileLink
        // });
@@ -122,6 +126,21 @@
    })
  },
  copyUrl(e) {
    let url = e.currentTarget.dataset.value
    console.log(url)
    // wx.setClipboardData(url)
    wx.setClipboardData({
      data: `${e.currentTarget.dataset.value}`,
      success(res) {
        console.log(res.data) // data
      },
      fail(err) {
        reject(err);
      }
    })
  },
  /**
   * 用户点击右上角分享
   */