小程序插件开发图片转base64编码报错?
发布于 5 年前 作者 mliang 14313 次浏览 来自 官方Issues

wx.getFileSystemManager is not a function; [Component] Event Handler Error

这是调用代码:

wx.getFileSystemManager().readFile({

filePath: this.data.imgSrc, //选择图片返回的相对路径

encoding: ‘base64’, //编码格式

success: resultBase => { //成功的回调

 

console.log(resultBase)

}

})

 

1 回复

小程序插件API是有限制的,这里没有的就无法使用

https://developers.weixin.qq.com/miniprogram/dev/framework/plugin/api-limit.html

回到顶部