feiyu02
2022-08-11 a82b8c09ca795a4b6273b03a79ba488f6cce5eb0
pages/home/home.js
@@ -154,11 +154,15 @@
        // url = "/pages/text/text"
        let bodyUrl = e.currentTarget.dataset.url
        let fileType = e.currentTarget.dataset.filetype
        wx.showLoading({
          title: ' 文件下载中',
          mask: true,
        })
        wx.downloadFile({
          url: bodyUrl,
          success: function (res) {
            wx.hideLoading()
            const filePath = res.tempFilePath
            var t = filePath.split('.')[filePath.split('.').length - 1]
            wx.openDocument({
              filePath: filePath,
              success: function (res) {