import request from '/@/utils/request';

/**
 * 申请提现
 */
export function applyWithdraw(data: any) {
	return request({
		url: 'admin/merchantWithdraw/apply',
		method: 'post',
		data,
	});
}

/**
 * 分页查询提现记录
 */
export function fetchWithdrawList(query?: Object) {
	return request({
		url: 'admin/merchantWithdraw/page',
		method: 'post',
		data: query,
	});
}

/**
 * 获取商户余额
 */
export function getMerchantBalance() {
	return request({
		url: 'admin/merchant/getBalance',
		method: 'get',
	});
}

/**
 * 查看资金流水
 */
export function fetchFundFlowList(query?: Object) {
	return request({
		url: 'admin/fundFlow/flowsPage',
		method: 'get',
		params: query,
	});
}
