import { v4 } from 'uuid' import { RequestConfig } from '@/services/http/types' import { useLoginStore, useAccountStore } from '@/stores' import http from '@/services/http' const loginStore = useLoginStore() const accountStore = useAccountStore() /** * 账户资金信息请求 */ export function accountFundInfoReq(config: RequestConfig) { return http.mqRequest({ data: config.data, requestCode: 'AccountFundInfoReq', responseCode: 'AccountFundInfoRsp', }) } /** * 银行签约 */ export function t2bBankSign(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 't2bBankSignReq', responseCode: 't2bBankSignRsp', }) } /** * 短信验证码请求 */ export function t2bSMSVerificationCode(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 't2bSMSVerificationCodeReq', responseCode: 't2bSMSVerificationCodeRsp', }) } /** * 银行解约 */ export function t2bBankCancelSign(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 't2bBankCancelSignReq', responseCode: 't2bBankCancelSignRsp', }) } /** * 出金申请 */ export function t2bBankWithdraw(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 't2bBankWithdrawReq', responseCode: 't2bBankWithdrawRsp', }) } /** * 入金申请 */ export function t2bBankDeposit(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 't2bBankDepositReq', responseCode: 't2bBankDepositRsp', }) } /** * 云缴费代扣入金申请 */ export function YJF_WithholdInApply(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 'YJF_WithholdInApplyReq', responseCode: 'YJF_WithholdInApplyRsp', }) } /** * 云缴费代扣解约 */ export function YJF_WithholdSignOut(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 'YJF_WithholdSignOutReq', responseCode: 'YJF_WithholdSignOutRsp', }) } /** * 云缴费代扣签约 */ export function YJF_WithholdSignInSMS(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 'YJF_WithholdSignInSMSReq', responseCode: 'YJF_WithholdSignInSMSRsp', }) } /** * 云缴费获取代扣签约短信验证码 */ export function YJF_GetWithholdSignInSMSVCode(config: RequestConfig>) { return http.mqRequest({ data: config.data, requestCode: 'YJF_GetWithholdSignInSMSVCodeReq', responseCode: 'YJF_GetWithholdSignInSMSVCodeRsp', }) } /** * 数字账户转入转出申请 */ export function DigitalAccountTransferApply(config: RequestConfig>) { return http.mqRequest({ data: { OperateSrc: 2, ClientTicket: v4(), ...config.data }, requestCode: 'DigitalAccountTransferApplyReq', responseCode: 'DigitalAccountTransferApplyRsp', marketId: 19 }) } /** * 查询托管银行 */ export function queryCusBankSignBank(config: RequestConfig = {}) { return http.commonRequest({ url: '/Qhj/QueryCusBankSignBank', params: config.data, }) } /** * 查询开户行 */ export function queryBankInfo(config: RequestConfig = {}) { return http.commonRequest({ url: '/Qhj/QueryBankInfo', params: config.data, }) } /** * 查询签约银行信息(出金账户管理) */ export function queryBankAccountSign(config: RequestConfig = {}) { return http.commonRequest({ url: '/Qhj/QueryBankAccountSign', params: { userid: loginStore.userId, ...config.data }, }) } /** * 查询充值出金 */ export function queryAccountInOutApply(config: RequestConfig = {}) { return http.commonRequest({ url: '/Qhj/QueryAccountInOutApply', params: { userid: loginStore.userId, ...config.data }, }) } /** * 获取银行支付地址 */ export function getAmtInByPaidUrl(config: RequestConfig = {}) { return http.commonRequest({ url: '/Bank/GetAmtInByPaidUrl', params: { accountid: accountStore.currentAccountId, ...config.data }, }) } /** * 资金流水查询(历史) */ export function queryHisAmountLog(config: RequestConfig = {}) { return http.commonRequest({ url: '/TaAccount/QueryHisAmountLog', params: { accountID: accountStore.currentAccountId.toString(), ...config.data }, }) } /** * 资金流水查询(当前) */ export function queryAmountLog(config: RequestConfig = {}) { return http.commonRequest({ url: '/TaAccount/QueryAmountLog', params: { accountID: accountStore.currentAccountId.toString(), ...config.data }, }) } /** * 查询托管银行扩展配置信息 */ export function queryBankCusBankExtendConfigs(config: RequestConfig = {}) { return http.commonRequest({ url: '/Bank/QueryBankCusBankExtendConfigs', params: { ...config.data }, }) } /** * 查询银行支行联行号信息表 */ export function queryBankBranChnumInfo(config: RequestConfig = {}) { return http.commonRequest({ url: '/Bank/QueryBankBranChnumInfo', params: config.data, }) } /** * 获取代扣签约信息表 */ export function queryGetGtwithholdsigninfo(config: RequestConfig = {}) { return http.commonRequest({ url: '/TaAccount/GetGtwithholdsigninfo', params: { userid: loginStore.userId, ...config.data }, }) } /** * 查询代扣入金申请表 */ export function queryGtwithholddepositapply(config: RequestConfig = {}) { return http.commonRequest({ url: '/TaAccount/QueryGtwithholddepositapply', params: { userid: loginStore.userId, ...config.data } }) } /** * 查询所属机构托管银行 */ export function queryMemberCusBankInfo(config: RequestConfig = {}) { return http.commonRequest({ url: '/Qhj/QueryMemberCusBankInfo', params: { userid: loginStore.userId, ...config.data }, }) } /** * 获取支付中心混合支付渠道配置信息列表 */ export function getHybridConfigs(config: RequestConfig = {}) { return http.commonRequest({ url: '/Bank/GetHybridConfigs', params: config.data, }) } /** * 查询混合支付出金接收者信息 */ export function queryHybridReceiverOnboards(config: RequestConfig = {}) { return http.commonRequest({ url: '/Bank/QueryHybridReceiverOnboards', params: config.data, }) }