import { request } from "@/utils/request.js";

/**
 * 用户订单记录 API接口
 */
export default {
  /**
   * 数据列表
   * @returns
   */
  getPageList(params = {}) {
    return request({
      url: "/v1/customer/SdkOrder/index",
      method: "get",
      params,
    });
  },

  /**
   * 添加数据
   * @returns
   */
  save(params = {}) {
    return request({
      url: "/v1/customer/SdkOrder/save",
      method: "post",
      data: params,
    });
  },

  /**
   * 更新数据
   * @returns
   */
  update(id, data = {}) {
    return request({
      url: "/v1/customer/SdkOrder/update?id=" + id,
      method: "put",
      data,
    });
  },

  /**
   * 读取数据
   * @returns
   */
  read(id) {
    return request({
      url: "/v1/customer/SdkOrder/read?id=" + id,
      method: "get",
    });
  },

  /**
   * 删除数据
   * @returns
   */
  destroy(data) {
    return request({
      url: "/v1/customer/SdkOrder/destroy",
      method: "delete",
      data,
    });
  },

  /**
   * 补发
   * @returns
   */
  send(params) {
    return request({
      url: "/v1/customer/SdkOrder/send",
      data: params,
      method: "post",
    });
  },

  /**
   * 审核补单列表
   */
  getReissueAuditList(params = {}) {
    return request({
      url: "/v1/customer/SdkOrder/getReissueAuditList",
      method: "get",
      params,
    });
  },

  /**
   * 审核补单
   */
  reissueAudit(params = {}) {
    return request({
      url: "/v1/customer/SdkOrder/reissueAudit",
      method: "post",
      data: params,
    });
  },
};
