mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 15:49:20 +08:00
feat: 拼多多商品发布(goods.add)及发布后详情入库绑定主商品
This commit is contained in:
@@ -2,7 +2,12 @@ import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
import type { PddGoodsDTO, PddGoodsVO } from './types';
|
||||
import type {
|
||||
PddGoodsDTO,
|
||||
PddGoodsPublishDTO,
|
||||
PddGoodsPublishVO,
|
||||
PddGoodsVO,
|
||||
} from './types';
|
||||
|
||||
/** 分页查询拼多多渠道商品 */
|
||||
export async function getPddGoodsPageApi(
|
||||
@@ -30,3 +35,81 @@ export async function syncPddGoodsByShopApi(pddShopId: number) {
|
||||
`/channel/pdd/goods/sync/${pddShopId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 可发布类目 */
|
||||
export async function listPddPublishCatsApi(
|
||||
data: PddGoodsPublishDTO.ShopCatQuery,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.Cat[]>(
|
||||
'/channel/pdd/goods/publish/meta/cats',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 运费模板列表 */
|
||||
export async function listPddPublishLogisticsApi(
|
||||
data: PddGoodsPublishDTO.LogisticsQuery,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.LogisticsPage>(
|
||||
'/channel/pdd/goods/publish/meta/logistics-templates',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 运费模板详情 */
|
||||
export async function getPddPublishLogisticsTemplateDetailApi(
|
||||
data: PddGoodsPublishDTO.CostTemplateDetailQuery,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.CostTemplateDetail>(
|
||||
'/channel/pdd/goods/publish/meta/logistics-template-detail',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 类目属性模板 */
|
||||
export async function getPddPublishCatTemplateApi(
|
||||
data: PddGoodsPublishDTO.CatTemplateQuery,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.CatTemplate>(
|
||||
'/channel/pdd/goods/publish/meta/cat-template',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 父规格列表 */
|
||||
export async function listPddPublishParentSpecsApi(
|
||||
data: PddGoodsPublishDTO.SpecQuery,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.ParentSpec[]>(
|
||||
'/channel/pdd/goods/publish/meta/specs',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 生成规格 ID */
|
||||
export async function createPddPublishSpecIdApi(
|
||||
data: PddGoodsPublishDTO.SpecIdCreate,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.SpecId>(
|
||||
'/channel/pdd/goods/publish/meta/spec-id',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 本系统文件转传拼多多图 */
|
||||
export async function transferPddPublishImageApi(
|
||||
data: PddGoodsPublishDTO.TransferImage,
|
||||
) {
|
||||
return requestClient.post<PddGoodsPublishVO.TransferImageResult>(
|
||||
'/channel/pdd/goods/publish/transfer-image',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 发布商品并入库 */
|
||||
export async function publishPddGoodsApi(data: PddGoodsPublishDTO.Publish) {
|
||||
return requestClient.post<PddGoodsPublishVO.PublishResult>(
|
||||
'/channel/pdd/goods/publish',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user