import {http2} from "@/utils/request.js";
/**获取订单列表 */
export const getOrderList = (params) => {
  return http2.get('/api/v1/admin/order/list', {params: params})
}
/**获取订单详情 */
export const getOrderDetail = (params) => {
  return http2.get('/api/v1/admin/order/detail', {params: params})
}
/**删除订单 (未提供删除接口,暂时保留) */
/**删除订单 */
export const deleteOrder = (data) => {
  return http2.delete('/api/v1/admin/trades/delete_trade', {
    data: data,
    headers:{
      'Content-Type':'multipart/form-data'
    }
  })
}
/**创建订单 */
export const createOrder = (data) => {
  return http2.post('/api/v1/admin/order/create', data,{
    headers:{
      'Content-Type':'multipart/form-data'
    }
  })
}
/**修改订单 */
export const updateOrder = (data) => {
  return http2.post('/api/v1/admin/order/update', data,{
    headers:{
      'Content-Type':'multipart/form-data'
    }
  })
}
/**重试订单流程 */
export const retryOrderHook = (data) => {
  return http2.post('/api/v1/admin/order/retry_hook', data,{
    headers:{
      'Content-Type':'multipart/form-data'
    }
  })
}
