页面相关接口

目录

列表获取

接口地址

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": ""
}

results matching ""

    No results matching ""