import request from '@/utils/request'

// 获取首页信息
export function loadIndexs(data) {
	return request({
		url: '/api/index',
		method: 'get',
		data
	});
}
// 获取版本号信息
// #ifdef APP || H5
export function getAppBBH(data) {
	return request({
		url: '/api/version',
		method: 'get',
		data
	});
}
// #endif


// 消息通知
export function articleList(data, id) {
	return request({
		url: '/api/article/list/' + id,
		method: 'get',
		data
	});
}

// 文章详细
export function details(data, id) {
	return request({
		url: '/api/article/details/' + id,
		method: 'get',
		data
	});
}
// 是否已读
export function notify_read(data) {
	return request({
		url: '/api/car/notify_read',
		method: 'post',
		data
	});
}
// 报警信息
export function notify(data) {
	return request({
		url: '/api/car/notify',
		method: 'post',
		data
	});
}
// 获取首页引导图
export function guide_map(data) {
	return request({
		url: '/api/guide_map',
		method: 'get',
		data
	});
}

//套餐列表
export function getRents(data) {
	return request({
		url: '/api/rent',
		method: 'get',
		data
	});
}
//创建套餐订单
export function rentCreate(data) {
	return request({
		url: '/api/rent/create',
		method: 'post',
		data
	});
}
//电池核销
export function rentVerific(data) {
	return request({
		url: '/api/order/rent_verific',
		method: 'post',
		data
	});
}
//普通商品核销
export function orderVerific(data) {
	return request({
		url: '/api/order/order_verific',
		method: 'post',
		data
	});
}
//上传身份证
export function idcards(data) {
	return request({
		url: '/api/user/idcard',
		method: 'post',
		data
	});
}

export function certification(data) {
	return request({
		url: '/api/user/certification',
		method: 'post',
		data
	});
}

//
export function contractCreate(data) {
	return request({
		url: '/api/rent/contract_create',
		method: 'post',
		data
	});
}
export function createSignFLow(data) {
	return request({
		url: '/api/rent/createSignFLow',
		method: 'post',
		data
	});
}


//创建免押
export function rentFree(data) {
	return request({
		url: '/api/rent/free',
		method: 'post',
		data
	});
}

//我的活动
export function record(data) {
	return request({
		url: '/api/article/record',
		method: 'get',
		data
	});
}

//活动报名
export function joinAction(data) {
	return request({
		url: '/api/article/apply',
		method: 'post',
		data
	});
}