wxhtmltopdf 图片路径问题_wx.openDocument无法读取文件 ,提示文件或文件夹不在白名单中,麻烦帮忙解答?...
wx.openDocument无法读取文件 ,提示文件或文件夹不在白名单中,麻烦帮忙解答?我已经在开发者工具中勾选不检测域名选项,提示文件或文件夹不在白名单中,开发使用的基础库版本为2.11.1,已经尝试更换基础库版本,但是问题依旧未能得到解决。 wx.openDocument({filePath:'https://image.liangyikeji.net/test.pdf',...
wx.openDocument无法读取文件 ,提示文件或文件夹不在白名单中,麻烦帮忙解答?
我已经在开发者工具中勾选不检测域名选项,提示文件或文件夹不在白名单中,开发使用的基础库版本为2.11.1,已经尝试更换基础库版本,但是问题依旧未能得到解决。 wx.openDocument({ filePath: 'https://image.liangyikeji.net/test.pdf', fileType: 'pdf', success: function (res) { console.log('打开文档成功') } })
I have checked the "do not detect domain name" option in the developer tool, indicating that the file or folder is not in the white list. The basic library version used for development is 2.11.1, and I have tried to change the basic library version, but the problem is still not solved. wx.openDocument ({ filePath: ' https://image.liangyikeji.net/test.pdf ', fileType: 'pdf', success: function (res) { console.log ('Document opened successfully ')}})
回答:
Distance:
要先在后台配置downloadFile 域名,通过wx.downloadFile获取到本地临时路径,再调用wx.openDocument打开文件
Jie:好的,解决了,谢谢
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)