小程序
小游戏
企业微信
微信支付
扫描小程序码分享
先用wx.downloadFile下载下来pdf文件,然后用wx.openDocument打开这个文件,在开发工具可以打开该下载的pdf文件。可是当远程调试在真机上测试时,也提示下载成功,并且也提示‘openDocument:ok’,可就是没显示出来,请问是怎么回事
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
代码片段链接无法导入
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
额,这是我的APPID:wxb5d1b0cd822fd25b
我直接上代码吧
wx.downloadFile({
url: 'https://www.siicfm.cn/weixin/xunda/static/agreementPdf/agreement.pdf',
success:(res)=>{
console.log(res.tempFilePath, '我下载了会员手册')
wx.openDocument({
filePath: res.tempFilePath,
success: function (response) {
console.log(response, '我打开了会员手册')
},
fail: function (error) {
console.log(error, '打开会员手册出错了')
}
})
fail:(err)=>{
wx.hideLoading()
console.log(err, '下载会员手册出错了')
好的,已经解决了,谢谢了
请问最后怎么解决的,急~~
我也遇到这个问题了,是IOS打不开。
是如何解决的呢,能说一下吗?谢谢。
我什么都没动,然后不知怎么的就好了,我也很是奇怪
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
代码片段链接无法导入
额,这是我的APPID:wxb5d1b0cd822fd25b
我直接上代码吧
wx.downloadFile({
url: 'https://www.siicfm.cn/weixin/xunda/static/agreementPdf/agreement.pdf',
success:(res)=>{
console.log(res.tempFilePath, '我下载了会员手册')
wx.openDocument({
filePath: res.tempFilePath,
success: function (response) {
console.log(response, '我打开了会员手册')
},
fail: function (error) {
console.log(error, '打开会员手册出错了')
}
})
},
fail:(err)=>{
wx.hideLoading()
console.log(err, '下载会员手册出错了')
}
})
好的,已经解决了,谢谢了
请问最后怎么解决的,急~~
我也遇到这个问题了,是IOS打不开。
是如何解决的呢,能说一下吗?谢谢。
我什么都没动,然后不知怎么的就好了,我也很是奇怪