remove customer package
This commit is contained in:
+2
-11
@@ -1,6 +1,6 @@
|
||||
import { axios } from "timi-web-api";
|
||||
import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store";
|
||||
import type { CustomerPackagePage, GaoCustomerPackage, GaoPackageConfig, PackageConfigPage, PackagePageResult, PackagePurchaseRequest } from "@/types/Package";
|
||||
import type { GaoCustomerPackage, GaoPackageConfig, PackageConfigPage, PackagePageResult, PackagePurchaseRequest } from "@/types/Package";
|
||||
|
||||
const CONFIG_URI = "/gao/package/config";
|
||||
const CUSTOMER_PACKAGE_URI = "/gao/customer/package";
|
||||
@@ -23,17 +23,8 @@ async function configUpdate(config: GaoPackageConfig): Promise<void> {
|
||||
async function configRemove(id: string): Promise<void> {
|
||||
await axios.post(`${CONFIG_URI}/delete`, undefined, { params: { id } });
|
||||
}
|
||||
async function customerPackageList(page: CustomerPackagePage): Promise<PackagePageResult<GaoCustomerPackage>> {
|
||||
return await axios.post(`${CUSTOMER_PACKAGE_URI}/list`, withCurrentStoreId(page));
|
||||
}
|
||||
async function customerPackageDetail(id: string): Promise<GaoCustomerPackage> {
|
||||
return await axios.post(`${CUSTOMER_PACKAGE_URI}/detail`, undefined, { params: { id } });
|
||||
}
|
||||
async function purchase(request: PackagePurchaseRequest): Promise<GaoCustomerPackage> {
|
||||
return await axios.post(`${CUSTOMER_PACKAGE_URI}/purchase`, request);
|
||||
}
|
||||
async function cancel(customerPackageId: string, reason: string): Promise<GaoCustomerPackage> {
|
||||
return await axios.post(`${CUSTOMER_PACKAGE_URI}/cancel`, { customerPackageId, reason });
|
||||
}
|
||||
|
||||
export default { configList, configListValid, configDetail, configCreate, configUpdate, configRemove, customerPackageList, customerPackageDetail, purchase, cancel };
|
||||
export default { configList, configListValid, configDetail, configCreate, configUpdate, configRemove, purchase };
|
||||
|
||||
Reference in New Issue
Block a user