Skip to content

Commit 6d04d88

Browse files
committed
feat(template)
1 parent 2c9695e commit 6d04d88

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

  • packages/design-core/src/template/src/js

packages/design-core/src/template/src/js/http.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,36 @@
1313
/* metaService: engine.plugins.blockmanage.js-http */
1414
import { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register'
1515

16-
const baseUrl = 'http://10.234.151.79:9090'
1716
export const isDevelopEnv = import.meta.env.MODE?.includes('dev')
1817
// 模版管理 -- 获取模版列表
19-
export const fetchTemplateList = (params) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/app-center/api/app-template/list`, {params})
18+
export const fetchTemplateList = (params) =>
19+
getMetaApi(META_SERVICE.Http).get(`/app-center/api/app-template/list`, { params })
2020

2121
// 模版管理 -- 通过模板创建应用
22-
export const createAppFromTemplate = (params) => getMetaApi(META_SERVICE.Http).post(`${baseUrl}/app-center/api/app-template/create`, params)
22+
export const createAppFromTemplate = (params) =>
23+
getMetaApi(META_SERVICE.Http).post(`/app-center/api/app-template/create`, params)
2324

2425
// 模版管理 -- 业务场景全查询
25-
export const fetchBusinessCategory = () => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/material-center/api/business-category/list`)
26+
export const fetchBusinessCategory = () =>
27+
getMetaApi(META_SERVICE.Http).get(`/material-center/api/business-category/list`)
2628

2729
// 模版管理 -- 按分类查询业务场景
28-
export const fetchBusinessCategoryByGroup = (group) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/material-center/api/business-category/find?group=${group}`)
30+
export const fetchBusinessCategoryByGroup = (group) =>
31+
getMetaApi(META_SERVICE.Http).get(`/material-center/api/business-category/find?group=${group}`)
2932

3033
// 应用管理 -- 获取应用列表
31-
export const fetchApplicationList = (params) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/app-center/api/apps/page`, {params}) // currentPage pageSize
34+
export const fetchApplicationList = (params) =>
35+
getMetaApi(META_SERVICE.Http).get(`app-center/api/apps/page`, { params }) // currentPage pageSize
3236

3337
// 应用管理 -- 创建应用
34-
export const createApplication = (params) => getMetaApi(META_SERVICE.Http).post(`${baseUrl}/app-center/api/apps/create`, params)
38+
export const createApplication = (params) => getMetaApi(META_SERVICE.Http).post(`/app-center/api/apps/create`, params)
3539

3640
// 应用管理 -- 编辑应用
37-
export const updateApplication = (id, params) => getMetaApi(META_SERVICE.Http).post(`${baseUrl}/app-center/api/apps/update/${id}`, params)
41+
export const updateApplication = (id, params) =>
42+
getMetaApi(META_SERVICE.Http).post(`/app-center/api/apps/update/${id}`, params)
3843

3944
// 应用管理 -- 删除应用
40-
export const deleteApplication = (id) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/app-center/api/apps/delete/${id}`)
45+
export const deleteApplication = (id) => getMetaApi(META_SERVICE.Http).get(`/app-center/api/apps/delete/${id}`)
4146

4247
// 模板管理 -- 查询页面列表
43-
export const getPageList = (id) => getMetaApi(META_SERVICE.Http).get(`/app-center/api/pages/list/${id}`)
48+
export const getPageList = (id) => getMetaApi(META_SERVICE.Http).get(`/app-center/api/pages/list/${id}`)

0 commit comments

Comments
 (0)