
import {req} from "../request"

//权益商品订单列表
const orders = (type) => req({url: "orders/index", data: {type: type}})

//权益订单列表
const ordersCoupons = (type) => req({url: "orders/coupons", data: {type: type}})

//福利商品订单列表
const welfare = (type) => req({url: "welfares/orders", data: {type: type}})

//福利券订单列表
const welfareCoupons = (type) => req({url: "welfares/coupons", data: {type: type}})

//权益订单详情
const show = (orderid) => req({url: "orders/show?", data: {orderid: orderid}})

//周五福利订单详情
const welfaresShow = (orderid) => req({url: "welfares/orders/show?", data: {orderid: orderid}})

//取消兑换订单
const cancel = (orderid) => req({url: "orders/cancel?orderid=" + orderid , method: "POST"})

//福利取消订单
const welfaresCancel = (orderid) => req({url: "welfares/orders/cancel?orderid=" + orderid , method: "POST"})

//福利订单支付
const welfarePay = (orderid) => req({url: "payments/welfare?orderid=" + orderid})

//兑换订单支付
const rightsPay = (orderid) => req({url: "payments/order?orderid=" + orderid})

export default({
	orders,
	ordersCoupons,
	welfare,
	welfareCoupons,
	show,
	welfaresShow,
	cancel,
	welfaresCancel,
	welfarePay,
	rightsPay
})
