Appearance
页面管理
【v1】更新页面
基本信息
Path: /v1/api/update/:id
Method: POST
接口描述:
相较基本版本,增加 content_blocks 字段及其输入校验
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| id | 123 | 页面id |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| name | string | 非必须 | 页面名称 | mock: @string | |
| route | string | 非必须 | 页面路由 | mock: @string | |
| page_content | object | 非必须 | |||
| isBody | boolean | 非必须 | 是否以body标签为页面根dom | ||
| parentId | integer | 非必须 | 父级文件夹id | mock: @id | |
| content_blocks | object [] | 非必须 | 页面内容所使用的子区块 | item 类型: object | |
| ├─ block | number | 非必须 | 区块id | ||
| ├─ version | string | 非必须 | 区块版本 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ id | number | 非必须 | |||
| ├─ name | string | 非必须 | |||
| ├─ app | string | 非必须 | |||
| ├─ route | string | 非必须 | |||
| ├─ page_content | object | 非必须 | |||
| ├─ componentName | string | 非必须 | |||
| ├─ css | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ lifeCycles | object | 非必须 | |||
| ├─ children | object [] | 非必须 | item 类型: object | ||
| ├─ componentName | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ componentType | string | 非必须 | |||
| ├─ id | string | 非必须 | |||
| ├─ dataSource | object | 非必须 | |||
| ├─ list | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ state | object | 非必须 | |||
| ├─ methods | object | 非必须 | |||
| ├─ utils | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ bridge | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ inputs | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ outputs | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ created_at | string | 非必须 | |||
| ├─ updated_at | string | 非必须 | |||
| ├─ createdBy | null | 非必须 | |||
| ├─ tenant | number | 非必须 | |||
| ├─ isBody | boolean | 非必须 | |||
| ├─ parentId | string | 非必须 | |||
| ├─ group | string | 非必须 | |||
| ├─ depth | number | 非必须 | |||
| ├─ isPage | boolean | 非必须 | |||
| ├─ occupier | object | 非必须 | |||
| ├─ id | number | 非必须 | |||
| ├─ username | string | 非必须 | |||
| string | 非必须 | ||||
| ├─ blocked | null | 非必须 | |||
| ├─ created_at | string | 非必须 | |||
| ├─ updated_at | string | 非必须 | |||
| ├─ block | null | 非必须 | |||
| ├─ is_admin | boolean | 非必须 | |||
| ├─ is_public | null | 非必须 | |||
| ├─ isDefault | boolean | 非必须 | |||
| ├─ content_blocks | object [] | 非必须 | item 类型: object | ||
| ├─ block | number | 非必须 | |||
| ├─ version | string | 非必须 | |||
| ├─ isHome | boolean | 非必须 | |||
| locale | string | 非必须 |
【v1】页面/区块content出码
基本信息
Path: /v1/api/schema2code
Method: POST
接口描述:
接口未授权,使用前联系服务端加权限
相较基础版本,对子区块进行精细化筛选,避免dsl传入全量子区块生成冗余信息
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| platform | integer | 非必须 | 设计器id 选填 | mock: @id | |
| app | integer | 必须 | 页面所属应用id | mock: @id | |
| pageInfo | object | 必须 | |||
| ├─ schema | object | 必须 | 页面 page_content | ||
| ├─ state | object | 非必须 | |||
| ├─ longName | object | 非必须 | |||
| ├─ defaultValue | string | 非必须 | |||
| ├─ accessor | object | 非必须 | |||
| ├─ setter | object | 非必须 | |||
| ├─ type | string | 非必须 | |||
| ├─ value | string | 非必须 | |||
| ├─ firstName | string | 非必须 | |||
| ├─ lastName | string | 非必须 | |||
| ├─ methods | object | 非必须 | |||
| ├─ componentName | string | 非必须 | |||
| ├─ css | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ lifeCycles | object | 非必须 | |||
| ├─ children | object [] | 非必须 | item 类型: object | ||
| ├─ componentName | string | 必须 | |||
| ├─ props | object | 必须 | |||
| ├─ text | object | 非必须 | |||
| ├─ type | string | 非必须 | |||
| ├─ value | string | 非必须 | |||
| ├─ componentType | string | 必须 | |||
| ├─ id | string | 必须 | |||
| ├─ dataSource | object | 非必须 | |||
| ├─ list | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ bridge | object | 非必须 | |||
| ├─ imports | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ inputs | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ outputs | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ name | string | 必须 | 页面名称 | mock: @string | |
| ├─ id | number | 必须 | 页面id | mock: @id |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object [] | 非必须 | item 类型: object | ||
| ├─ panelName | string | 必须 | 文件名 | ||
| ├─ panelValue | string | 必须 | 文件内容 | ||
| ├─ panelType | string | 必须 | 文件类型 | ||
| ├─ prettierOpts | object | 必须 | 代码格式设置 | ||
| ├─ printWidth | number | 非必须 | 指定每行代码的最大列数 | ||
| ├─ semi | boolean | 非必须 | 控制是否在语句末尾添加分号 | ||
| ├─ singleQuote | boolean | 非必须 | 控制是否使用单引号代替双引号作为字符串的引号样式 | ||
| ├─ trailingComma | string | 非必须 | 控制对象和数组字面量中最后一个属性或元素后面是否添加尾随逗号 | ||
| ├─ parser | string | 非必须 | 指定要使用的解析器 | ||
| ├─ htmlWhitespaceSensitivity | string | 非必须 | 用于控制 HTML 文件中空白字符的敏感度 | ||
| ├─ type | string | 必须 | 类型 | ||
| ├─ index | boolean | 必须 | 索引 | ||
| ├─ filePath | string | 必须 | 文件路径 | ||
| ├─ errors | string [] | 必须 | 报错 | item 类型: string | |
| ├─ | 非必须 | ||||
| locale | string | 非必须 |
【v1】页面/区块通过id查询出码
基本信息
Path: /v1/api/code
Method: GET
接口描述:
接口未启用,联系后端为各角色加权限
相较基础版本,对子区块进行精细化筛选,避免dsl传入全量子区块,生成冗余信息
请求参数
Query
| 参数名称 | 是否必须 | 示例 | 备注 |
|---|---|---|---|
| type | 是 | Page | 查询类型 Page 或 Block |
| id | 是 | 213 | 页面或区块id |
| app | 是 | 1232 | 页面所属应用、创建此区块的应用 id |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object [] | 非必须 | item 类型: object | ||
| ├─ panelName | string | 必须 | 文件名称 | ||
| ├─ panelValue | string | 必须 | 文件内容 | ||
| ├─ panelType | string | 必须 | 文件类型 | ||
| ├─ prettierOpts | object | 必须 | 代码格式设置 | ||
| ├─ printWidth | number | 非必须 | 指定每行代码的最大列数 | ||
| ├─ semi | boolean | 非必须 | 控制是否在语句末尾添加分号 | ||
| ├─ singleQuote | boolean | 非必须 | 控制是否使用单引号代替双引号作为字符串的引号样式 | ||
| ├─ trailingComma | string | 非必须 | 控制对象和数组字面量中最后一个属性或元素后面是否添加尾随逗号 | ||
| ├─ parser | string | 非必须 | 指定要使用的解析器 | ||
| ├─ htmlWhitespaceSensitivity | string | 非必须 | 用于控制 HTML 文件中空白字符的敏感度 | ||
| ├─ type | string | 必须 | 类型 | ||
| ├─ index | boolean | 必须 | 索引 | ||
| ├─ filePath | string | 必须 | 文件路径 | ||
| ├─ errors | string [] | 必须 | 报错 | item 类型: string | |
| ├─ | 非必须 | ||||
| locale | string | 非必须 |
创建页面
基本信息
Path: /app-center/api/pages/create
Method: POST
接口描述:
app id 和 页面路由 组合构成唯一key, 不能重复添加
2022-2-23 修改点:(部分值数据库存储数据和返回有区别,需要转义字段名 和 值)
1. 创建参数添加 isBody isHome parentId group
2. 返回数据添加 isBody isHome parentId group
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| name | string | 必须 | 页面名称 | ||
| app | integer | 必须 | 所属应用id | ||
| route | string | 必须 | 页面路由 | ||
| page_content | object | 非必须 | 页面的schema.json | ||
| page_desc | string | 非必须 | 页面的描述信息 | ||
| isHome | boolean | 必须 | 是否为当前应用的主页 | ||
| isBody | boolean | 必须 | body是否为根元素 | ||
| parentId | number | 非必须 | 父级目录id, 不传 或者传0 为根目录 | ||
| group | string | 必须 | public | static 表示公共分组或静态页面分组 | ||
| isPage | boolean | 必须 | 是页面还是文件夹 | mock: true | |
| isDefault | boolean | 必须 | 是否是默认静态页面 | mock: false |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ id | number | 必须 | 页面id | ||
| ├─ name | string | 必须 | 页面名称 | ||
| ├─ page_desc | string | 必须 | 页面描述 | ||
| ├─ route | string | 必须 | 页面路由 | ||
| ├─ page_content | object | 必须 | 页面的schema.json | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ app | string | 必须 | 页面所属的应用id | ||
| ├─ isBody | boolean | 必须 | body是否为根元素 | ||
| ├─ isHome | boolean | 必须 | 是否为首页 | ||
| ├─ group | string | 必须 | public 或者 static | 枚举: public,static | |
| ├─ parentId | number | 必须 | 父级id | ||
| ├─ isPage | boolean | 必须 | 是页面还是文件夹 | mock: true | |
| ├─ isDefault | boolean | 必须 | 是否是默认静态页面 | mock: false | |
| locale | string | 必须 |
创建页面历史记录
基本信息
Path: /api/pages/histories/create
Method: POST
接口描述:
改动点:
将post参数 page_content 改为page_info , 保存该页面包括page_content 以内的一些 其他页面必要数据
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| page | number | 必须 | 页面ID | ||
| message | string | 非必须 | 历史记录备注信息 | ||
| pageInfo | object | 必须 | 页面信息 | ||
| ├─ page_content | object | 必须 | |||
| ├─ parentId | number | 必须 | 所属父级id | ||
| ├─ isHome | boolean | 必须 | 是否为首页 | ||
| ├─ isBody | boolean | 必须 | body是否为根目录 | ||
| ├─ group | string | 必须 | 所在分组 public| static | 枚举: public,static | |
| ├─ route | string | 必须 | 页面路由 | ||
| ├─ name | string | 必须 | 页面名称 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ message | string | 非必须 | 信息 | ||
| ├─ id | number | 非必须 | |||
| ├─ page | string | 非必须 | 页面id | ||
| ├─ page_content | object | 非必须 | 页面schema数据 | ||
| ├─ time | string | 非必须 | 时间 | ||
| ├─ isBody | boolean | 非必须 | 根节点是否为 body元素 | ||
| ├─ isHome | boolean | 非必须 | 是否是首页 | ||
| ├─ parentId | number | 非必须 | 父节点id | ||
| ├─ group | string | 非必须 | 页面分组 staticPages | publicPages | ||
| ├─ route | string | 非必须 | 路由 | ||
| ├─ name | string | 非必须 | 名称 |
删除页面
基本信息
Path: /app-center/api/pages/delete/:id
Method: GET
接口描述:
删除该id页面信息
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| id | 71 | 页面id |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | 页面详情 | ||
| ├─ id | number | 非必须 | |||
| ├─ name | string | 非必须 | 页面名称 | ||
| ├─ app | string | 非必须 | 页面所属应用id | ||
| ├─ route | string | 非必须 | 页面路由 | ||
| ├─ page_content | string | 非必须 | 页面schema json | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ createdBy | object | 非必须 | 创建人信息 | ||
| ├─ id | number | 非必须 | |||
| ├─ username | string | 非必须 | 用户名 | ||
| string | 非必须 | 邮箱 | |||
| ├─ blocked | null | 非必须 | 是否被黧黑 | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ block | null | 非必须 | 预留字段 | ||
| ├─ is_admin | boolean | 非必须 | 是否是超级管理员 | ||
| ├─ is_public | null | 非必须 | 是否为公共账号 | ||
| ├─ tenant | number | 非必须 | 所属组织 | ||
| ├─ isBody | boolean | 非必须 | 根节点是否为 body元素 | ||
| ├─ parentId | string | 非必须 | 父节点 id | ||
| ├─ group | string | 非必须 | 页面分组 staticPages | publicPages | ||
| ├─ depth | number | 非必须 | 页面深度 | ||
| ├─ isPage | boolean | 非必须 | 是否为页面 | ||
| ├─ occupier | object | 非必须 | 锁住当前页面的用户, null 表示页面未被任何人锁定 | ||
| ├─ id | number | 非必须 | |||
| ├─ username | string | 非必须 | 用户名 | ||
| string | 非必须 | 邮箱 | |||
| ├─ blocked | null | 非必须 | 是否被拉黑 | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ block | null | 非必须 | |||
| ├─ is_admin | boolean | 非必须 | 是否是超级管理员 | ||
| ├─ is_public | null | 非必须 | 是否是公共账号 | ||
| ├─ isDefault | boolean | 非必须 | 是否是默认静态页面 | ||
| locale | string | 非必须 |
删除页面历史记录
基本信息
Path: /api/pages/histories/delete/:id
Method: GET
接口描述:
请求参数
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| id | 2 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ message | string | 非必须 | 信息 | ||
| ├─ id | number | 非必须 | |||
| ├─ page | string | 非必须 | 页面id | ||
| ├─ page_content | object | 非必须 | 页面schema json | ||
| ├─ time | string | 非必须 | 时间 | ||
| ├─ isBody | boolean | 非必须 | 根节点是否为 body元素 | ||
| ├─ isHome | boolean | 非必须 | 是否是首页 | ||
| ├─ parentId | number | 非必须 | 父节点 id | ||
| ├─ group | string | 非必须 | 页面分组 staticPages | publicPages | ||
| ├─ route | string | 非必须 | 路由 | ||
| ├─ name | string | 非必须 | 名称 |
单条页面历史记录查询
基本信息
Path: /api/pages/histories/:id
Method: GET
接口描述:
请求参数
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| id | 1 |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ message | string | 非必须 | 历史记录信息 | ||
| ├─ id | number | 非必须 | 历史记录ID | ||
| ├─ page | string | 非必须 | 页面id | ||
| ├─ page_content | object | 非必须 | 页面历史schema.json | ||
| ├─ time | string | 非必须 | 历史记录存储时间 | ||
| ├─ isBody | boolean | 非必须 | body是否问根元素 | ||
| ├─ isHome | boolean | 非必须 | 是否为首页 | ||
| ├─ parentId | number | 非必须 | 父级id | ||
| ├─ group | string | 非必须 | 所属分组 public| static | ||
| ├─ route | string | 非必须 | 页面路由 | ||
| ├─ name | string | 非必须 | 页面名称 |
更新页面
基本信息
Path: /app-center/api/pages/update/:id
Method: POST
接口描述:
修改一个已经存在的页面
- 禁止修改 从属应用(app)
- 禁止将文件夹页面转换(isPage)
- 禁止自行修改页面/文件夹路径深度(depth) 当改变页面/文件夹位置时(parentId)计算应用目录树的路径深度(depth)
- 禁止修改默认页面(isDefault)
- 设置isHome时,需要更新apps home_page数据为当前页面id
- 生成一条页面历史记录
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| id | 68 | 页面id |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| page_desc | string | 非必须 | 页面描述 | ||
| name | string | 非必须 | 页面名称 | ||
| route | string | 非必须 | 页面路由,只能由字母+字母|数字 组成 | ||
| page_content | object | 非必须 | 页面schema.json | ||
| group | string | 非必须 | 所在分组 | 枚举: public,static | |
| isHome | boolean | 非必须 | 是否为首页 | ||
| isBody | boolean | 非必须 | body是否跟根元素 | ||
| parentId | number | 非必须 | 父级id | ||
| content_blocks | object [] | 必须 | item 类型: object | ||
| ├─ block | number | 必须 | 区块id | mock: 123 | |
| ├─ version | string | 必须 | 选择区块的版本 | mock: x |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ id | number | 非必须 | |||
| ├─ name | string | 非必须 | 页面名称 | ||
| ├─ app | string | 非必须 | 所再应用id | ||
| ├─ route | string | 非必须 | 路由 | ||
| ├─ page_content | object | 非必须 | 页面schema json | ||
| ├─ state | object | 非必须 | |||
| ├─ methods | object | 非必须 | |||
| ├─ componentName | string | 非必须 | |||
| ├─ css | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ children | object [] | 非必须 | item 类型: object | ||
| ├─ componentName | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ text | string | 非必须 | |||
| ├─ id | string | 非必须 | |||
| ├─ fileName | string | 非必须 | |||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ createdBy | object | 非必须 | 创建人 | ||
| ├─ id | number | 非必须 | |||
| ├─ username | string | 非必须 | 用户名 | ||
| string | 非必须 | 邮箱 | |||
| ├─ blocked | null | 非必须 | 是否被拉黑 | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ block | null | 非必须 | |||
| ├─ is_admin | boolean | 非必须 | 是否是超级管理员 | ||
| ├─ is_public | null | 非必须 | 是否是公共账号 | ||
| ├─ tenant | number | 非必须 | 所属组织id | ||
| ├─ isBody | boolean | 非必须 | 根节点是否为 body元素 | ||
| ├─ parentId | string | 非必须 | 父节点 id | ||
| ├─ group | string | 非必须 | 页面分组 staticPages | publicPages | ||
| ├─ depth | number | 非必须 | 页面深度 | ||
| ├─ isPage | boolean | 非必须 | 是否为页面 | ||
| ├─ occupier | object | 非必须 | 锁住当前页面的用户, null 表示页面未被任何人锁定 | ||
| ├─ id | number | 非必须 | |||
| ├─ username | string | 非必须 | 用户名 | ||
| string | 非必须 | 邮箱 | |||
| ├─ blocked | null | 非必须 | 是否被拉黑 | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ block | null | 非必须 | 预留字段 | ||
| ├─ is_admin | boolean | 非必须 | 是否是超级管理员 | ||
| ├─ is_public | null | 非必须 | 是否是公共账号 | ||
| ├─ isDefault | boolean | 非必须 | 是否是默认静态页面 | ||
| ├─ isHome | boolean | 非必须 | 是否为首页 | ||
| locale | string | 非必须 |
页面列表
基本信息
Path: /app-center/api/pages/list/:aid
Method: GET
接口描述:
通过应用id获取该平台下的全部页面改动点:1. 根据当前mock数据调整 加入了文件夹树型结构的页面+文件夹列表 (注意空文件夹的树型结构构建)新增:2. 添加额外 group 参数生成新接口,获取该分组下的页面列表
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| aid | 2 | 应用id |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object [] | 非必须 | 页面数据 | item 类型: object | |
| ├─ id | number | 必须 | 页面id | ||
| ├─ name | string | 必须 | 页面英文名称 | ||
| ├─ app | string | 必须 | 从属应用id | ||
| ├─ route | string | 必须 | 页面路由 | ||
| ├─ created_at | string | 必须 | 创建时间 | ||
| ├─ updated_at | string | 必须 | 更新时间 | ||
| ├─ parentId | string | 必须 | 父级文件夹id | ||
| ├─ group | string | 必须 | 页面分类 publicPages staticPages | 枚举: staticPages,publicPages, | |
| ├─ isPage | boolean | 必须 | 是页面还是文件夹 | ||
| ├─ occupier | object | 必须 | 当前编辑人 信息 | ||
| ├─ id | number | 非必须 | 用户id | ||
| ├─ username | string | 非必须 | |||
| string | 非必须 | ||||
| ├─ blocked | null | 非必须 | |||
| ├─ created_at | string | 非必须 | |||
| ├─ updated_at | string | 非必须 | |||
| ├─ block | null | 非必须 | |||
| ├─ is_admin | boolean | 非必须 | |||
| ├─ is_public | null | 非必须 | |||
| ├─ isDefault | boolean | 必须 | 是否为默认页面 | ||
| ├─ isHome | boolean | 必须 | 是否为首页 | ||
| ├─ createdBy | null | 必须 | 页面创建者 | ||
| locale | string | 非必须 |
页面历史记录列表
基本信息
Path: /api/pages/histories
Method: GET
接口描述:
添加事件范围获取列表的参数,以获取一定事件范围内的页面历史记录
version参数尽量和app参数同时出现,能够减少服务端查询数据库的次数
新增应用历史版本号version参数,version参数筛选的优先级高于 time_lte time_glt 参数, 会拉取该版本应用发布时间以前的全部页面历史记录, 如果同时配置了 time_lte 或 time_glt , time_lte 、time_glt将不生效
请求参数
Query
| 参数名称 | 是否必须 | 示例 | 备注 |
|---|---|---|---|
| page | 是 | 2 | 页面id |
| time_gte | 否 | 1645522730000 | 查询时间的起始范围 毫秒数 |
| time_lte | 否 | 1645522830000 | 查询时间的结束范围 毫秒数 |
| version | 否 | 1.2.3 | 应用的历史版本号 |
| app | 否 | 应用id | 应用id(当传入version字段时,能传就尽量传一下) |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object [] | 非必须 | item 类型: object | ||
| ├─ message | string | 非必须 | 信息 | ||
| ├─ id | number | 非必须 | |||
| ├─ page | string | 非必须 | 页面id | ||
| ├─ page_content | object | 非必须 | 页面schema json | ||
| ├─ time | string | 非必须 | 时间 | ||
| ├─ isBody | boolean | 非必须 | 根节点是否为 body元素 | ||
| ├─ isHome | boolean | 非必须 | 是否为首页 | ||
| ├─ parentId | number | 非必须 | 父节点 id | ||
| ├─ group | string | 非必须 | 页面分组 staticPages | publicPages | ||
| ├─ route | string | 非必须 | 路由 | ||
| ├─ name | string | 非必须 | 名称 |
页面详情
基本信息
Path: /app-center/api/pages/detail/:id
Method: GET
接口描述:
获取页面信息
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
路径参数
| 参数名称 | 示例 | 备注 |
|---|---|---|
| id | 68 | 页面id |
返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| data | object | 非必须 | |||
| ├─ id | number | 非必须 | 页面id | ||
| ├─ name | string | 非必须 | 页面名称 | ||
| ├─ page_desc | string | 非必须 | 页面描述 | ||
| ├─ route | string | 非必须 | 页面路由 | ||
| ├─ page_content | object | 非必须 | 页面schema json | ||
| ├─ componentName | string | 非必须 | |||
| ├─ css | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ children | object [] | 非必须 | item 类型: object | ||
| ├─ componentName | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ dataSource | number | 非必须 | |||
| ├─ id | string | 非必须 | |||
| ├─ children | object [] | 非必须 | item 类型: object | ||
| ├─ componentName | string | 非必须 | |||
| ├─ props | object | 非必须 | |||
| ├─ editConfig | object | 非必须 | |||
| ├─ trigger | string | 非必须 | |||
| ├─ mode | string | 非必须 | |||
| ├─ showStatus | boolean | 非必须 | |||
| ├─ columns | object [] | 非必须 | item 类型: object | ||
| ├─ name | string | 必须 | |||
| ├─ title | object | 必须 | |||
| ├─ key | string | 非必须 | |||
| ├─ zh_CN | string | 非必须 | |||
| ├─ en_US | string | 非必须 | |||
| ├─ type | string | 非必须 | |||
| ├─ field | string | 必须 | |||
| ├─ type | string | 必须 | |||
| ├─ format | object | 必须 | |||
| ├─ required | boolean | 非必须 | |||
| ├─ stringType | string | 非必须 | |||
| ├─ min | number | 非必须 | |||
| ├─ max | number | 非必须 | |||
| ├─ dateTime | boolean | 非必须 | |||
| ├─ data | object [] | 非必须 | item 类型: object | ||
| ├─ fast | string | 非必须 | |||
| ├─ superman | string | 非必须 | |||
| ├─ id | string | 非必须 | |||
| ├─ id | string | 非必须 | |||
| ├─ state | object | 非必须 | |||
| ├─ pageConfig | object | 非必须 | |||
| ├─ component | object | 非必须 | |||
| ├─ type | string | 非必须 | |||
| ├─ value | string | 非必须 | |||
| ├─ attrs | object | 非必须 | |||
| ├─ currentPage | number | 非必须 | |||
| ├─ pageSize | number | 非必须 | |||
| ├─ pageSizes | number [] | 非必须 | item 类型: number | ||
| ├─ | 非必须 | ||||
| ├─ total | number | 非必须 | |||
| ├─ layout | string | 非必须 | |||
| ├─ methods | object | 非必须 | |||
| ├─ getTableData | object | 非必须 | |||
| ├─ type | string | 非必须 | |||
| ├─ value | string | 非必须 | |||
| ├─ fileName | string | 非必须 | |||
| ├─ meta | object | 非必须 | |||
| ├─ id | number | 非必须 | |||
| ├─ parentId | string | 非必须 | |||
| ├─ group | string | 非必须 | |||
| ├─ title | null | 非必须 | |||
| ├─ isHome | boolean | 非必须 | |||
| ├─ description | string | 非必须 | |||
| ├─ router | string | 非必须 | |||
| ├─ rootElement | string | 非必须 | |||
| ├─ creator | string | 非必须 | |||
| ├─ gmt_create | string | 非必须 | |||
| ├─ gmt_modified | string | 非必须 | |||
| ├─ id | number | 非必须 | |||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ app | string | 非必须 | 页面所属应用id | ||
| ├─ createdBy | object | 非必须 | 页面创建者 | ||
| ├─ id | number | 非必须 | 用户id | ||
| ├─ username | string | 非必须 | 用户名称 | ||
| string | 非必须 | 邮箱 | |||
| ├─ blocked | null | 非必须 | 是否被系统拉黑 | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ is_admin | boolean | 非必须 | 是否为超级管理员 | ||
| ├─ tenant | number | 非必须 | 租户id | ||
| ├─ isBody | boolean | 非必须 | 根节点是否为 body元素 | ||
| ├─ parentId | string | 非必须 | 父节点 id | ||
| ├─ group | string | 非必须 | 页面分组 staticPages | publicPages | 枚举: staticPages,publicPages | |
| ├─ depth | number | 非必须 | 页面深度 | ||
| ├─ isPage | boolean | 非必须 | 是否为页面 | ||
| ├─ title | null | 非必须 | 页面title | ||
| ├─ occupier | object | 非必须 | 锁住当前页面的用户, null 表示页面未被任何人锁定 | ||
| ├─ id | number | 非必须 | |||
| ├─ username | string | 非必须 | 用户名 | ||
| string | 非必须 | 邮箱 | |||
| ├─ blocked | null | 非必须 | 是否被拉黑 | ||
| ├─ created_at | string | 非必须 | 创建时间 | ||
| ├─ updated_at | string | 非必须 | 更新时间 | ||
| ├─ block | null | 非必须 | 预留字段 | ||
| ├─ is_admin | boolean | 非必须 | 是否是超级管理员 | ||
| ├─ isHome | boolean | 非必须 | 是否为首页 | ||
| ├─ isDefault | boolean | 非必须 | 是否是默认静态页面 |