上传的时候调用接口报错:uploadFile:fail Error: getaddrinfo ENOTFOUND
实际代码:
takePhoto:function(){
wx.createCameraContext().takePhoto({
success:function(res){
console.log(res.tempImagePath)
wx.uploadFile({
url: app.globalData.url + ‘bc_manager/member/uploadImage.do’,
filePath:res.tempImagePath,
name: ‘file’,
header: {
‘content-type’: ‘multipart/form-data’
},
success: function (res) {
var date = JSON.parse(res.data)
console.log(date.obj.filePath);
},
})
}
})
},
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。