fix(优惠券管理):优化优惠券管理功能模块保持代码风格统一

This commit is contained in:
2025-07-21 15:25:33 +08:00
parent c5edeb7c8b
commit 2d1484897d
5 changed files with 124 additions and 56 deletions
@@ -342,11 +342,11 @@ export async function getWxMessageStatistics(params: {
// 优惠券相关接口
export async function getCouponList(params?: { [key: string]: string | number }) {
const { current, pageSize, ...rest } = params ?? {};
const result = await request<SYSTEM.Page<ORDERS.Coupon>>('/api-order/coupon/page', {
const result = await request<SYSTEM.Page<ORDERS.Coupon>>('/api-order/coupon', {
method: 'GET',
params: { current, size: pageSize, ...rest },
params: { page: current, limit: pageSize, ...rest },
});
return { data: result.data, total: result.total };
return { data: result.data, total: result.count };
}
export async function getCouponById(id: number) {