blob格式转成data:URL格式
function blobToDataURL (blob) {
return new Promise((resolve, reject) => {
let reader = new FileReader()
reader.addEventListener('load', () => {
resolve(reader.result) // reader.result即为包含文件内容的字符串
})
reader.readAsDataURL(blob)
})
}