feat: 套餐分配生效条件选择
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 9m23s

This commit is contained in:
luo
2026-07-22 14:21:15 +08:00
parent fbfdd01eec
commit 68aa03b538
11 changed files with 500 additions and 90 deletions

View File

@@ -0,0 +1,40 @@
/**
* 店铺套餐分配 API 服务
*/
import { BaseService } from '../BaseService'
import type {
BaseResponse,
CreateShopPackageAllocationRequest,
ShopPackageAllocationResponse,
UpdateShopPackageAllocationExpiryBaseRequest
} from '@/types/api'
export class ShopPackageAllocationService extends BaseService {
/**
* 创建店铺套餐分配
* POST /api/admin/shop-package-allocations
*/
static createShopPackageAllocation(
data: CreateShopPackageAllocationRequest
): Promise<BaseResponse<ShopPackageAllocationResponse>> {
return this.post<BaseResponse<ShopPackageAllocationResponse>>(
'/api/admin/shop-package-allocations',
data
)
}
/**
* 更新店铺套餐分配生效条件
* PATCH /api/admin/shop-package-allocations/{id}/expiry-base
*/
static updateShopPackageAllocationExpiryBase(
id: number,
data: UpdateShopPackageAllocationExpiryBaseRequest
): Promise<BaseResponse<ShopPackageAllocationResponse>> {
return this.patch<BaseResponse<ShopPackageAllocationResponse>>(
`/api/admin/shop-package-allocations/${id}/expiry-base`,
data
)
}
}