Commit d6d5b9a6f04958d5afa9c4fa7df0ff585a4194f1

Authored by xp.Huang
2 parents 756b7d6c 2514e59f

Merge branch 'fix/oss-delete/06-21' into 'main_dev'

fix: 修复删除图片接口,如果未传值,查询参数值携带undefined问题

See merge request yunteng/thingskit-front!1386
@@ -11,7 +11,9 @@ export const upload = (file) => { @@ -11,7 +11,9 @@ export const upload = (file) => {
11 }; 11 };
12 12
13 export const deleteFilePath = (deleteFilePath?: string) => { 13 export const deleteFilePath = (deleteFilePath?: string) => {
  14 + let deleteParams: string | null = null;
  15 + if (deleteFilePath) deleteParams = `?deleteFilePath=${deleteFilePath}`;
14 return defHttp.delete({ 16 return defHttp.delete({
15 - url: `${Api.BaseDeleteUrl}?deleteFilePath=${deleteFilePath}`, 17 + url: `${Api.BaseDeleteUrl}${deleteParams}`,
16 }); 18 });
17 }; 19 };