import request from "@/utils/request";
const baseURL = "/account/admin/points/basicSetting";
// 积分-配置
const AuthAPI = {
  // 积分基本设置详情
  getBasicSetting(params: any) {
    return request<any, Responseres>({
      url: `${baseURL}`,
      method: "get",
      params,
    });
  },
  // 积分保存
  BasicSettingadd(data: any) {
    return request<any, Responseres>({
      url: `${baseURL}`,
      method: "post",
      data: { ...data },
    });
  },
  /** 分页*/
  getPage(params: any) {
    return request<any, Responseres>({
      url: `${baseURL}/page`,
      method: "get",
      params,
    });
  },
  // 新增
  add(data: any) {
    return request<any, Responseres>({
      url: `${baseURL}`,
      method: "post",
      data: { ...data },
    });
  },
  // 详情
  getinfo(id: number) {
    return request<any, Responseres>({
      url: `${baseURL}/${id}`,
      method: "get",
    });
  },
  // 编辑
  update(data: Object) {
    return request<any, Responseres>({
      url: `${baseURL}`,
      method: "put",
      data,
    });
  },
  // 删除
  deleteByIds(id: number | String) {
    return request<any, Responseres>({
      url: `${baseURL}/${id}`,
      method: "delete",
    });
  },

};
export interface Responseres {
  code?: number | null;
  data?: any;
  msg?: null | string;
  [property: string]: any;
}

export default AuthAPI;