import request from "@/utils/request";
import { Order_BaseUrl } from "@/api/config";
const baseURL = Order_BaseUrl + "/admin/order/credit/buyer";
const Api = {
  getList(params: any) {
    return request<any, any>({
      url: `${baseURL}/page`,
      method: "get",
      params
    });
  },
  get(params: any) {
    return request<any, any>({
      url: `${baseURL}`,
      method: "get",
      params
    });
  },
  add(data: any) {
    return request<any, any>({
      url: `${baseURL}`,
      method: "post",
      data
    });
  },
  edit(data: any) {
    return request<any, any>({
      url: `${baseURL}`,
      method: "put",
      data
    });
  },

  delete(id: string | number) {
    return request<any, any>({
      url: `${baseURL}/` + id,
      method: "delete",
    });
  },
  // 还款

  repayment(data: any) {
    return request<any, any>({
      url: `${baseURL}/repayment`,
      method: "post",
      data
    });
  },
};

export default Api;

