import axios from '@/libs/axios.js';

// 获取网点下的服务项目
export const getStoreItems = params => {
  return axios.request({
    url: `item/storeItems/?storeId=${params.storeId}`,
    method: 'get',
  })
};

// 下单 保存订单
export const saveOrder = params => {
  return axios.request({
    url: `order/save`,
    method: 'post',
	data: params
  })
};

// 下单 预支付
export const signPay  = params => {
  return axios.request({
    url: `order/pay?orderId=${params.orderId}`,
    method: 'get',
  })
};

// 我的订单
export const getOrderList = params => {
	let url = `order/query/${params.pageNo}/${params.pageSize}`
	delete params.pageNo
	delete params.pageSize
	return axios.request({
		url: url,
		method: 'post',
		data: params
	})
};
// 订单详情
export const orderDetail = params => {
  return axios.request({
    url: `order/find/${params.id}`,
    method: 'get',
  })
};