有个上传图片文件的问题,首先我是用hbuilderx写的uniapp的微信小程序,所有接口是抓包过来用的,其中有个上传图片的请求,返回的结果是Check sign failed,签名不对,network里面没有参数,下面依次是抓包数据、上传函数、返回结果、network
upPic(){
let list={
app_version:this.$app_version,
category:"certificate"
}
list=this.$api.getParams(list)
console.log(list,'list')
uni.uploadFile({
url:'http://appapi.yxt.vodjk.com/common/upload/v1',
filePath:this.filePath,
name:this.name,
header:{
'content-type': 'multipart/form-data'
},
formData:{...list},
success: function (res) {
console.log('upload success', res)
},
fail: function (res) {
console.log('upload fail', res)
}
})
}
【返回的】
upload success f"code":1,"message":"Check sign failed","data":null)
【network】