import { useLoginStore, useAccountStore } from '@/stores' import http from '@/services/http' import { RequestConfig } from '@/services/http/types' 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 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: config.data, }) } /** * 资金流水查询(历史) */ export function queryHisAmountLog(config: RequestConfig = {}) { return http.commonRequest({ url: '/TaAccount/QueryHisAmountLog', params: { accountID: accountStore.currentAccountId.toString(), pageflag: 1, ...config.data }, }) } /** * 资金流水查询(当前) */ export function queryAmountLog(config: RequestConfig = {}) { return http.commonRequest({ url: '/TaAccount/QueryAmountLog', params: { accountID: accountStore.currentAccountId.toString(), pageflag: 1, ...config.data }, }) } /** * 查询托管银行扩展配置信息 */ export function queryBankCusBankExtendConfigs(config: RequestConfig = {}) { return http.commonRequest({ url: '/Bank/QueryBankCusBankExtendConfigs', params: { ...config.data }, }) }