customRequest (data) {
const formData = new FormData()
formData.append('file', data.file)
formData.append('token', 'aiufpaidfupipiu')//随便写一个token示例
this.saveFile(formData)
},
saveFile (formData) {
this.form.validateFields((err, values) => {
if (!err) {
let that = this
this.axios(
{
method: 'post',
url: 'http://localhost:4785/api/values/PostSingle',
data: formData
})
.then((response) => {
console.log(response)
})
.catch(function (error) {
console.log(error)
})
}
})
},