let files = this.$refs.uUpload.lists;
let formData = {}
let newFiles = []
formData.companyInfoSubmitRequestJson = JSON.stringify(this.form)
files.forEach((item,index)=>{
newFiles.push(item.file)
})
formData.files = newFiles
this.$http.upload(updateCompanyInfo, {formData:formData}).then((res)=>{
// if (res.status == '00000') {
// this.$refs.uToast.show({title: '操作成功', back:'/pages/workspace/enterpriseManage'});
// }
}).catch((err)=>{
this.$mHelper.toast(err.msg);
})
检查里面显示
Form Data
companyInfoSubmitRequestJson: {"id":32,"createUserId":"15","createUserName":"","createTime":1631158637000,"updateUserId":"15","updateUserName":"","updateTime":1631167692000,"companyName":"12","companyNature":1,"companySize":1,"product":null,"companyValue":null,"companyAdvantage":null,"companyDisadvantage":null,"companyNatureId":"国有企业","companySizeId":"1-50人"}
files:
file: (binary)
大佬,,用这种方法怎么传多张图片。麻烦大佬们了。。