- this.getOpenerEventChannel is not a function?
wxss中选中页面的元素设置filter: grayscale(100%);滤镜的时候,会导致页面中的this.getOpenerEventChannel()失效报错,返回值为undefined,并且只有在ios实机中才会报错,模拟器和安卓没有这个问题。 挺逆天的,我改了class样式竟然还导致你们底层的方法失效了,不知道你们这个方法的底层原理
2024-12-12 - 使用wx.downloadFile无法正确下载pdf?
const { preview } = e.currentTarget.dataset console.log('链接地址', preview) wx.downloadFile({ // 示例 url,并非真实存在 url: preview, success: function (res) { console.log('res', res) const filePath = res.tempFilePath wx.openDocument({ filePath: filePath, success: function (res) { console.log('打开文档成功') }, fail: function (err) { console.log(err) } }) } }) 其中preview是.pdf结尾的文件地址[图片] 但是下载之后之后变成了.bin文件,这是为什么呢[图片]
2023-04-26