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

import {
	request
} from '../index'

// 创建，确认订单
const buy = (data, method) => {
	return request({
		url: 'mall/buy/goods',
		method,
		data
	})
}

// eb支付
const eb = (no) => {
	return request({
		url: 'mall/pay/' + no + '/eb',
	})
}

// 微信支付
const wxPay = (data) => {
	return request({
		url: 'mall/pay/' + data.order_no + '/wechat',
		data: data,
		method: 'get'
	})
}

//支付宝支付 
const aliPay = (data) => {
	return request({
		url: 'mall/pay/' + data.order_no + '/alipay',
		data: data,
		method: 'get'
	})
}

// EB支付
const ebPay = (data) => {
	return request({
		url: 'mall/pay/' + data.order_no + '/eb'
	})
}
export {
	buy,
	eb,
	wxPay,
	aliPay,
	ebPay
}
