| | |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { useLifeRechargeContext, CreateEditPayChannelsInput } from '@life-payment/core-vue'; |
| | | import { MaybeRef } from 'vue'; |
| | | |
| | | export function useOnlineService() { |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | |
| | | } |
| | | |
| | | type UseLifePayChannlesAllListOptions = { |
| | | params?: MaybeRef<API.QueryLifePayChannlesInput>; |
| | | onSuccess?: (data: API.CreateEditPayChannelsInput[]) => any; |
| | | }; |
| | | |
| | | export function useLifePayChannlesAllList(options: UseLifePayChannlesAllListOptions = {}) { |
| | | const { onSuccess } = options; |
| | | const { onSuccess, params = {} } = options; |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | |
| | | isLoading, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getLifePayChannlesAllList'], |
| | | queryKey: ['blLifeRecharge/getLifePayChannlesAllList', params], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getLifePayChannlesAllList({ |
| | | return await blLifeRecharge.services.getLifePayChannlesAllList(unref(params), { |
| | | showLoading: false, |
| | | }); |
| | | }, |