feat:员工管理上传formdata格式

This commit is contained in:
xiongchengqiang 2020-05-21 16:19:46 +08:00
parent 94b4ae2125
commit 3316cfafdb

View File

@ -187,9 +187,11 @@ export default {
methods: { methods: {
// //
async handleChange (file) { async handleChange (file) {
console.log('file: ', file)
let data = new FormData() let data = new FormData()
data.append('filename', file) data.append('filename', file.raw)
this.isUploading = true this.isUploading = true
// return
let result = await apiUploadFile(data) let result = await apiUploadFile(data)
this.isUploading = false this.isUploading = false
if (result.code === 0) { if (result.code === 0) {