From dd7d743197d2cbb2aa0626a55d3a8cc20cce4295 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 24 二月 2025 13:14:26 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentFront

---
 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