Commit 2514e59fdb9f45596d3b7f9c79335c6b5c3dc6fe
Committed by
xp.Huang
1 parent
756b7d6c
fix: 修复删除图片接口,如果未传值,查询参数值携带undefined问题
Showing
1 changed file
with
3 additions
and
1 deletions
... | ... | @@ -11,7 +11,9 @@ export const upload = (file) => { |
11 | 11 | }; |
12 | 12 | |
13 | 13 | export const deleteFilePath = (deleteFilePath?: string) => { |
14 | + let deleteParams: string | null = null; | |
15 | + if (deleteFilePath) deleteParams = `?deleteFilePath=${deleteFilePath}`; | |
14 | 16 | return defHttp.delete({ |
15 | - url: `${Api.BaseDeleteUrl}?deleteFilePath=${deleteFilePath}`, | |
17 | + url: `${Api.BaseDeleteUrl}${deleteParams}`, | |
16 | 18 | }); |
17 | 19 | }; | ... | ... |