From 6887129e91d32557c2b57178180329f46df09d12 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 10 三月 2025 13:23:49 +0800
Subject: [PATCH] feat: api
---
packages/hooks/setting.ts | 78 +++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/packages/hooks/setting.ts b/packages/hooks/setting.ts
index 3d6925c..a47f58d 100644
--- a/packages/hooks/setting.ts
+++ b/packages/hooks/setting.ts
@@ -1,4 +1,4 @@
-import * as settingServices from '@12333/services/api/Setting';
+// import * as settingServices from '@12333/services/api/Setting';
import { useQuery } from '@tanstack/vue-query';
import { MaybeRef, Ref, unref } from 'vue';
import { BusinessSettingType, TempFolderPath } from '@12333/constants';
@@ -8,30 +8,30 @@
select?: (data: T) => TData;
};
-export function useBusinessSettingByType<T extends object = object, TData = T>(
- options: UseBusinessSettingByTypeOptions = {}
-) {
- const { type, select } = options;
+// export function useBusinessSettingByType<T extends object = object, TData = T>(
+// options: UseBusinessSettingByTypeOptions = {}
+// ) {
+// const { type, select } = options;
- const { data: businessSetting } = useQuery({
- queryKey: ['settingServices/getBusinessSettingByType', type],
- queryFn: async () => {
- return await settingServices.getBusinessSettingByType(
- {
- type: unref(type),
- },
- { showLoading: false }
- );
- },
- placeholderData: () => ({} as T),
- staleTime: Infinity,
- select,
- });
+// const { data: businessSetting } = useQuery({
+// queryKey: ['settingServices/getBusinessSettingByType', type],
+// queryFn: async () => {
+// return await settingServices.getBusinessSettingByType(
+// {
+// type: unref(type),
+// },
+// { showLoading: false }
+// );
+// },
+// placeholderData: () => ({} as T),
+// staleTime: Infinity,
+// select,
+// });
- return {
- businessSetting: businessSetting as Ref<TData>,
- };
-}
+// return {
+// businessSetting: businessSetting as Ref<TData>,
+// };
+// }
type UserCertificationSetting = {
enterprisePowerAttorneyTempPath: string;
@@ -45,19 +45,19 @@
offlinePayEndDays: number;
};
-export function useUserCertificationSetting() {
- const { businessSetting } = useBusinessSettingByType<UserCertificationSetting>({
- type: BusinessSettingType.UserCertification,
- select(data: any) {
- return {
- ...data,
- enterprisePowerAttorneyTempPath: `${TempFolderPath}${data.enterprisePowerAttorneyTempPath}`,
- idPhoteTempPath: `${TempFolderPath}${data.idPhoteTempPath}`,
- payAmount: data.userCertificationAmount,
- };
- },
- });
- return {
- userCertificationSetting: businessSetting,
- };
-}
+// export function useUserCertificationSetting() {
+// const { businessSetting } = useBusinessSettingByType<UserCertificationSetting>({
+// type: BusinessSettingType.UserCertification,
+// select(data: any) {
+// return {
+// ...data,
+// enterprisePowerAttorneyTempPath: `${TempFolderPath}${data.enterprisePowerAttorneyTempPath}`,
+// idPhoteTempPath: `${TempFolderPath}${data.idPhoteTempPath}`,
+// payAmount: data.userCertificationAmount,
+// };
+// },
+// });
+// return {
+// userCertificationSetting: businessSetting,
+// };
+// }
--
Gitblit v1.9.1