|
|
@@ -1,7 +1,7 @@
|
|
|
import { reactive, shallowRef, computed } from 'vue'
|
|
|
import { useDataTable } from '@/hooks/datatable'
|
|
|
import { useLoginStore, useUserStore } from '@/stores'
|
|
|
-import { queryHisAmountLog, t2bBankWithdraw, queryBankAccountSign, t2bBankDeposit, queryAccountInOutApply, queryCusBankSignBank, t2bBankSign, t2bBankCancelSign } from '@/services/api/bank'
|
|
|
+import { queryHisAmountLog, t2bBankWithdraw, queryBankAccountSign, t2bBankDeposit, queryAccountInOutApply, queryCusBankSignBank, t2bBankSign, t2bBankCancelSign, accountFundInfoReq } from '@/services/api/bank'
|
|
|
import { decryptAES } from '@/utils/websocket/crypto'
|
|
|
import moment from "moment";
|
|
|
|
|
|
@@ -137,7 +137,7 @@ export function useBankAccountSign() {
|
|
|
}
|
|
|
|
|
|
// 提现请求
|
|
|
-export function doWithdraw() {
|
|
|
+export function useDoWithdraw() {
|
|
|
|
|
|
/// 获取UserId
|
|
|
const { getUserId } = useLoginStore()
|
|
|
@@ -204,7 +204,7 @@ export function doWithdraw() {
|
|
|
}
|
|
|
|
|
|
// 充值请求
|
|
|
-export function doDeposit() {
|
|
|
+export function useDoDeposit() {
|
|
|
/// 获取UserId
|
|
|
const { getUserId } = useLoginStore()
|
|
|
const loading = shallowRef(false)
|
|
|
@@ -261,7 +261,7 @@ export function doDeposit() {
|
|
|
}
|
|
|
|
|
|
/// 银行签约请求
|
|
|
-export function doBankSign() {
|
|
|
+export function useDoBankSign() {
|
|
|
|
|
|
const loading = shallowRef(false)
|
|
|
const { getUserInfo } = useUserStore()
|
|
|
@@ -279,6 +279,7 @@ export function doBankSign() {
|
|
|
AccountCode: getFirstAccountId().toString(),
|
|
|
CertID: decryptAES(getUserInfo()?.cardnum ?? ''),
|
|
|
CertType: getUserInfo()?.cardtypeid.toString(),
|
|
|
+ BankAccountName: getUserInfo()?.customername
|
|
|
|
|
|
})
|
|
|
|
|
|
@@ -329,7 +330,7 @@ export function doBankSign() {
|
|
|
}
|
|
|
|
|
|
/// 银行解约请求
|
|
|
-export function doCancelBankSign() {
|
|
|
+export function useDoCancelBankSign() {
|
|
|
/// 获取UserId
|
|
|
const { getUserId } = useLoginStore()
|
|
|
const loading = shallowRef(false)
|
|
|
@@ -391,3 +392,28 @@ export function doCancelBankSign() {
|
|
|
sign
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/// 账户资金信息请求
|
|
|
+export function useAccountFundInfo() {
|
|
|
+ /// 获取UserId
|
|
|
+ const { getFirstAccountId } = useLoginStore()
|
|
|
+
|
|
|
+ /// 数据
|
|
|
+ const fund = shallowRef<Partial<Proto.AccountFundInfoRsp>>({})
|
|
|
+
|
|
|
+ /// 账户资金信息
|
|
|
+ accountFundInfoReq({
|
|
|
+ data: {
|
|
|
+ QueryBitMask: 2,
|
|
|
+ OrderId: new Date().getTime(),
|
|
|
+ AccountId: getFirstAccountId(),
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ fund.value = res
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ return {
|
|
|
+ fund
|
|
|
+ }
|
|
|
+}
|