预览的excel转发打不开
发布于 5 年前 作者 owen 15238 次浏览 来自 问答

服务器端生成xls格式的excel,前端下载下来,调用 wx.openDocument()进行预览,预览的时候分享出去,文件打不开

wx.downloadFile({

       url: networkManager.get_path() + ‘file/’ + res,

       success: function(res) {

         var filePath = res.tempFilePath

         wx.openDocument({

           filePath: filePath,

           success: function(res) {

           },

         })

       }

     })

1 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

回到顶部