uni.chooseImage({
count: 1, // 图片张数
success: async res => {
const reader = new FileReader();
reader.readAsDataURL(res.tempFiles[0]);
reader.onload = async (e)=> {
console.log(e.target.result)// e.target.result转换后的base64
const res = await this.$u.api.imgServer.generateImgSrc({ url: e.target.result });
}
}
})
标签:bold,res,app,base64,result,reader,uni,target
From: https://www.cnblogs.com/bingquan1/p/17817270.html