基质喷涂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

5 months ago
5 months ago
5 months ago
  1. import type { WorkType } from "../globalCmd/cmdTypes";
  2. import httpRequest, { type BaseResponse } from "../httpRequest";
  3. import type { CraftItem } from "@/services/matrix/type";
  4. export function getList(params: { pageSize: number; pageNum: number }) {
  5. return httpRequest<BaseResponse>({
  6. url: "/api/matrixCraft/list",
  7. params: { ...params },
  8. method: "GET",
  9. });
  10. }
  11. export function getListByMatrixId(params: { matrixId: number }) {
  12. return httpRequest<BaseResponse<CraftItem[]>>({
  13. url: `/api/matrixCraft/getListByMatrixId/${params.matrixId}`,
  14. params: { ...params },
  15. method: "GET",
  16. });
  17. }
  18. export function createCraft(params: CraftItem) {
  19. return httpRequest<BaseResponse<CraftItem[]>>({
  20. url: "/api/matrixCraft/add",
  21. params,
  22. method: "POST",
  23. });
  24. }
  25. export function updateCraft(params: CraftItem) {
  26. return httpRequest<BaseResponse<CraftItem[]>>({
  27. url: "/api/matrixCraft",
  28. params,
  29. method: "PUT",
  30. });
  31. }
  32. export function delCraft(params:CraftItem){
  33. return httpRequest<BaseResponse<CraftItem[]>>({
  34. url: `/api/matrixCraft/${params.id}`,
  35. params: { ...params },
  36. method: "PUT",
  37. });
  38. }