12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- 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,
- });
- },
- getCategories() {
- return this.request("/category", {
- method: "GET",
- });
- },
- updateCategories(data: any) {
- return this.request("/category", {
- method: "POST",
- data,
- });
- },
- getSysCategories() {
- return this.request("/sys/category", {
- method: "GET",
- });
- },
- });
|