import httpRequest from '@/module/request/http-request.js'
import ipConfig from '@/config/ip.config.js'

const api = {
	getWithdrawInfoUrl: ipConfig.api_app + '/withdraw/getWithdrawInfo',
	getIsSetWithdrawalPasswordUrl: ipConfig.api_app + '/withdraw/hasSetPwd',
	createWithdrawOrderUrl: ipConfig.api_app + '/withdraw/createWithdrawOrder',
	getWithdrawContentUrl: ipConfig.api_app + '/withdraw/getWithdrawContent',
	getWithdrawListUrl: ipConfig.api_app + '/withdraw/list'
}

/**
 * 获取提现页面信息
 */

export const getWithdrawInfoApi = (params) => {
	return httpRequest.post({
		url: api.getWithdrawInfoUrl,
		data: params
	})
}

/**
 * 获取用户是否设置提现密码
 */

export const getIsSetWithdrawalPasswordApi = (params) => {
	return httpRequest.post({
		url: api.getIsSetWithdrawalPasswordUrl,
		data: params
	})
}


/**
 * 创建提现订单
 */

export const createWithdrawOrderApi = (params) => {
	return httpRequest.post({
		url: api.createWithdrawOrderUrl,
		data: params
	})
}
/**
 * 提现前 界面详情
 */
export const getWithdrawContentApi = (params) => {
	return httpRequest.post({
		url: api.getWithdrawContentUrl,
		data: params
	})
}
/**
 * 获取提现列表 
 */
export const getWithdrawListApi = (params) => {
	return httpRequest.post({
		url: api.getWithdrawListUrl,
		data: params
	})
}