主题
获取浏览器兼容提示配置
接口说明
请求URL:http[s]://{网关地址}/casp-portal/config/getBrowserCompatibleConfig
请求方式: GET
请求内容类型: 无
响应内容类型: application/json
请求说明
请求头
| 字段名 | 参数名 | 必填 | 类型 | 描述 |
|---|---|---|---|---|
| 应用ID | appId | M | String(128) | 接入网关的应用ID |
| Token | accessToken | M | String | 接入网关的accessToken |
查询参数
无
响应说明
响应体
| 字段名 | 参数名 | 必填 | 类型 | 描述 |
|---|---|---|---|---|
| 返回码 | errcode | M | String | 0 成功,其他为不成功 |
| 返回码描述 | errmsg | O | String | 返回码描述 |
| 返回对象 | data | O | Object | 返回的BrowserCompatibleConfig对象 |
BrowserCompatibleConfig:
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 是否开启浏览器兼容提示 | isBrowserCompatible | String | "0":不开启 ,"1":开启,不开启时,以下字段都为空 |
| 兼容浏览器 | compatibleBrowser | String | 0:360极速模式、1:Safari、2:Chrome、3:Firefox、4:IE11及以上、5:Edge。英文逗号分隔 |
| 提示文案 | List<MultiLangData> | 提示文案 |
MultiLangData(返回)
| 字段名 | 类型 | 描述 |
|---|---|---|
| langCountry | String | 国家编码 |
| langValue | String | 多语言值 |
响应示例
json
{
"isBrowserCompatible": "1",
"compatibleBrowser": "5,4,0,2,3,1",
"compatibleInfo": [
{
"langCountry": "zh_CN",
"langValue": "建议使用以下浏览器进行访问:360极速模式、Safari、Chrome、Firefox、IE11及以上、Edge。",
"orderNumber": 0
},
{
"langCountry": "en",
"langValue": "11",
"orderNumber": 1
},
{
"langCountry": "ru",
"langValue": "22",
"orderNumber": 2
}
],
"isChanged": "0"
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
错误码
| 错误码 | 描述 |
|---|---|
| 999 | 统一错误码,详细描述信息参见接口返回 |
Demo
java
// 创建客户端
Client client = new DefaultClient(BASE_URL, APP_ID,APP_SECRET);
// 创建请求对象
BrowserCompatibleConfigResponse response = client.execute(new BrowserCompatibleConfigRequest());
//调用成功,则处理业务逻辑
if (response.isSuccess()) {
//.....
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8

