| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- 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<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 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: config.data,
- })
- }
- /**
- * 资金流水查询(历史)
- */
- export function queryHisAmountLog(config: RequestConfig<Model.HisAmountLogReq> = {}) {
- return http.commonRequest<Model.HisAmountLogRsp[]>({
- url: '/TaAccount/QueryHisAmountLog',
- params: {
- accountID: accountStore.currentAccountId.toString(),
- pageflag: 1,
- ...config.data
- },
- })
- }
- /**
- * 资金流水查询(当前)
- */
- export function queryAmountLog(config: RequestConfig<Model.AmountLogReq> = {}) {
- return http.commonRequest<Model.AmountLogRsp[]>({
- url: '/TaAccount/QueryAmountLog',
- params: {
- accountID: accountStore.currentAccountId.toString(),
- pageflag: 1,
- ...config.data
- },
- })
- }
- /**
- * 查询托管银行扩展配置信息
- */
- export function queryBankCusBankExtendConfigs(config: RequestConfig<Model.BankCusBankExtendConfigReq> = {}) {
- return http.commonRequest<Model.BankCusBankExtendConfigRsp[]>({
- url: '/Bank/QueryBankCusBankExtendConfigs',
- params: {
- ...config.data
- },
- })
- }
|