import request from '../utils/request';

// 订单核销
export const orderVerify = (data: object) =>
  request('/user/cancelPointOrder', data, 'POST');

// 活动订单核销
export const activeOrderVerify = (data: object) =>
  request('/user/cancelOrder', data, 'POST');

// 获取订单统计
export const orderStatistics = (data: object) =>
  request('/store/order/count', data, 'POST');

// 获取商家积分订单列表
export const getJfOrderList = (data: object) =>
  request('/store/point/order', data, 'POST');

// 获取商家活动订单列表
export const getActiveOrderList = (data: object) =>
  request('/store/order', data, 'POST');

// 获取积分核销列表
export const getJfVerifyList = (data: object) =>
  request('/point/order/details', data, 'POST');

// 获取活动核销列表
export const getActiveVerifyList = (data: object) =>
  request('/order/details', data, 'POST');

// 增长率统计
export const growthRate = (data: object) =>
  request('/store/date/count', data, 'POST');

// 获取提现列表
export const getWithdrawList = (data: object) =>
  request('/store/withdraw', data, 'POST');

// 获取提现列表
export const addWithdraw = (data: object) =>
  request('/store/withdraw/set', data, 'POST');

/**
 * 后结api
 */

// 创建后结订单
export const createAfterOrder = (data: object) =>
  request('/later/order/place', data, 'POST');

// 获取商家后结订单列表
export const getAfterOrderList = (data: object) =>
  request('/later/store/user/order', data, 'POST');

// 获取单个后结订单
export const getAfterOrder = (data: object) =>
  request('/later/order/details', data, 'POST');

// 确定挂帐
export const confirmAfterOrder = (data: object) =>
  request('/later/order/onAccount', data, 'POST');

// 修改台号/备注
export const editAfterOrder = (data: object) =>
  request('/later/order/edit', data, 'POST');

// 生成付款二维码
export const createPayQr = (data: object) =>
  request('/later/order/pay', data, 'POST');

// 检查手机号码是否存在
export const checkPhone = (data: object) =>
  request('/user/find/phone', data, 'POST');

// 获取商家特定用户会员积分2024-3-19
export const getUserPoint = (data: object) =>
  request('/store/get/user/integral', data, 'POST');

// 取消后结订单
export const cancelAfterOrder = (data: object) =>
  request('/user/later/order/remove', data, 'POST');
