import request from '@/utils/request'

// 订单列表列表
export function listGET(query) {
  return request({
    url: '/xinrenli/order/list',
    method: 'get',
    params: query
  })
}
// 生成支付订单
export function createPayPOST(data) {
  return request({
    url: '/xinrenli/order/createPay',
    method: 'post',
    data: data
  })
}
// 生成退款订单
export function refundGET(query) {
  return request({
    url: '/xinrenli/order/refund',
    method: 'get',
    params: query
  })
}
// 订单列表详情
export function particularsGET(query) {
  return request({
    url: '/xinrenli/order/particulars',
    method: 'get',
    params: query
  })
}
// 修改订单
export function editPOST(data) {
  return request({
    url: '/xinrenli/order/edit',
    method: 'post',
    data: data
  })
}
// 用户反馈列表
export function userFeedbackGET(query) {
  return request({
    url: '/xinrenli/userFeedback/list',
    method: 'get',
    params: query
  })
}
// 动态列表列表
export function articleGET(query) {
  return request({
    url: '/xinrenli/article/list',
    method: 'get',
    params: query
  })
}
// 动态列表新增
export function articlePOST(data) {
  return request({
    url: '/xinrenli/article',
    method: 'post',
    data: data
  })
}
// 动态列表详情
export function articlesGET(query) {
  return request({
    url: `/xinrenli/article/${query}`,
    method: 'get',
    // params: query
  })
}
// 动态列表修改
export function articlePUT(data) {
  return request({
    url: '/xinrenli/article',
    method: 'put',
    data: data
  })
}
// 报表导出
export function exportReportFormsPOST(data) {
  return request({
    url: '/xinrenli/order/exportReportForms',
    method: 'post',
    data: data
  })
}
// 报表接口
export function reportFormsGET(query) {
  return request({
    url: '/xinrenli/order/reportForms',
    method: 'get',
    params: query
  })
}
// 营销活动列表
export function couponGET(query) {
  return request({
    url: '/xinrenli/coupon/list',
    method: 'get',
    params: query
  })
}
// 新增优惠卷
export function couponPOST(data) {
  return request({
    url: '/xinrenli/coupon',
    method: 'post',
    data: data
  })
}
// 删除优惠卷
export function coupontGET(query) {
  return request({
    url: `/xinrenli/coupon/${query}`,
    method: 'DELETE',
    // params: query
  })
}
// 优惠卷详情
export function coupontsGET(query) {
  return request({
    url: `/xinrenli/coupon/${query}`,
    method: 'get',
    // params: query
  })
}
//优惠卷修改
export function couponlePUT(data) {
  return request({
    url: '/xinrenli/coupon',
    method: 'put',
    data: data
  })
}