- 急!小程序wx.chooseImage直接拍照异常?
小程序wx.chooseImage直接拍照后显示如下图,不显示图片,还打印了本地图片路径 机型:目前发现都是华为、荣耀 另外,请求关注一下另一个帖子,也是这个API《急!小程序wx.chooseImage通过相册选取异常?》 目前bug爆发了,求紧急解决[图片]
2021-04-26 - 调用wx.uploadImage 返回 "errMsg":"uploadImage:fail"
chooseImage = () => { this.localIds = []; this.tempVisits = []; this.imageNum = 0; this.serverIds = []; window.wx.chooseImage({ count: this.option.limit, success: (res) => { this.localIds = res.localIds; // ["wxLocalRe*://5645646454"] 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, // 图片的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; }) }
2021-04-26 - JSSDK调用uploadimage出现失败的情况?(华为部分机型出现)
JSSDK调用uploadimage出现失败的情况,是最近才出现的问题,华为p20,微信版本8.0.3,不知道失败的原因,再其他机子里面测试又没问题。。 希望管理员能给一下出现uploadimage:fail的情况,完全不知道怎么定位问题。
2021-04-26 - wx.uploadImage()提示uploadImage:upload fail?100%复现
前端使用wx.uploadImage()上传图片,总是提示uploadImage:upload fail,同一部手机,一个在主微信正常,一个在复制出来的微信上调用总出问题[图片][图片][图片][图片]
2021-04-26