chooseImage = () => {
this.localIds = [];
this.tempVisits = [];
this.imageNum = 0;
this.serverIds = [];
window.wx.chooseImage({
count: this.option.limit,
success: (res) => {
this.localIds = res.localIds;
this.timeoutKey = setTimeout(this.startUpload, 200);
},
fail: () => {
this.reject('无选择图片权限');
},
});
}
startUpload = async () => {
this.option.startUpload();
try {
await Promise.all(this.localIds.map((localId, index) => this.uploadImg(localId, index)))
this.uploadSuccess();
} catch (error) {
this.reject(error);
}
}
uploadSuccess = () => {
this.resolve && this.resolve({
serverIds: this.serverIds,
localIds: this.tempVisits,
});
};
uploadImg = (localId, index) => {
return new Promise((resolve) => {
const _img = document.createElement('img');
const load = (type) => {
window.wx.uploadImage({
localId,
isShowProgressTips: 0,
success: (res) => {
const uploadHandel = async () => {
try {
let uploadResult = await this.reportThirdUploadResult(res.serverId);
this.serverIds.push(uploadResult.filename);
this.tempVisits.push(uploadResult.tempVisit);
} catch (err) {
console.log('上报三方下载链接err:::', err);
}
resolve()
};
if (type == 'onerror') {
window.wx.getLocalImgData({
localId,
success: (LocalRes) => {
this.localIds[index] = LocalRes.localData;
_img.src = this.localIds[index];
_img.onerror = uploadHandel;
_img.onload = uploadHandel;
},
});
} else {
uploadHandel();
}
},
fail: (err) => {
this.reject && this.reject(err);
},
});
};
_img.onload = () => load('onload');
_img.onerror = () => load('onerror');
_img.src = localId;
})
}
你好,麻烦在手机微信那里上传下日志: 我->设置->帮助与反馈右上角有个上报日志的入口,麻烦提供一下微信号,时间点
是啊,这几天客户反馈过来,确实有这个问题,赶紧修复修复
问题+1 手机型号 Redmi k30 5g
预到同样问题,微信分身不可上传图片
大家都是这几天遇到的么?
我今天也遇到一样的问题,影响比较大了,希望微信的人能够回复一下