import {
	ApiHttp
} from '@/utils/request.js'

//用户需求广场
const userNeedSquare = (params) => {
	return ApiHttp('/xinrenli/order/userDemandSquare',params,'GET')
}
// 获取订单列表
const orderDetailList = (params) => {
	return ApiHttp('/xinrenli/order/list',params,'GET')
}

// 获取订单详细信息
const orderDetailMsg = (params) => {
	return ApiHttp('/xinrenli/order/',params,'GET')
}
// 获取订单详细信息(最新首页详情)
const orderDetailMsgNew = (params) => {
	return ApiHttp('/xinrenli/order/particulars',params,'GET')
}

//我的需求
const myNeedList = (params) => {
	return ApiHttp('/xinrenli/order/MyNeeds',params,'GET')
}
// 上传图片视频
// const  = () => {
// 	return ApiHttp('/system/oss/upload')
// }

// 新增订单（发布）
const addOrderFunction = (params) =>{
	return ApiHttp('/xinrenli/order/add',params,'POST')
}

// 修改订单（发布）
const updateOrderFunction = (params) =>{
	return ApiHttp('/xinrenli/order/edit',params,'POST')
}

//取消订单
const removeOrderFunction = (params) =>{
	return ApiHttp('/xinrenli/order/remove',params,'GET')
}

export {
	userNeedSquare,
	orderDetailList,
	orderDetailMsg,
	orderDetailMsgNew,
	myNeedList,
	addOrderFunction,
	updateOrderFunction,
	removeOrderFunction
}