<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="changeProfilePicture">
<view class="profile-picture">
<view class="img-box">
<image class="final-img" src="{{userBaseDetails.faceUrl?userBaseDetails.faceUrl:'/images/user.png'}}" />
<image class="camera" src="/images/personalInfo/camera.png" />
</view>
</view>
</button>
async changeProfilePicture(e) {
const { avatarUrl } = e.detail
if (!avatarUrl) {
wx.showToast({
title: "未获取到图片路径",
icon: 'none'
});
return;
}
}
}
复现步骤:先拿手机拍一张照片(相机选项:更多,高像素),然后进入小程序选择该图片,上传的时候会弹框:头像无法使用

库:3.11.3
appid:wxe097c3d43e87b3f5