fix(useDeleteFile): 修正删除文件接口路径及请求方法
- 将单个文件删除接口路径从 getDelete 改为 delete - 将批量文件删除接口路径从 getIds 改为 ids - 将请求方法从 GET 修改为 DELETE - 保持删除请求逻辑不变,确保正确触发删除操作1.0
parent
9c82b16789
commit
715b2c8d72
|
|
@ -74,9 +74,9 @@ function useDeleteFile(returnType = "object") {
|
|||
// 发送请求
|
||||
request(
|
||||
single
|
||||
? `/${getBaseGateway()}/imgFiles/getDelete?filePath=${files[0].filePath}`
|
||||
: `/${getBaseGateway()}/imgFiles/getIds?ids=${files.filter(f => f.id).map(f => f.id)}`,
|
||||
"get",
|
||||
? `/${getBaseGateway()}/imgFiles/delete?filePath=${files[0].filePath}`
|
||||
: `/${getBaseGateway()}/imgFiles/ids?ids=${files.filter(f => f.id).map(f => f.id)}`,
|
||||
"delete",
|
||||
)
|
||||
.then((res) => {
|
||||
resolve(res.data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue