import * as dictionaryServices from '@/services/api/Dictionary';
|
import { useQuery, useQueryClient } from '@tanstack/vue-query';
|
|
export function useInsureProductSettingAllList() {
|
const { data: allInsureProductSettingList, refetch } = useQuery({
|
queryKey: ['dictionaryServices/getInsureProductSettingAllList'],
|
queryFn: async () => {
|
let res = await dictionaryServices.getInsureProductSettingAllList({}, { showLoading: false });
|
return res;
|
},
|
placeholderData: () => [] as API.InsureProductSettingDto[],
|
});
|
|
return {
|
allInsureProductSettingList,
|
refetch,
|
};
|
}
|
|
export function useUserInsureProductSetting() {
|
const { data: allUserInsureProductSettingList, refetch } = useQuery({
|
queryKey: ['dictionaryServices/getUserInsureProductSetting'],
|
queryFn: async () => {
|
let res = await dictionaryServices.getUserInsureProductSetting({ showLoading: false });
|
return res;
|
},
|
placeholderData: () => [] as API.InsureProductSettingDto[],
|
});
|
|
return {
|
allUserInsureProductSettingList,
|
refetch,
|
};
|
}
|