真机调试就报错了。iPhone13,目前还没上线测试,有没有大佬解决的
"errno":600005,"errMsg":"uploadFile:fail file path"errno":600005,"errMsg":"uploadFile:fail file path invalid" 因为我们在后台打了实时日志,发现请求没有成功,catch捕获了异常,异常信息如上,同样的代码,其余人都可以上传成功,请问下是什么原因,请问报错的原因是什么呢 代码和log如下 // 这是上传图片的方法 BFXJCTEMPuploadImage: function () { let mustCheckVisitData = this.data.visitProcess.getModuleSaveData(visitConfig.visitProcessStep.BFXJC); let _processData = this.data.visitProcess.getVisitProcessState(visitConfig.visitProcessStep.BFXJC); let imgListPath = _processData['imgList'] || [] logger.info('imgListPath', imgListPath); //已经走到了这里 这里显示的是日志是 // [10:02:39] imgListPath [{"key":"wxfile://tmp_65d9ea6f75871aab42a70fc4eb211ea8.jpg","materielCheckCd":"634123100000064128748720220705091657","imageName":"634123100000064128748720220705091657_00.jpg","upLoadFinish":"4"},{"key":"wxfile://tmp_4217c15f8a01eb1615df81f78d220589.jpg","materielCheckCd":"634123100000065128748720220705091657","imageName":"634123100000065128748720220705091657_00.jpg","upLoadFinish":"4"},{"key":"wxfile://tmp_bb1bf37c3cc89f51af5b930837c512a8.jpg","materielCheckCd":"634123100000065128748720220705091657","imageName":"634123100000065128748720220705091657_01.jpg","upLoadFinish":"4"}] if (imgListPath && imgListPath.length > 0) { for (let k = 0; k < imgListPath.length; k++) { let txnKey = imgListPath[k].txnKey let uploadStatus = imgListPath[k].upLoadFinish let picRow = imgListPath[k].picRow let picCol = imgListPath[k].picCol if (visitConfig.visitProcessUploadStatus.uploaded != uploadStatus) { let _keyId = imgListPath[k].key const postImage = request.uploadNew(_keyId, config.api.uploadMslCompImage, { fileTypeCd: "VISIT_MSLCOMP_IMAGE", txnKey: txnKey, mslCompCd: "", picRow: picRow, picCol: picCol }); //请求中出现报错 postImage.then(result => { logger.info('必分销图片上传成功。。', result); this.updateVisitProcessStepImgState(visitConfig.visitProcessStep.BFXJC, _keyId, visitConfig.visitProcessUploadStatus.uploaded); }).catch((mslI) => { logger.error('必分销上传图片失败回调', mslI); //这里的log是[10:02:39] 必分销上传图片失败回调 {"errno":600005,"errMsg":"uploadFile:fail file path invalid"} this.updateVisitProcessStepImgState(visitConfig.visitProcessStep.BFXJC, _keyId, visitConfig.visitProcessUploadStatus.error); }); } } } }, 小程序试试日志可以看到 图片路径是wxfile://tmp_bd13c5f0c9d3605bd7c2e419a644b642.jpg
10-18