feat: 套餐分配生效条件选择
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 9m23s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 9m23s
This commit is contained in:
@@ -18,6 +18,7 @@ export { CarrierService } from './carrier'
|
||||
export { PackageSeriesService } from './packageSeries'
|
||||
export { PackageManageService } from './packageManage'
|
||||
export { ShopSeriesGrantService } from './shopSeriesGrant'
|
||||
export { ShopPackageAllocationService } from './shopPackageAllocation'
|
||||
export { OrderService } from './order'
|
||||
export { AssetService } from './asset'
|
||||
export { AgentRechargeService } from './agentRecharge'
|
||||
|
||||
40
src/api/modules/shopPackageAllocation.ts
Normal file
40
src/api/modules/shopPackageAllocation.ts
Normal 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
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user