glowing
glowing
  • 发布:2021-10-12 12:38
  • 更新:2021-10-12 12:38
  • 阅读:586

小程序pdf预览不可用

分类:uni-app

小程序端需要预览pdf文件,pdf存储在unicloud后台的云存储中

之前是可以预览的,最近发现正式版和不开调试的体验版中无法预览,请问什么原因?
是否是微信新加了限制?

代码如下:

                uni.downloadFile({  
                    url: this.base.pdf,  
                    success: function(res) {  
                        var filePath = res.tempFilePath;  
                        uni.openDocument({  
                            filePath: filePath,  
                            success: function(res) {  
                                console.log('打开文档成功');  
                            }  
                        });  
                    }  
                });
2021-10-12 12:38 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复