export function deleteFactory(factoryId) {
return request({
url: `factory/delete`,
method: 'delete',
data:{factoryId}
})
}
request
是封装的一个axios实例
handleDelete($index, row) {
const id = row.factoryId
deleteFactory(id).then(res=>{
console.log(res.data.success)
})
},
看到delete方法第二个参数是config,不懂这个config是什么意思
swagger中的调试
放在body中简单,但要区分参数类型,比如是FormData还是json等