|  |  |  | 
|---|
|  |  |  | // import * as settingServices from '@12333/services/api/Setting'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  | import { MaybeRef, Ref, unref } from 'vue'; | 
|---|
|  |  |  | import { MaybeRef, Ref, unref, ref } from 'vue'; | 
|---|
|  |  |  | import { BusinessSettingType, TempFolderPath } from '@12333/constants'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | type UseBusinessSettingByTypeOptions<T extends object = object, TData = T> = { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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, | 
|---|
|  |  |  | //     }; | 
|---|
|  |  |  | //   }, | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const businessSetting = ref({ | 
|---|
|  |  |  | authenticationHelpUrl: '', | 
|---|
|  |  |  | receivingAccount: '', | 
|---|
|  |  |  | receivingCompanyName: '', | 
|---|
|  |  |  | receivingBankName: '', | 
|---|
|  |  |  | offlinePayEndTime: '', | 
|---|
|  |  |  | offlinePayEndDays: 1, | 
|---|
|  |  |  | enterprisePowerAttorneyTempPath: `${TempFolderPath}`, | 
|---|
|  |  |  | idPhoteTempPath: `${TempFolderPath}`, | 
|---|
|  |  |  | payAmount: 123, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | userCertificationSetting: businessSetting, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|