This commit is contained in:
2025-12-25 19:02:48 +08:00
19 changed files with 3857 additions and 1600 deletions

View File

@@ -5,7 +5,7 @@ const request = http.request
* 获取商品分页
* @returns
*/
export function getProductPage(data, urlType = 'product' ,showLoading) {
export function getProductPage(data, urlType = 'product', showLoading) {
return request({
url: `${urlType}/admin/product/page`,
method: "GET",
@@ -20,7 +20,7 @@ export function getProductPage(data, urlType = 'product' ,showLoading) {
* 获取商品列表
* @returns
*/
export function getProductList(data, urlType = 'product' ,showLoading) {
export function getProductList(data, urlType = 'product', showLoading) {
return request({
url: `${urlType}/admin/product/list`,
method: "GET",
@@ -36,11 +36,11 @@ export function getProductList(data, urlType = 'product' ,showLoading) {
* 获取商品详情
* @returns
*/
export function getProductDetail (id, urlType = 'product') {
export function getProductDetail(id, urlType = 'product') {
return request({
url: `${urlType}/admin/product/${id}`,
method: "GET",
})
}
@@ -73,7 +73,7 @@ export function delProduct(id, urlType = 'product') {
* 商品上下架
* @returns
*/
export function productOnOff (data, urlType = 'product') {
export function productOnOff(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/onOff`,
method: "POST",
@@ -87,7 +87,7 @@ export function productOnOff (data, urlType = 'product') {
* 商品售罄
* @returns
*/
export function productMarkIsSoldOut (data, urlType = 'product') {
export function productMarkIsSoldOut(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/markIsSoldOut`,
method: "POST",
@@ -262,7 +262,7 @@ export function delSpec(id, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/spec/${id}`,
method: "DELETE",
})
}
@@ -343,4 +343,28 @@ export function delProdGroup(id, urlType = 'product') {
url: `${urlType}/admin/prod/group/${id}`,
method: "DELETE",
})
}
/**
* 入库单识别
* @returns
*/
export function stockOcr(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/stock/ocr`,
method: "post",
data
})
}
/**
* ocr识别结果
* @returns
*/
export function ocrResult(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/stock/ocrResult`,
method: "get",
data
})
}

View File

@@ -15,6 +15,18 @@ export function getVendorPage(data, urlType = 'product') {
})
}
/**
* 获取供应商列表/无分页
* @returns
*/
export function getVendorList(urlType = 'product') {
return request({
url: `${urlType}/admin/product/vendor/list`,
method: "GET"
})
}
/**
* 添加供应商
* @returns
@@ -52,5 +64,4 @@ export function delVendor(id, urlType = 'product') {
url: `${urlType}/admin/product/vendor/${id}`,
method: "DELETE",
})
}
}

View File

@@ -122,6 +122,17 @@ export function checkout(data) {
})
}
/**
* 拼团商品:拼团商品详情
* @param {Object} data
*/
export function wareDetail(data) {
return request({
url: `${ORDER_URL}/admin/ware/ware/detail`,
method: "get",
data
})
}
/**
* 套餐推广:添加套餐
@@ -274,4 +285,19 @@ export function packageCheckout(data) {
method: 'post',
data
});
}
/**
* 套餐推广:获取套餐详情
* @param {*} data
* @returns
*/
export function packageDetail(data) {
return request({
url: `${Market_BaseUrl}/admin/package/detail/${data.id}`,
method: 'GET',
data: {
shopId: data.shopId
}
});
}