//普通方式传参
var param={id:1,name:'李建业'}
export function removeFile (parameter) {
return axios({
url: `/file/file/delete`,
method: 'delete',
data:parameter
})
}
//参数为数组格式
//需要引入插件qs将数组进行转译
cnpm install --save qs
var param={fileList:['李建业']}
import qs from 'qs';
//删除附件
export function removeFile (parameter) {
parameter.fileList=qs.stringify(parameter.fileList)
return axios({
url: `/file/file/delete`,
method: 'delete',
params:parameter
})
}