index.ts 862 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { EditorModule } from "..";
  2. import { DesignTemp } from "../../objects/DesignTemp";
  3. export const https = EditorModule.http({
  4. getDesignDetail(id: string) {
  5. return this.request("/h5/detail/" + id, {
  6. method: "GET",
  7. });
  8. },
  9. getCompDetail(id: string) {
  10. return this.request("/frame/detail/" + id, {
  11. method: "GET",
  12. });
  13. },
  14. saveDesign(data: Partial<DesignTemp>) {
  15. return this.request("/h5/update", {
  16. method: "POST",
  17. data,
  18. });
  19. },
  20. saveComp(data: Partial<DesignTemp>) {
  21. return this.request("/frame/update", {
  22. method: "POST",
  23. data,
  24. });
  25. },
  26. createComp(data: any) {
  27. return this.request("/frame/create", { method: "POST", data });
  28. },
  29. getFrameDetail(id: string) {
  30. return this.request("/h5/detail/" + id, {
  31. method: "GET",
  32. params: { isSys: true },
  33. });
  34. },
  35. });