openDocument无法打开文件
- 当前 Bug 的表现(可附上截图)
在编辑器上可以正常打开pdf文档,可是在真机上一直提示“未找到可以打开该类型文档的应用”,控制台打印,可以看到文档的在线路径和下载的路径都能拿到
-
预期表现
-
复现路径
-
提供一个最简复现 Demo
gotoCase(e){ let self = this, fileurl = e.currentTarget.dataset.fileurl; console.log(fileurl); wx.downloadFile({ url: fileurl, success(res){ let filePath = res.tempFilePath; console.log(filePath); wx.openDocument({ filePath: filePath, fileType: "pdf", success(res){ // console.log("打开文档成功"); }, fail(res){ console.log(res); }, complete(){ } }); } });} |
