uni.uploadFile({
url: 'http://192.168.8.109:82/applet/sysFileInfo/upload', //仅为示例,非真实的接口地址
filePath: item.path,
fileType:item.fileType,
name: 'file',
formData: {
'type': 'image'
},
success: (res) => {
// 根据接口具体返回格式 赋值具体对应url
let data = JSON.parse(res.data)
this.postData.spareone += data.data+','
console.log('++',this.postData.spareone);
}
});
上传照片接口
最新推荐文章于 2023-04-28 14:57:10 发布