用于向指定智能文档中添加页面。
请求方式:POST(HTTPS)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/wedoc/smartdoc/add_page?access_token=ACCESS_TOKEN
请求包体
{
"docid": "DOC_ID",
"info": {
"title": "页面标题",
"parent_id": "PARENT_PAGE_ID",
"after_id": "AFTER_PAGE_ID",
"layout_mode": 1
}
}
参数说明
| 参数 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
| docid | string | 是 | 智能文档的文档 id,可通过 新建文档 接口创建 |
| info | object | 是 | 需要添加的页面信息 |
| info.title | string | 否 | 页面标题 |
| info.parent_id | string | 否 | 父页面 ID,用于创建子页面,为空标识第一层页面 |
| info.after_id | string | 否 | 插入位置,表示排在哪个页面之后,为空表示插入到最前 |
| info.layout_mode | uint32 | 否 | 页面布局模式,参见 PageLayoutMode |
权限说明
返回示例
{
"errcode": 0,
"errmsg": "ok",
"info": {
"page_id": "PAGE_ID",
"title": "页面标题",
"parent_id": "PARENT_PAGE_ID",
"after_id": "AFTER_PAGE_ID",
"layout_mode": 1
}
}
参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | int32 | 错误码 |
| errmsg | string | 错误码说明 |
| info | PageInfo | 添加成功后返回的页面信息(含生成的 page_id) |
| info.page_id | string | 页面 ID(系统生成) |
| info.title | string | 页面标题 |
| info.parent_id | string | 父页面 ID |
| info.after_id | string | 排序位置(在哪个页面之后) |
| info.layout_mode | uint32 | 页面布局模式 |
| 值 | 说明 |
|---|---|
| 1 | PAGE_LAYOUT_MODE_DEFAULT - 默认布局 |
| 2 | PAGE_LAYOUT_MODE_PAPER - 纸张布局 |
| 3 | PAGE_LAYOUT_MODE_FULLWIDTH - 全宽布局 |
