wx.uploadFile(Object object)
用安卓机上传图片资源无法使用,苹果手机和开发者工具是正常的,请问如何解决,相关代码如下
const that = this;
var cookie = wx.getStorageSync('cookie');
wx.canvasToTempFilePath({
fileType: 'png',
canvasId: 'firstCanvas',
success(res) {
wx.uploadFile({
url: app.globalData.postUrl + "*****",
filePath: res.tempFilePath,
name: 'uploadImage',
header: { cookie: cookie },
formData:{
orderId:orderId
},
success(res2) {
console.log(res2)
var data=JSON.parse(res2.data);
if(data.status==1000){
app.globalData.weatherSignatureUrl=data.data;
wx.showToast({
title: '保存成功!',
icon:'none',
duration:2000
})
}else{
app.globalData.weatherSignatureUrl='';
wx.showToast({
title: data.msg,
icon:'none',
duration:2000
})
}
},
fail(err) {
console.log("uploadFile fail----")
console.log(err)
}
})
},
fail(err) {
console.log("canvasToTempFilePath fail---")
console.log(err)
}
}, that)
无法使用是有什么报错?