From 1d472eb06970c85b0edfb58871956bc2c8d69916 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 25 十二月 2025 17:44:46 +0800
Subject: [PATCH] fix: 甲方小程序
---
apps/housekeepingMiniApp/src/hooks/enterprise.ts | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/apps/housekeepingMiniApp/src/hooks/enterprise.ts b/apps/housekeepingMiniApp/src/hooks/enterprise.ts
index 1592700..b078d1f 100644
--- a/apps/housekeepingMiniApp/src/hooks/enterprise.ts
+++ b/apps/housekeepingMiniApp/src/hooks/enterprise.ts
@@ -1,13 +1,15 @@
-import { useInfiniteLoading } from '@12333/hooks';
+import { BaseData, useInfiniteLoading } from '@12333/hooks';
import Taro from '@tarojs/taro';
import * as enterpriseServices from '@12333/services/apiV2/enterprise';
+import { InfiniteData } from '@tanstack/vue-query';
type UseEnterpriseAddressesOptions = {
rows?: number;
+ onSuccess?: (data: InfiniteData<BaseData<API.GetEnterpriseAddressesQueryResultItem>>) => any;
};
export function useEnterpriseAddresses(options: UseEnterpriseAddressesOptions = {}) {
- const { rows = 20 } = options;
+ const { rows = 20, onSuccess } = options;
const { infiniteLoadingProps, invalidateQueries } = useInfiniteLoading(
({ pageParam }) => {
@@ -24,6 +26,9 @@
},
{
queryKey: ['enterpriseServices/getEnterpriseAddresses', rows],
+ onSuccess(data) {
+ onSuccess?.(data);
+ },
}
);
--
Gitblit v1.10.0