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

const api = {
	rechargeButtonStatus: ipConfig.api_app + '/home/rechargeButtonStatus',
	rollMsg: ipConfig.api_app + '/home/rollMsg',
	bannerList: ipConfig.api_app + '/banner/list',
	getService: ipConfig.api_app + '/service/index',
	checkUserBankrupt: ipConfig.api_app+ '/activity/bankruptcy/checkBankruptcy',
	createBankruptRecharge: ipConfig.api_app+ '/activity/bankruptcy/createRecharge',
}

export const createBankruptRechargeApi = (amount) => {
	return httpRequest.post({
		url: api.createBankruptRecharge,
		data: {
			amount
		}
	})
}
export const checkBankruptApi = () => {
	return httpRequest.post({
		url: api.checkUserBankrupt,
		data: {}
	})
}
/**
 * 获取重置按钮状态
 */
export const requestRechargeButtonStatus = (params) => {
	return httpRequest.post({
		url: api.rechargeButtonStatus,
		data: params
	})
}

/**
 * 获取跑马灯消息
 */
export const requestRollMsg = (params) => {
	return httpRequest.post({
		url: api.rollMsg,
		data: params
	})
}

/**
 * 获取banner列表
 */
export const requestBannerList = (params) => {
	return httpRequest.post({
		url: api.bannerList,
		data: params
	})
}

/**
 * 获取客服信息
 */
export const requestServiceList = (params) => {
	return httpRequest.post({
		url: api.getService,
		data: params
	})
}