import request from '@/utils/request'

// 获取用户消费记录
export function spreadCommission(data,state) {
	return request({
		url: '/api/spread/commission/'+state,
		method: 'get',
		data
	});
}

// 获取账户余额
export function userBalance(data) {
	return request({
		url: '/api/user/balance',
		method: 'get',
		data
	});
}

// 提现
export function extractCash(data) {
	return request({
		url: '/api/extract/cash',
		method: 'post',
		data
	});
}

// 提现信息
export function extractBank(data) {
	return request({
		url: '/api/extract/bank',
		method: 'get',
		data
	});
}
// #ifdef H5
// 公众号充值
export function rechargeWechat(data) {
	return request({
		url: '/api/recharge/wechat',
		method: 'post',
		data
	});
}
// #endif
// #ifdef MP
// 小程序充值
export function rechargeRoutine(data) {
	return request({
		url: '/api/recharge/routine',
		method: 'post',
		data
	});
}
// #endif


// 账户余额
export function balance(data) {
	return request({
		url: '/api/user/balance',
		method: 'get',
		data
	});
}

// 修改用户信息
export function userEdit(data) {
	return request({
		url: '/api/user/edit',
		method: 'post',
		data
	});
}