
/**
 * Web唐明明
 * 匆匆数载恍如梦，岁月迢迢华发增。
 * 碌碌无为枉半生，一朝惊醒万事空。
 * moduleName: 增收赋能
 */

import { request } from '../index'

// 增收赋能列表
const lists = () =>{
	return request({
		url		: "empower/index"
	})
}

// 增收赋能详情
const info = id => {
	return request({
		url		: "empower/" + id + "/show"
	})
}

// 下单前置
const buyInit = id => {
	return request({
		url		: "empower/" + id + "/buy/init",
		method	: "POST"
	})
}

// 下单购买
const buy = data => {
	return request({
		url		: "empower/buy/order",
		method	: "POST",
		data
	})
}

// 订单列表初始化
const orderInit = () => {
	return request({
		url		: "empower/order/init",
	})
}

// 订单列表
const orderList = data => {
	return request({
		url		: "empower/order/index",
		data
	})
}

// 取消订单
const orderCancel = order => {
	return request({
		url		: "empower/order/" + order + "/cancel",
	})
}

// 核验列表
const codes = code => {
	return request({
		url		: "empower/code",
		data	: { code },
		method	: "POST",
	})
}

// 确认核验
const sign = item_id => {
	return request({
		url		: "empower/code/sign",
		data	: { item_id },
		method	: "POST",
	})
}


export {
	lists,
	info,
	buyInit,
	buy,
	orderInit,
	orderList,
	orderCancel,
	codes,
	sign
}

