1404/11/04- first

This commit is contained in:
2026-01-24 17:45:54 +03:30
commit edf1824229
554 changed files with 59581 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import type { TableInput } from '@core/type/baseTable'
import useAxios from '@core/utils/useAxios'
// import { Customer } from '@/model/customer'
import type { Charge, Wallet, Withdraw, SendWeight } from '@/model/wallet'
export const getWalletTable = async (params?: TableInput) =>
await useAxios.post<Array<Wallet>>('/admin/wallet/table', params)
export const chargeWallet = async (params: Charge, type: 'gold' | 'money') =>
type === 'money'
? await useAxios.post<boolean>('/admin/wallet/charge', params)
: await useAxios.post<boolean>('/admin/wallet/charge_gold', params)
export const getWithdrawTable = async (params: TableInput) =>
await useAxios.post<Array<Withdraw>>('/admin/wallet/withdraw/table', params)
export const completeWithdraw = async (params: Withdraw) =>
await useAxios.post<boolean>('/admin/wallet/withdraw/complete', params)
export const updateSts = async (id: number, sts: Object) => {
return await useAxios.put(`/admin/wallet/withdraw/${id}`, sts)
}
export const getWithdrawById = async (id: number) => {
return await useAxios.get(`/admin/wallet/withdraw/${id}`)
}
export const sendWeights = async (params: SendWeight ) => {
return await useAxios.put(`/admin/wallet/transaction/reprice`, params)
}