| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- 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<Proto.AccountFundInfoReq>) {
- return http.mqRequest<Proto.AccountFundInfoRsp>({
- data: config.data,
- requestCode: 'AccountFundInfoReq',
- responseCode: 'AccountFundInfoRsp',
- })
- }
- /**
- * 银行签约
- */
- export function t2bBankSign(config: RequestConfig<Partial<Proto.t2bBankSignReq>>) {
- return http.mqRequest<Proto.t2bBankSignRsp>({
- data: config.data,
- requestCode: 't2bBankSignReq',
- responseCode: 't2bBankSignRsp',
- })
- }
- /**
- * 短信验证码请求
- */
- export function t2bSMSVerificationCode(config: RequestConfig<Partial<Proto.t2bSWSVerificationCodeReq>>) {
- return http.mqRequest<Proto.t2bSWSVerificationCodeRsp>({
- data: config.data,
- requestCode: 't2bSMSVerificationCodeReq',
- responseCode: 't2bSMSVerificationCodeRsp',
- })
- }
- /**
- * 银行解约
- */
- export function t2bBankCancelSign(config: RequestConfig<Partial<Proto.t2bBankCancelSignReq>>) {
- return http.mqRequest<Proto.t2bBankCancelSignRsp>({
- data: config.data,
- requestCode: 't2bBankCancelSignReq',
- responseCode: 't2bBankCancelSignRsp',
- })
- }
- /**
- * 出金申请
- */
- export function t2bBankWithdraw(config: RequestConfig<Partial<Proto.t2bBankWithdrawReq>>) {
- return http.mqRequest<Proto.t2bBankWithdrawRsp>({
- data: config.data,
- requestCode: 't2bBankWithdrawReq',
- responseCode: 't2bBankWithdrawRsp',
- })
- }
- /**
- * 入金申请
- */
- export function t2bBankDeposit(config: RequestConfig<Partial<Proto.t2bBankDepositReq>>) {
- return http.mqRequest<Proto.t2bBankDepositRsp>({
- data: config.data,
- requestCode: 't2bBankDepositReq',
- responseCode: 't2bBankDepositRsp',
- })
- }
- /**
- * 云缴费代扣入金申请
- */
- export function YJF_WithholdInApply(config: RequestConfig<Partial<Proto.YJF_WithholdInApplyReq>>) {
- return http.mqRequest<Proto.YJF_WithholdInApplyRsp>({
- data: config.data,
- requestCode: 'YJF_WithholdInApplyReq',
- responseCode: 'YJF_WithholdInApplyRsp',
- })
- }
- /**
- * 云缴费代扣解约
- */
- export function YJF_WithholdSignOut(config: RequestConfig<Partial<Proto.YJF_WithholdSignOutReq>>) {
- return http.mqRequest<Proto.YJF_WithholdSignOutRsp>({
- data: config.data,
- requestCode: 'YJF_WithholdSignOutReq',
- responseCode: 'YJF_WithholdSignOutRsp',
- })
- }
- /**
- * 云缴费代扣签约
- */
- export function YJF_WithholdSignInSMS(config: RequestConfig<Partial<Proto.YJF_WithholdSignInSMSReq>>) {
- return http.mqRequest<Proto.YJF_WithholdSignInSMSRsp>({
- data: config.data,
- requestCode: 'YJF_WithholdSignInSMSReq',
- responseCode: 'YJF_WithholdSignInSMSRsp',
- })
- }
- /**
- * 云缴费获取代扣签约短信验证码
- */
- export function YJF_GetWithholdSignInSMSVCode(config: RequestConfig<Partial<Proto.YJF_GetWithholdSignInSMSVCodeReq>>) {
- return http.mqRequest<Proto.YJF_GetWithholdSignInSMSVCodeRsp>({
- data: config.data,
- requestCode: 'YJF_GetWithholdSignInSMSVCodeReq',
- responseCode: 'YJF_GetWithholdSignInSMSVCodeRsp',
- })
- }
- /**
- * 数字账户转入转出申请
- */
- export function DigitalAccountTransferApply(config: RequestConfig<Partial<Proto.DigitalAccountTransferApplyReq>>) {
- return http.mqRequest<Proto.DigitalAccountTransferApplyRsp>({
- data: {
- OperateSrc: 2,
- ClientTicket: v4(),
- ...config.data
- },
- requestCode: 'DigitalAccountTransferApplyReq',
- responseCode: 'DigitalAccountTransferApplyRsp',
- marketId: 19
- })
- }
- /**
- * 查询托管银行
- */
- export function queryCusBankSignBank(config: RequestConfig = {}) {
- return http.commonRequest<Model.CusBankSignBankRsp[]>({
- url: '/Qhj/QueryCusBankSignBank',
- params: config.data,
- })
- }
- /**
- * 查询开户行
- */
- export function queryBankInfo(config: RequestConfig = {}) {
- return http.commonRequest<Model.BankInfoRsp[]>({
- url: '/Qhj/QueryBankInfo',
- params: config.data,
- })
- }
- /**
- * 查询签约银行信息(出金账户管理)
- */
- export function queryBankAccountSign(config: RequestConfig<Model.BankAccountSignReq> = {}) {
- return http.commonRequest<Model.BankAccountSignRsp[]>({
- url: '/Qhj/QueryBankAccountSign',
- params: {
- userid: loginStore.userId,
- ...config.data
- },
- })
- }
- /**
- * 查询充值出金
- */
- export function queryAccountInOutApply(config: RequestConfig<Model.AccountInOutApplyReq> = {}) {
- return http.commonRequest<Model.AccountOutInApplyRsp[]>({
- url: '/Qhj/QueryAccountInOutApply',
- params: {
- userid: loginStore.userId,
- ...config.data
- },
- })
- }
- /**
- * 获取银行支付地址
- */
- export function getAmtInByPaidUrl(config: RequestConfig<Model.AmtInByPaidUrlReq> = {}) {
- return http.commonRequest<Model.AmtInByPaidUrlRsp>({
- url: '/Bank/GetAmtInByPaidUrl',
- params: {
- accountid: accountStore.currentAccountId,
- ...config.data
- },
- })
- }
- /**
- * 资金流水查询(历史)
- */
- export function queryHisAmountLog(config: RequestConfig<Model.HisAmountLogReq> = {}) {
- return http.commonRequest<Model.HisAmountLogRsp[]>({
- url: '/TaAccount/QueryHisAmountLog',
- params: {
- accountID: accountStore.currentAccountId.toString(),
- ...config.data
- },
- })
- }
- /**
- * 资金流水查询(当前)
- */
- export function queryAmountLog(config: RequestConfig<Model.AmountLogReq> = {}) {
- return http.commonRequest<Model.AmountLogRsp[]>({
- url: '/TaAccount/QueryAmountLog',
- params: {
- accountID: accountStore.currentAccountId.toString(),
- ...config.data
- },
- })
- }
- /**
- * 查询托管银行扩展配置信息
- */
- export function queryBankCusBankExtendConfigs(config: RequestConfig<Model.BankCusBankExtendConfigReq> = {}) {
- return http.commonRequest<Model.BankCusBankExtendConfigRsp[]>({
- url: '/Bank/QueryBankCusBankExtendConfigs',
- params: {
- ...config.data
- },
- })
- }
- /**
- * 查询银行支行联行号信息表
- */
- export function queryBankBranChnumInfo(config: RequestConfig<Model.BankBranChnumInfoReq> = {}) {
- return http.commonRequest<Model.BankBranChnumInfoRsp[]>({
- url: '/Bank/QueryBankBranChnumInfo',
- params: config.data,
- })
- }
- /**
- * 获取代扣签约信息表
- */
- export function queryGetGtwithholdsigninfo(config: RequestConfig<Model.GTWithHoldSignInfoReq> = {}) {
- return http.commonRequest<Model.GTWithHoldSignInfoRsp[]>({
- url: '/TaAccount/GetGtwithholdsigninfo',
- params: {
- userid: loginStore.userId,
- ...config.data
- },
- })
- }
- /**
- * 查询代扣入金申请表
- */
- export function queryGtwithholddepositapply(config: RequestConfig<Model.GTWithHoldDepositApplyReq> = {}) {
- return http.commonRequest<Model.GTWithHoldDepositApplyRsp[]>({
- url: '/TaAccount/QueryGtwithholddepositapply',
- params: {
- userid: loginStore.userId,
- ...config.data
- }
- })
- }
- /**
- * 查询所属机构托管银行
- */
- export function queryMemberCusBankInfo(config: RequestConfig<Model.BankAccountSignReq> = {}) {
- return http.commonRequest<Model.CusBankSignBankRsp[]>({
- url: '/Qhj/QueryMemberCusBankInfo',
- params: {
- userid: loginStore.userId,
- ...config.data
- },
- })
- }
- /**
- * 获取支付中心混合支付渠道配置信息列表
- */
- export function getHybridConfigs(config: RequestConfig = {}) {
- return http.commonRequest<Model.PaymentCenterHybridConfigs[]>({
- url: '/Bank/GetHybridConfigs',
- params: config.data,
- })
- }
- /**
- * 查询混合支付出金接收者信息
- */
- export function queryHybridReceiverOnboards(config: RequestConfig = {}) {
- return http.commonRequest<Model.HybridReceiverOnboard[]>({
- url: '/Bank/QueryHybridReceiverOnboards',
- params: config.data,
- })
- }
|