hyapp-server/docs/flutter对接/开屏配置Flutter对接.md
2026-06-09 22:08:52 +08:00

70 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 开屏配置 Flutter 对接
## 地址
`GET /api/v1/app/splash-screens`
公开接口,不需要登录。返回后台 `APP配置 -> 开屏配置` 中当前有效的开屏列表。
## 参数
| 参数 | 位置 | 必填 | 说明 |
| --- | --- | --- | --- |
| `X-App-Code` | Header | 否 | App 编码,默认 `lalu`。 |
| `X-App-Package` | Header | 否 | 包名或 Bundle ID用于服务端解析 App。 |
| `platform` | Query | 否 | `android``ios`。不传时读取 `X-App-Platform` / `X-Platform`。 |
| `region_id` | Query | 否 | 当前用户区域 ID。 |
| `country` | Query | 否 | 当前用户国家码。不传时读取 `X-Country-Code` / `X-App-Country`。 |
示例:
```http
GET /api/v1/app/splash-screens?platform=android&region_id=1&country=CN
X-App-Code: lalu
X-App-Platform: android
```
## 返回值
```json
{
"code": "OK",
"message": "ok",
"request_id": "req_abc",
"data": {
"items": [
{
"id": 12,
"cover_url": "https://cdn.example.com/splash.png",
"type": "h5",
"param": "https://h5.example.com/splash",
"platform": "android",
"sort_order": 1,
"region_id": 1,
"country_code": "CN",
"description": "活动开屏",
"starts_at_ms": 1700000000000,
"ends_at_ms": 1800000000000,
"updated_at_ms": 1700000003000
}
],
"total": 1
}
}
```
| 字段 | 说明 |
| --- | --- |
| `items` | 当前可展示的开屏配置列表,已按 `sort_order ASC, id DESC` 排序。 |
| `cover_url` | 开屏图片地址。 |
| `type` | `h5``app`。 |
| `param` | `type=h5` 时是 H5 链接;`type=app` 时由客户端解释。 |
| `platform` | `android``ios`。 |
| `region_id` | 配置限制的区域 ID为空或 0 表示全部区域。 |
| `country_code` | 配置限制的国家码;为空表示全部国家。 |
| `starts_at_ms` / `ends_at_ms` | 投放时间。0 表示不限。 |
## 相关 IM
无。