onChooseAvatar = (e) => {
let url = e.detail.avatarUrl;
//获取图片信息
wx.getImageInfo({
src: url,
success: sres => {
wx.uploadFile({
url: url,
filePath: sres.path,
name: 'filePath',
header: {
'Content-Type': 'multipart/form-data',
'Authorization': token
},
success: res => {}
})
})
}
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。