# 浏览按钮开放接口

原始文档链接：[浏览按钮开放接口](https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/repository/b90d212e-0cab-40a6-9845-d9476f717caf/doc/958005456255754240)
目录分组：对接方案

# 浏览按钮普通接口

在调用开放平台接口之前，可以先确定要取哪个浏览按钮的数据，如获取选择任务浏览按钮的数据  ![](http://10.10.10.40:4999/server/index.php?s=/api/attachment/visitFile&sign=d464e619a66d45225de19439da0ad438)  调用接口为：/api/task/common/browser/data/taskBrowser  参数为：

```json
{
    "browserMultiple":true,
    "secretLevel":"4",
    "secretLevelValidity":"公开",
    "current":1,
    "pageSize":10,
    "formDatas":{
        "names":[
            {
                "term":"like"
            }
        ],
        "head-taskTypes":[
            {
                "ids":"0"
            }
        ],
        "tailNum":[
            {
                "term":"like"
            }
        ],
        "managers":[
            {
                "term":"eq"
            }
        ],
        "prioritys":[
            {
                "term":"eq"
            }
        ],
        "types":[
            {
                "term":"eq"
            }
        ],
        "mainlines":[
            {
                "term":"eq"
            }
        ]
    },
    "quickSearchDatas":{

    },
    "type":"and"
}```

# 如何调用开放平台接口
原接口地址为`/api/task/common/browser/data/taskBrowser`，对应的开放平台接口则为
`/api/component/browser/v1/task/common/browser/data/taskBrowser`，即将`/api`改为`/api/component/browser/v1`

    
## 简要描述

- 浏览按钮通用开放平台转发接口

## 请求URL
- `/api/component/browser/v1/{module}/common/browser/{queryType}/{browserType}`
- module为浏览按钮的module值
- browserType为浏览按钮的类型值
- queryType为浏览按钮接口类型，如data接口查询查询浏览按钮数据，count接口查询总数

## 请求方式
- POST

## header参数

|参数名|必选|类型|说明|
|:----    |:---|:----- |-----   |
|tenantKey |是  |string |租户key   |
|employeeId |是  |string | 用户id    |

## 参数与普通浏览按钮接口参数一致，按浏览按钮维度自行查看，不同模块的浏览按钮基础参数可能不一样，需要自行查看一下
```json
{
    "browserMultiple": false,
    "current": 1,
    "pageSize": 10,
    "type": "and"
}
```

## 返回示例，下图示例是基本的列表浏览按钮的格式，其它类型的浏览按钮格式会有一些不同

```json
{
    "code": 200,
    "msg": "接口返回成功",
    "status": true,
    "data": {
        "template": {
            "default": {
                "dataKeys": [
                    "content",
                    "user",
                    "time",
                    "title"
                ],
                "theme": "col1_row2"
            }
        },
        "docTotalCount": "0",
        "data": [
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "3008966615732139366",
                "time": "2023-07-18",
                "title": "[师源]创建于[2023-07-18]:[微信图片_20230628091550]",
                "user": "师源",
                "secretLevel": 4,
                "content": "微信图片_20230628091550"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "3008810539772579710",
                "time": "2023-06-30",
                "title": "[师源]创建于[2023-06-30]:[自定义浏览按钮解析限制优化需求]",
                "user": "师源",
                "secretLevel": 4,
                "content": "自定义浏览按钮解析限制优化需求"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "7778810538201453558",
                "time": "2023-06-30",
                "title": "[师源]创建于[2023-06-30]:[空文件]",
                "user": "师源",
                "secretLevel": 4,
                "content": "空文件"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "7778810518826353556",
                "time": "2023-06-30",
                "title": "[师源]创建于[2023-06-30]:[公共事项关联逻辑删除推进]",
                "user": "师源",
                "secretLevel": 4,
                "content": "公共事项关联逻辑删除推进"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "7778224057255991686",
                "time": "2023-04-23",
                "title": "[师源]创建于[2023-04-23]:[test]",
                "user": "师源",
                "secretLevel": 4,
                "content": "test"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "8514517196640228388",
                "time": "2022-08-05",
                "title": "[默认头像测试默认头像测试默认头像测试]创建于[2022-08-05]:[查阅情况-测试]",
                "user": "默认头像测试默认头像测试默认头像测试",
                "secretLevel": 4,
                "content": "查阅情况-测试"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "3007944846937069977",
                "time": "2023-03-22",
                "title": "[师源]创建于[2023-03-22]:[11]",
                "user": "师源",
                "secretLevel": 4,
                "content": "11"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "3008007839845572580",
                "time": "2023-03-29",
                "title": "[师源]创建于[2023-03-29]:[事项权限支持评论事项关联传递说明书]",
                "user": "师源",
                "secretLevel": 4,
                "content": "事项权限支持评论事项关联传递说明书"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "3007944848624569979",
                "time": "2023-03-22",
                "title": "[师源]创建于[2023-03-22]:[123213]",
                "user": "师源",
                "secretLevel": 4,
                "content": "123213"
            },
            {
                "toped": false,
                "docStatus": 2,
                "docStatusName": "正常",
                "id": "7777781521295510619",
                "time": "2023-03-03",
                "title": "[师源]创建于[2023-03-03]:[error]",
                "user": "师源",
                "secretLevel": 4,
                "content": "error"
            }
        ],
        "dataType": "list",
        "invokeFullsearch": false,
        "fromFullSearch": false
    },
    "fail": false
}
```
