/*
 * @Author: micky 1254597151@qq.com
 * @Date: 2023-08-14 15:38:40
 * @LastEditors: micky 1254597151@qq.com
 * @LastEditTime: 2024-01-28 16:20:42
 * @FilePath: \housekeeping-uniapp\src\api\wallet.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 钱包信息
export const apiUserWallet = (params: any) => request.get({ url: '/recharge/config', data: params })

// 账户明细列表
export const apiAccountLogLists = (params: any) =>
    request.get({ url: '/account/log/list', data: params }, { ignoreCancel: true })

// 充值
export const apiRecharge = (params: any) =>
    request.post({ url: '/recharge/placeOrder', data: params })

// 充值记录列表
export const apiRechargeLogLists = (params: any) =>
    request.get({ url: '/recharge/record', data: params })

// 获取提现配置
export const apiGetWithdrawConfig = (params: any) =>
    request.get({ url: '/withdraw/getConfig', data: params })

// 提现申请
export const apiWithdrawApply = (params: any) =>
    request.post({ url: '/withdraw/apply', data: params })

// 提现申请列表
export const apiWithdrawLists = (params: any) =>
    request.get({ url: '/withdraw/lists', data: params })

// 提现申请详情
export const apiWithdrawDetail = (params: any) =>
    request.get({ url: '/withdraw/detail', data: params })

// 提现申请-不需要审核
export const apiWithdrawCommission = (params: any) =>
    request.post({ url: '/distributor/withdrawCommission', data: params })

// 提现申请-新-需要审核
export const applyForWithdraw = (params: any) =>
    request.post({ url: '/distributor/applyForAdd', data: params })
