index.ts 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. import { useLoginStore, useAccountStore } from '@/stores'
  2. import http from '@/services/http'
  3. import { RequestConfig } from '@/services/http/types'
  4. const loginStore = useLoginStore()
  5. const accountStore = useAccountStore()
  6. /**
  7. * 账户资金信息请求
  8. */
  9. export function accountFundInfoReq(config: RequestConfig<Proto.AccountFundInfoReq>) {
  10. return http.mqRequest<Proto.AccountFundInfoRsp>({
  11. data: config.data,
  12. requestCode: 'AccountFundInfoReq',
  13. responseCode: 'AccountFundInfoRsp',
  14. })
  15. }
  16. /**
  17. * 银行签约
  18. */
  19. export function t2bBankSign(config: RequestConfig<Partial<Proto.t2bBankSignReq>>) {
  20. return http.mqRequest<Proto.t2bBankSignRsp>({
  21. data: config.data,
  22. requestCode: 't2bBankSignReq',
  23. responseCode: 't2bBankSignRsp',
  24. })
  25. }
  26. /**
  27. * 短信验证码请求
  28. */
  29. export function t2bSMSVerificationCode(config: RequestConfig<Partial<Proto.t2bSWSVerificationCodeReq>>) {
  30. return http.mqRequest<Proto.t2bSWSVerificationCodeRsp>({
  31. data: config.data,
  32. requestCode: 't2bSMSVerificationCodeReq',
  33. responseCode: 't2bSMSVerificationCodeRsp',
  34. })
  35. }
  36. /**
  37. * 银行解约
  38. */
  39. export function t2bBankCancelSign(config: RequestConfig<Partial<Proto.t2bBankCancelSignReq>>) {
  40. return http.mqRequest<Proto.t2bBankCancelSignRsp>({
  41. data: config.data,
  42. requestCode: 't2bBankCancelSignReq',
  43. responseCode: 't2bBankCancelSignRsp',
  44. })
  45. }
  46. /**
  47. * 出金申请
  48. */
  49. export function t2bBankWithdraw(config: RequestConfig<Partial<Proto.t2bBankWithdrawReq>>) {
  50. return http.mqRequest<Proto.t2bBankWithdrawRsp>({
  51. data: config.data,
  52. requestCode: 't2bBankWithdrawReq',
  53. responseCode: 't2bBankWithdrawRsp',
  54. })
  55. }
  56. /**
  57. * 入金申请
  58. */
  59. export function t2bBankDeposit(config: RequestConfig<Partial<Proto.t2bBankDepositReq>>) {
  60. return http.mqRequest<Proto.t2bBankDepositRsp>({
  61. data: config.data,
  62. requestCode: 't2bBankDepositReq',
  63. responseCode: 't2bBankDepositRsp',
  64. })
  65. }
  66. /**
  67. * 云缴费代扣入金申请
  68. */
  69. export function YJF_WithholdInApply(config: RequestConfig<Partial<Proto.YJF_WithholdInApplyReq>>) {
  70. return http.mqRequest<Proto.YJF_WithholdInApplyRsp>({
  71. data: config.data,
  72. requestCode: 'YJF_WithholdInApplyReq',
  73. responseCode: 'YJF_WithholdInApplyRsp',
  74. })
  75. }
  76. /**
  77. * 云缴费代扣解约
  78. */
  79. export function YJF_WithholdSignOut(config: RequestConfig<Partial<Proto.YJF_WithholdSignOutReq>>) {
  80. return http.mqRequest<Proto.YJF_WithholdSignOutRsp>({
  81. data: config.data,
  82. requestCode: 'YJF_WithholdSignOutReq',
  83. responseCode: 'YJF_WithholdSignOutRsp',
  84. })
  85. }
  86. /**
  87. * 云缴费代扣签约
  88. */
  89. export function YJF_WithholdSignInSMS(config: RequestConfig<Partial<Proto.YJF_WithholdSignInSMSReq>>) {
  90. return http.mqRequest<Proto.YJF_WithholdSignInSMSRsp>({
  91. data: config.data,
  92. requestCode: 'YJF_WithholdSignInSMSReq',
  93. responseCode: 'YJF_WithholdSignInSMSRsp',
  94. })
  95. }
  96. /**
  97. * 云缴费获取代扣签约短信验证码
  98. */
  99. export function YJF_GetWithholdSignInSMSVCode(config: RequestConfig<Partial<Proto.YJF_GetWithholdSignInSMSVCodeReq>>) {
  100. return http.mqRequest<Proto.YJF_GetWithholdSignInSMSVCodeRsp>({
  101. data: config.data,
  102. requestCode: 'YJF_GetWithholdSignInSMSVCodeReq',
  103. responseCode: 'YJF_GetWithholdSignInSMSVCodeRsp',
  104. })
  105. }
  106. /**
  107. * 查询托管银行
  108. */
  109. export function queryCusBankSignBank(config: RequestConfig = {}) {
  110. return http.commonRequest<Model.CusBankSignBankRsp[]>({
  111. url: '/Qhj/QueryCusBankSignBank',
  112. params: config.data,
  113. })
  114. }
  115. /**
  116. * 查询开户行
  117. */
  118. export function queryBankInfo(config: RequestConfig = {}) {
  119. return http.commonRequest<Model.BankInfoRsp[]>({
  120. url: '/Qhj/QueryBankInfo',
  121. params: config.data,
  122. })
  123. }
  124. /**
  125. * 查询签约银行信息(出金账户管理)
  126. */
  127. export function queryBankAccountSign(config: RequestConfig<Model.BankAccountSignReq> = {}) {
  128. return http.commonRequest<Model.BankAccountSignRsp[]>({
  129. url: '/Qhj/QueryBankAccountSign',
  130. params: {
  131. userid: loginStore.userId,
  132. ...config.data
  133. },
  134. })
  135. }
  136. /**
  137. * 查询充值出金
  138. */
  139. export function queryAccountInOutApply(config: RequestConfig<Model.AccountInOutApplyReq> = {}) {
  140. return http.commonRequest<Model.AccountOutInApplyRsp[]>({
  141. url: '/Qhj/QueryAccountInOutApply',
  142. params: {
  143. userid: loginStore.userId,
  144. ...config.data
  145. },
  146. })
  147. }
  148. /**
  149. * 获取银行支付地址
  150. */
  151. export function getAmtInByPaidUrl(config: RequestConfig<Model.AmtInByPaidUrlReq> = {}) {
  152. return http.commonRequest<Model.AmtInByPaidUrlRsp>({
  153. url: '/Bank/GetAmtInByPaidUrl',
  154. params: {
  155. accountid: accountStore.currentAccountId,
  156. ...config.data
  157. },
  158. })
  159. }
  160. /**
  161. * 资金流水查询(历史)
  162. */
  163. export function queryHisAmountLog(config: RequestConfig<Model.HisAmountLogReq> = {}) {
  164. return http.commonRequest<Model.HisAmountLogRsp[]>({
  165. url: '/TaAccount/QueryHisAmountLog',
  166. params: {
  167. accountID: accountStore.currentAccountId.toString(),
  168. ...config.data
  169. },
  170. })
  171. }
  172. /**
  173. * 资金流水查询(当前)
  174. */
  175. export function queryAmountLog(config: RequestConfig<Model.AmountLogReq> = {}) {
  176. return http.commonRequest<Model.AmountLogRsp[]>({
  177. url: '/TaAccount/QueryAmountLog',
  178. params: {
  179. accountID: accountStore.currentAccountId.toString(),
  180. ...config.data
  181. },
  182. })
  183. }
  184. /**
  185. * 查询托管银行扩展配置信息
  186. */
  187. export function queryBankCusBankExtendConfigs(config: RequestConfig<Model.BankCusBankExtendConfigReq> = {}) {
  188. return http.commonRequest<Model.BankCusBankExtendConfigRsp[]>({
  189. url: '/Bank/QueryBankCusBankExtendConfigs',
  190. params: {
  191. ...config.data
  192. },
  193. })
  194. }
  195. /**
  196. * 查询银行支行联行号信息表
  197. */
  198. export function queryBankBranChnumInfo(config: RequestConfig<Model.BankBranChnumInfoReq> = {}) {
  199. return http.commonRequest<Model.BankBranChnumInfoRsp[]>({
  200. url: '/Bank/QueryBankBranChnumInfo',
  201. params: config.data,
  202. })
  203. }
  204. /**
  205. * 获取代扣签约信息表
  206. */
  207. export function queryGetGtwithholdsigninfo(config: RequestConfig<Model.GTWithHoldSignInfoReq> = {}) {
  208. return http.commonRequest<Model.GTWithHoldSignInfoRsp[]>({
  209. url: '/TaAccount/GetGtwithholdsigninfo',
  210. params: {
  211. userid: loginStore.userId,
  212. ...config.data
  213. },
  214. })
  215. }
  216. /**
  217. * 查询代扣入金申请表
  218. */
  219. export function queryGtwithholddepositapply(config: RequestConfig<Model.GTWithHoldDepositApplyReq> = {}) {
  220. return http.commonRequest<Model.GTWithHoldDepositApplyRsp[]>({
  221. url: '/TaAccount/QueryGtwithholddepositapply',
  222. params: {
  223. userid: loginStore.userId,
  224. ...config.data
  225. }
  226. })
  227. }
  228. /**
  229. * 查询所属机构托管银行
  230. */
  231. export function queryMemberCusBankInfo(config: RequestConfig<Model.BankAccountSignReq> = {}) {
  232. return http.commonRequest<Model.CusBankSignBankRsp[]>({
  233. url: '/Qhj/QueryMemberCusBankInfo',
  234. params: {
  235. userid: loginStore.userId,
  236. ...config.data
  237. },
  238. })
  239. }
  240. /**
  241. * 获取支付中心混合支付渠道配置信息列表
  242. */
  243. export function getHybridConfigs(config: RequestConfig = {}) {
  244. return http.commonRequest<Model.PaymentCenterHybridConfigs[]>({
  245. url: '/Bank/GetHybridConfigs',
  246. params: config.data,
  247. })
  248. }
  249. /**
  250. * 查询混合支付出金接收者信息
  251. */
  252. export function queryHybridReceiverOnboards(config: RequestConfig = {}) {
  253. return http.commonRequest<Model.HybridReceiverOnboard[]>({
  254. url: '/Bank/QueryHybridReceiverOnboards',
  255. params: config.data,
  256. })
  257. }