index.ts 746 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { Result, deleteRequest, get, post, put } from "../base";
  2. /**
  3. * 分页查询
  4. * @param query .
  5. * @returns .
  6. */
  7. export function queryPage<T>(query?: any): Promise<Result<T>> {
  8. return get("/sys/pay/agent/page", query);
  9. }
  10. /**
  11. * 列表查询
  12. * @param query .
  13. * @returns .
  14. */
  15. export function queryList<T>(query?: any): Promise<Result<T>> {
  16. return get("/sys/pay/agent/list", query);
  17. }
  18. /**
  19. * 新增
  20. * @param data .
  21. * @returns .
  22. */
  23. export function save<T>(data: any): Promise<Result<T>> {
  24. return post("/sys/pay/agent/save", data);
  25. }
  26. /**
  27. * 更新
  28. * @param id .
  29. * @param data .
  30. * @returns .
  31. */
  32. export function update<T>(id: string, data: any): Promise<Result<T>> {
  33. return put(`/sys/pay/agent/update/${id}`, {}, data);
  34. }