 /*
  * 手太欠
  * 愿这世界都如故事里一样 美好而动人~
*/

import { req } from "../request"

//增收赋能
const lists = () => req({
    url: "empower/index"
})

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

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

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

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

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

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

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

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

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