后端
@PostMapping("/common/upload/updateTaskFile")
public void deleteFile(@RequestBody List<String> filePath) {
for (String deleteFilePath : filePath) {
System.out.println(deleteFilePath);
}
}
前端
js
export function deleteFile(filePath) {
return request({
url: '/common/upload/updateTaskFile',
method: 'post',
data: filePath
})
}
// 删除附件
var deleteFilePaths = this.deleteFilePath
deleteFile(deleteFilePaths);
参数
deleteFilePath: [],