图片转base64图片类型示例。
ImgToBase64Func(filePath) {
return new Promise((resolve, reject) => {
let baseFormat = 'data:image/png;base64,'
let base64 = wx.getFileSystemManager().readFileSync(filePath, 'base64')
resolve(baseFormat + base64)
})
}