diff --git a/src/api/PackageAPI.ts b/src/api/PackageAPI.ts index 0c3b019..a5d7ac5 100644 --- a/src/api/PackageAPI.ts +++ b/src/api/PackageAPI.ts @@ -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 { async function configRemove(id: string): Promise { await axios.post(`${CONFIG_URI}/delete`, undefined, { params: { id } }); } -async function customerPackageList(page: CustomerPackagePage): Promise> { - return await axios.post(`${CUSTOMER_PACKAGE_URI}/list`, withCurrentStoreId(page)); -} -async function customerPackageDetail(id: string): Promise { - return await axios.post(`${CUSTOMER_PACKAGE_URI}/detail`, undefined, { params: { id } }); -} async function purchase(request: PackagePurchaseRequest): Promise { return await axios.post(`${CUSTOMER_PACKAGE_URI}/purchase`, request); } -async function cancel(customerPackageId: string, reason: string): Promise { - 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 }; diff --git a/src/pages/customer/CustomerDetail.vue b/src/pages/customer/CustomerDetail.vue index 5652fd0..9ff81f9 100644 --- a/src/pages/customer/CustomerDetail.vue +++ b/src/pages/customer/CustomerDetail.vue @@ -52,7 +52,19 @@ v-entrance-transition="210" @edit="openTagSelector" /> - + + + + + + + + +