import request from "@/utils/request";
import { Product_BaseUrl } from "@/api/config";
const baseURL = Product_BaseUrl + "/admin/product/vendor";
// 供应商
const Api = {
  /** 分页*/
  getList(params: any) {
    return request<any>({
      url: `${baseURL}/page`,
      method: "get",
      params,
    });
  },
  /** 全部*/
  getAllList(params: any) {
    return request<any>({
      url: `${baseURL}/list`,
      method: "get",
      params,
    });
  },
  get(id: string | number) {
    return request<any>({
      url: `${baseURL}/` + id,
      method: "get",
    });
  },
  add(data: any) {
    return request<any>({
      url: `${baseURL}`,
      method: "post",
      data
    });
  },
  edit(data: any) {
    return request<any>({
      url: `${baseURL}`,
      method: "put",
      data
    });
  },

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



export default Api;
