123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import { EditorModule } from "..";
- import { DesignTemp } from "../../objects/DesignTemp";
- export const https = EditorModule.http({
- getDesignDetail(id: string, params?: { isSys: boolean }) {
- return this.request("/h5/detail/" + id, {
- method: "GET",
- params: {
- ...params,
- clientId: this.helper.getClientId(),
- },
- });
- },
- getCompDetail(id: string, isSys = false) {
- const params:any = {};
- if (isSys) params.isSys = true;
- return this.request("/frame/detail/" + id, {
- method: "GET",
- params
- });
- },
- saveDesign(data: Partial<DesignTemp>) {
- return this.request("/h5/update", {
- method: "POST",
- data,
- });
- },
- saveComp(data: Partial<DesignTemp>) {
- return this.request("/frame/update", {
- method: "POST",
- data,
- });
- },
- createComp(data: any) {
- return this.request("/frame/create", { method: "POST", data });
- },
- getWkDesignDetail(id: string) {
- return this.request(`/wk/h5/detail/${id}`, {
- method: "GET",
- params: {
- clientId: this.helper.getClientId(),
- },
- });
- },
- saveWkDesign(data: Partial<DesignTemp>) {
- return this.request("/wk/h5/update", {
- method: "POST",
- data,
- });
- },
- });
|