标签:mda headers 文件 post pos vat art request list
<el-upload
class="avatar-uploader"
action
name="file"
:show-file-list="false"
:http-request="upLoad"
>
<div class="upload-btn">上传</div>
</el-upload>
upLoad(fileObj) {
uploadImg(fileObj) // 这里是Axios请求方法
},
import request from '@/utils/request' // 实例化 Axios
export function uploadImg(fileObj,modular="") {
let formData = new FormData();
formData.set("file", fileObj.file);
formData.set("modular", modular);
return request({
url: '/common/uploadImage',
headers: {
"Content-type": "multipart/form-data"
},
method: 'post',
data: formData
})
}
标签:mda headers 文件 post pos vat art request list
原文地址:https://www.cnblogs.com/zhonglinke/p/12311998.html