1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopGoods, ShopGoodsParam } from './model';
|
||||
import type { ShopGoods, ShopGoodsCollectParam, ShopGoodsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
@@ -130,3 +130,17 @@ export async function importShopGoods(file: File) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过商品链接采集入库
|
||||
*/
|
||||
export async function collectShopGoods(data: ShopGoodsCollectParam) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-goods/collect',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -152,6 +152,16 @@ export interface BathSet {
|
||||
skuNo?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品链接采集参数
|
||||
*/
|
||||
export interface ShopGoodsCollectParam {
|
||||
url: string;
|
||||
categoryId?: number;
|
||||
status?: number;
|
||||
merchantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品记录表搜索条件
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user