From 3ee683d6b002f098e5b7fed11b54615126d82a3c Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 24 二月 2025 10:57:26 +0800 Subject: [PATCH] fix: 对接 --- packages/components/src/hooks/index.ts | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/packages/components/src/hooks/index.ts b/packages/components/src/hooks/index.ts index 687cb7c..5071f6a 100644 --- a/packages/components/src/hooks/index.ts +++ b/packages/components/src/hooks/index.ts @@ -5,7 +5,8 @@ PhoneParValueResponse, QueryLifePayOrderListInput, LifeRechargeConstants, -} from '../utils'; + ElectricParValueResponse, +} from '@life-payment/core-vue'; import { useQuery } from '@tanstack/vue-query'; import { computed, MaybeRef, reactive, unref } from 'vue'; import { useInfiniteLoading } from './infiniteLoading'; @@ -62,6 +63,25 @@ }; } +export function useGetElectricParValue() { + const { blLifeRecharge } = useLifeRechargeContext(); + + const { data: electricParValueList, isLoading } = useQuery({ + queryKey: ['blLifeRecharge/getElectricParValue'], + queryFn: async () => { + return await blLifeRecharge.services.getElectricParValue({ showLoading: false }); + }, + select(data) { + return data.electricParValue ?? []; + }, + placeholderData: () => ({} as ElectricParValueResponse), + }); + + return { + electricParValueList, + }; +} + export type UseGetUserLifePayOrderPageOptions = { lifePayOrderType?: MaybeRef<LifeRechargeConstants.LifePayOrderTypeEnum>; }; -- Gitblit v1.9.1