企业微信服务商
当前位置:首页文档APIAPI-网站页面

API-网站页面

更新时间:2020-01-06

列表获取

接口地址

POST 域名/work/page/list/

传递参数

参数名 必选 类型 说明 示例
pagetype int 页面类型 1代表普通页面,2代表模板类页面
page int 页码 默认1
limit int 每页显示条数 默认20

返回值

{
    "code": 200,
    "msg": "获取成功",
    "data": {
        "data": [
            {
                "_id": {
                    "$oid": "59e6ece5c3666e049d21a5f4"
                },
                "siteid": {
                    "$oid": "59ae3db6e39acc0395370172"
                },
                "pagetitle": "页面-页面标题up2",
                "pagetype": "1",
                "sourcecode": {
                    "pc": "pcsourcecode",
                    "mobile": "mobilesourcecode"
                },
                "pageseo": {
                    "title": "seotitle",
                    "keywords": "seokeywords",
                    "description": "seodescribe",
                    "imgurl": "seoimgurl"
                },
                "tags": "tags",
                "state": 1,
                "pagetemplates": "",
                "url": "/page_59e6ece5c3666e049d21a5f4.html"
            }
        ],
        "total": 1
    }
}

单条获取

接口地址

POST 域名/work/page/detail/

传递参数

参数名 必选 类型 说明 示例
_id string 唯一标示 59e6ece5c3666e049d21a5f4

返回值

{
    "code": 200,
    "msg": "获取成功",
    "data": {
        "_id": {
            "$oid": "59e6ece5c3666e049d21a5f4"
        },
        "siteid": {
            "$oid": "59ae3db6e39acc0395370172"
        },
        "pagetitle": "页面-页面标题up2",
        "pagetype": "1",
        "sourcecode": {
            "pc": "pcsourcecode",
            "mobile": "mobilesourcecode"
        },
        "pageseo": {
            "title": "seotitle",
            "keywords": "seokeywords",
            "description": "seodescribe",
            "imgurl": "seoimgurl"
        },
        "tags": "tags",
        "state": 1,
        "pagetemplates": "",
        "url": "/page_59e6ece5c3666e049d21a5f4.html"
    }
}

添加

接口地址

POST 域名/work/page/add/

传递参数

参数名 必选 类型 说明 示例
pagetype int 页面类型 1代表普通页面,2代表模板类页面
pagetitle string 页面标题  
pcsourcecode string 电脑端代码  
mobilesourcecode string 移动端代码  
seotitle string title  
seokeywords string keywords  
seodescribe string describe  
seoimgurl string 分享时显示图片  
pageurl string 页面访问url  
tags string tag 多个英文逗号分隔
pctemplates   string 电脑版模板的唯一标示 当pagetype为2的时候,必填
mobiletemplates   string 移动端模板的唯一标示 当pagetype为2的时候,必填

返回值

{
    "code": 200,
    "msg": "添加成功",
    "data": "59e80796c3666e03fc0d83e3"
}

更新

接口地址

POST 域名/work/page/update/

传递参数

参数名 必选 类型 说明 示例
_id string 唯一标示  
pagetype int 页面类型 1代表普通页面,2代表模板类页面
pagetitle string 页面标题  
pcsourcecode string 电脑端代码  
mobilesourcecode string 移动端代码  
seotitle string title  
seokeywords string keywords  
seodescribe string describe  
seoimgurl string 分享时显示图片  
pageurl string 页面访问url  
tags string tag 多个英文逗号分隔
pctemplates   string 电脑版模板的唯一标示 当pagetype为2的时候,必填
mobiletemplates   string 移动端模板的唯一标示 当pagetype为2的时候,必填

返回值

{
    "code": 200,
    "msg": "更新成功",
    "data": ""
}

删除

接口地址

POST 域名/work/page/del/

传递参数

参数名 必选 类型 说明 示例
_id string 唯一标示  

返回值

{
    "code": 200,
    "msg": "删除成功",
    "data": ""
}