小程序
小游戏
企业微信
微信支付
扫描小程序码分享
在安卓真机上调用wx.openDocument一直打开不了,报错:document viewer already starting。
但是在开发者工具和ios真机上都能打开成功。
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
没复现,提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
安卓机打开pdf一直有这个问题:
wx.downloadFile({ url: fileUrl, success(res) { console.log(res, '下载成功'); const filePath = res.tempFilePath; wx.openDocument({ filePath: filePath, fileType: 'pdf', showMenu: true, success: function (res) { wx.showToast({ title: '打开文档成功', icon: 'none' }); }, fail: function (res) { wx.showToast({ title: '打开文档失败', icon: 'none' }); console.error('打开文档失败', res); } }); }, fail(res) { wx.showToast({ title: '下载文件失败', icon: 'none' }); console.error('下载文件失败', res); } });
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
没复现,提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
原贴地址:https://developers.weixin.qq.com/community/develop/doc/0004c2f4c9c22096c913335d162800
没人管我们只能找几千个水军 轰炸社区了.............
安卓机打开pdf一直有这个问题:
wx.downloadFile({ url: fileUrl, success(res) { console.log(res, '下载成功'); const filePath = res.tempFilePath; wx.openDocument({ filePath: filePath, fileType: 'pdf', showMenu: true, success: function (res) { wx.showToast({ title: '打开文档成功', icon: 'none' }); }, fail: function (res) { wx.showToast({ title: '打开文档失败', icon: 'none' }); console.error('打开文档失败', res); } }); }, fail(res) { wx.showToast({ title: '下载文件失败', icon: 'none' }); console.error('下载文件失败', res); } });