This commit is contained in:
YunaiV
2024-09-30 09:05:31 +08:00
35 changed files with 3909 additions and 1384 deletions
+4 -4
View File
@@ -2,11 +2,11 @@ import request from '@/sheep/request';
const PayOrderApi = {
// 获得支付订单
getOrder: (id) => {
getOrder: (id, sync) => {
return request({
url: '/pay/order/get',
method: 'GET',
params: { id }
params: { id, sync },
});
},
// 提交支付订单
@@ -14,9 +14,9 @@ const PayOrderApi = {
return request({
url: '/pay/order/submit',
method: 'POST',
data
data,
});
}
},
};
export default PayOrderApi;
+12
View File
@@ -13,6 +13,18 @@ const SpuApi = {
},
});
},
// 获得商品结算信息
getSettlementProduct: (spuIds) => {
return request({
url: '/trade/order/settlement-product',
method: 'GET',
params: { spuIds },
custom: {
showLoading: false,
showError: false,
},
});
},
// 获得商品 SPU 分页
getSpuPage: (params) => {
return request({
+30
View File
@@ -0,0 +1,30 @@
import request from '@/sheep/request';
const PointApi = {
// 获得积分商城活动分页
getPointActivityPage: (params) => {
return request({ url: 'promotion/point-activity/page', method: 'GET', params });
},
// 获得积分商城活动列表,基于活动编号数组
getPointActivityListByIds: (ids) => {
return request({
url: '/promotion/point-activity/list-by-ids',
method: 'GET',
params: {
ids,
},
});
},
// 获得积分商城活动明细
getPointActivity: (id) => {
return request({
url: 'promotion/point-activity/get-detail',
method: 'GET',
params: { id },
});
},
};
export default PointApi;
+15 -2
View File
@@ -53,6 +53,18 @@ const OrderApi = {
},
});
},
// 获得商品结算信息
getSettlementProduct: (spuIds) => {
return request({
url: '/trade/order/settlement-product',
method: 'GET',
params: { spuIds },
custom: {
showLoading: false,
showError: false,
},
});
},
// 创建订单
createOrder: (data) => {
return request({
@@ -61,13 +73,14 @@ const OrderApi = {
data,
});
},
// 获得订单
getOrder: (id) => {
// 获得订单详细:sync 是可选参数
getOrderDetail: (id, sync) => {
return request({
url: `/trade/order/get-detail`,
method: 'GET',
params: {
id,
sync,
},
custom: {
showLoading: false,