api.ts 1.09 KB
import type { http } from "@/typing/http";
import { ARCHIVES_HOST } from "@/utils/host";
import request from "@/utils/request";

/**
 * @description: 分页获取<feewee>替换name</feewee>
 * @param {<feewee>替换name</feewee>.QueryParams} params
 * @return {http.PromisePageResp<<feewee>替换name</feewee>.ListVO>}
 */
export function get<feewee>替换name</feewee>ListApi(params: <feewee>替换name</feewee>.QueryParams): http.PromisePageResp<<feewee>替换name</feewee>.ListVO> {
  return request.get(`API url`, { params });
}

/**
 * @description: 保存<feewee>替换name</feewee>
 * @param {<feewee>替换name</feewee>.ListVO} params
 * @return {http.PromiseResp<string>}
 */
export function save<feewee>替换name</feewee>Api(params: <feewee>替换name</feewee>.ListVO): http.PromiseResp<string> {
  return request.post(`API url`, params);
}

/**
 * @description: 删除<feewee>替换name</feewee>
 * @param {number} id
 * @return {http.PromiseResp<string>}
 */
export function delete<feewee>替换name</feewee>Api(id: number): http.PromiseResp<string> {
  return request.get(`API url`, { params: { id } });
}