| | |
| | | PhoneParValueResponse, |
| | | QueryLifePayOrderListInput, |
| | | LifeRechargeConstants, |
| | | } from '../utils'; |
| | | ElectricParValueResponse, |
| | | ElectricSupportAreaResponse, |
| | | } from '@life-payment/core-vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { computed, MaybeRef, reactive, unref } from 'vue'; |
| | | import { useInfiniteLoading } from './infiniteLoading'; |
| | |
| | | }; |
| | | } |
| | | |
| | | export function useGetElectricParValue() { |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { data: electricParValueList, isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getElectricSupportArea'], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getElectricSupportArea({ showLoading: false }); |
| | | }, |
| | | select(data) { |
| | | return data.electricAreaList ?? []; |
| | | }, |
| | | placeholderData: () => ({} as ElectricSupportAreaResponse), |
| | | }); |
| | | |
| | | return { |
| | | electricParValueList, |
| | | }; |
| | | } |
| | | |
| | | export type UseGetUserLifePayOrderPageOptions = { |
| | | lifePayOrderType?: MaybeRef<LifeRechargeConstants.LifePayOrderTypeEnum>; |
| | | }; |