|
@@ -1,119 +1,123 @@
|
|
-import request from '@/utils/request'
|
|
|
|
|
|
+import request from "@/utils/request";
|
|
|
|
|
|
// 商品分类管理
|
|
// 商品分类管理
|
|
// /platformProductClassify/getAll 商品类别管理查询
|
|
// /platformProductClassify/getAll 商品类别管理查询
|
|
-export const getAllClass = (data) => request({
|
|
|
|
- url: '/platformProductClassify/getAll',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
-})
|
|
|
|
|
|
+export const getAllClass = (data) =>
|
|
|
|
+ request({
|
|
|
|
+ url: "/platformProductClassify/getAll",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
|
|
// /platformProductClassify/save 添加商品类别
|
|
// /platformProductClassify/save 添加商品类别
|
|
-export const createdShopClass = (data) => request({
|
|
|
|
- url: '/platformProductClassify/save',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
-})
|
|
|
|
|
|
+export const createdShopClass = (data) =>
|
|
|
|
+ request({
|
|
|
|
+ url: "/platformProductClassify/save",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
|
|
// /platformProductClassify/update 修改商品类别
|
|
// /platformProductClassify/update 修改商品类别
|
|
-export const updateClass = (data) => request({
|
|
|
|
- url: '/platformProductClassify/update',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
-})
|
|
|
|
|
|
+export const updateClass = (data) =>
|
|
|
|
+ request({
|
|
|
|
+ url: "/platformProductClassify/update",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
|
|
// /platformProductClassify/delete 删除商品类别
|
|
// /platformProductClassify/delete 删除商品类别
|
|
-export const deleteClass = (data) => request({
|
|
|
|
- url: '/platformProductClassify/delete',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
-})
|
|
|
|
|
|
+export const deleteClass = (data) =>
|
|
|
|
+ request({
|
|
|
|
+ url: "/platformProductClassify/delete",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
|
|
// /platformProductClassify/getById 商品类别编辑/查询
|
|
// /platformProductClassify/getById 商品类别编辑/查询
|
|
-export const getClassDetails = (data) => request({
|
|
|
|
- url: '/platformProductClassify/getById',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
-})
|
|
|
|
|
|
+export const getClassDetails = (data) =>
|
|
|
|
+ request({
|
|
|
|
+ url: "/platformProductClassify/getById",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
|
|
// 选品管理
|
|
// 选品管理
|
|
// 选品管理查询
|
|
// 选品管理查询
|
|
export function getClassifyGetAll(data) {
|
|
export function getClassifyGetAll(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/getAll',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/getAll",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
// /platformProduct/save 新增选品商品
|
|
// /platformProduct/save 新增选品商品
|
|
export function getClassifyAdd(data) {
|
|
export function getClassifyAdd(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/save',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/save",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// /platformProduct/update 修改选品商品
|
|
// /platformProduct/update 修改选品商品
|
|
export function getClassifyUpdate(data) {
|
|
export function getClassifyUpdate(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/update',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/update",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// /platformProduct/delete 删除商品
|
|
// /platformProduct/delete 删除商品
|
|
export function getClassifyDelete(data) {
|
|
export function getClassifyDelete(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/delete',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/delete",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// /platformProduct/start 商品上下架
|
|
// /platformProduct/start 商品上下架
|
|
export function getClassifyStart(data) {
|
|
export function getClassifyStart(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/start',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/start",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// 获取品牌列表
|
|
// 获取品牌列表
|
|
export function getBrandList() {
|
|
export function getBrandList() {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/getBrandList',
|
|
|
|
- method: 'POST'
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/getBrandList",
|
|
|
|
+ method: "POST",
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// 商品分类
|
|
// 商品分类
|
|
export function getClassify(data) {
|
|
export function getClassify(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/getClassify',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/getClassify",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
// /voucher/getAll 获取可选择的代金卷
|
|
// /voucher/getAll 获取可选择的代金卷
|
|
export function getVoucher(data) {
|
|
export function getVoucher(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/voucher/getAll',
|
|
|
|
- method: 'POST',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/voucher/getAll",
|
|
|
|
+ method: "POST",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
// // 修改商品
|
|
// // 修改商品
|
|
export function getClassifyGetById(data) {
|
|
export function getClassifyGetById(data) {
|
|
return request({
|
|
return request({
|
|
- url: '/platformProduct/getById',
|
|
|
|
- method: 'post',
|
|
|
|
- data
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/platformProduct/getById",
|
|
|
|
+ method: "post",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// // 导出商品信息
|
|
// // 导出商品信息
|
|
@@ -125,3 +129,75 @@ export function getClassifyGetById(data) {
|
|
// responseType: 'blob'
|
|
// responseType: 'blob'
|
|
// })
|
|
// })
|
|
// }
|
|
// }
|
|
|
|
+
|
|
|
|
+// 新增定价管理
|
|
|
|
+export function addFixed(data) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "/priceControl/save",
|
|
|
|
+ method: "post",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 删除定价方案
|
|
|
|
+export function delFixed(params) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "/priceControl/delete",
|
|
|
|
+ method: "delete",
|
|
|
|
+ params,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 获取单个定价方案
|
|
|
|
+export function getFixedOne(id) {
|
|
|
|
+ return request({
|
|
|
|
+ url: `/priceControl/${id}`,
|
|
|
|
+ method: "get",
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 更新定价方案
|
|
|
|
+export function updateFixed(data) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "/priceControl/update",
|
|
|
|
+ method: "put",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 获取定价方案
|
|
|
|
+export function getFixed(data) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "/priceControl/page",
|
|
|
|
+ method: "post",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// 获取我的选品列表
|
|
|
|
+export function getMyProduct(data) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "canvas/getAll",
|
|
|
|
+ method: "post",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 获取选品商家
|
|
|
|
+export function getProductMerchant(data) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "/selection/getShopAll",
|
|
|
|
+ method: "post",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 获取选品商家当前下的选品列表
|
|
|
|
+export function getProductMerchantList(data) {
|
|
|
|
+ return request({
|
|
|
|
+ url: "/selection/getProductAll",
|
|
|
|
+ method: "post",
|
|
|
|
+ data,
|
|
|
|
+ });
|
|
|
|
+}
|