This commit is contained in:
2026-06-16 10:37:40 +08:00
parent e4f9eedb80
commit e1d99b8ccf
17 changed files with 2197 additions and 666 deletions

View File

@@ -130,3 +130,19 @@ export async function importShopGoods(file: File) {
}
return Promise.reject(new Error(res.data.message));
}
/**
* 导入商品图片
*/
export async function importShopGoodsImages(file: File) {
const formData = new FormData();
formData.append('file', file);
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/shop/shop-goods/import/images',
formData
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -14,6 +14,8 @@ export interface ShopGoodsCategory {
type?: number;
// 分类图片
image?: string;
// 广告图
adImage?: string;
// 上级分类ID
parentId?: number;
// 路由/链接地址