提供公告数据的RESTful API接口
获取所有公告列表
根据ID获取特定公告
创建新公告
| 参数 | 类型 | 说明 |
|---|---|---|
| title | string | 公告标题(必需) |
| content | string | 公告内容(必需) |
| priority | integer | 优先级(1-5) |
{
"status": "success",
"data": [
{
"id": 1,
"title": "系统维护通知",
"content": "系统将于本周六凌晨2点至4点进行维护",
"created_at": "2023-06-15T08:00:00Z",
"priority": 3
},
{
"id": 2,
"title": "新功能上线",
"content": "新增文件上传功能,欢迎使用",
"created_at": "2023-06-10T10:30:00Z",
"priority": 2
}
]
}
{
"status": "等待请求..."
}
{
"status": "success",
"data": [
{
"id": 1,
"title": "系统维护通知",
"content": "系统将于本周六凌晨2点至4点进行维护,期间服务可能不可用。",
"created_at": "2023-06-15T08:00:00Z",
"priority": 3,
"category": "系统通知"
},
{
"id": 2,
"title": "新功能上线",
"content": "新增文件上传功能,支持多种格式,欢迎使用并提供反馈。",
"created_at": "2023-06-10T10:30:00Z",
"priority": 2,
"category": "产品更新"
},
{
"id": 3,
"title": "安全提醒",
"content": "请定期更改密码以确保账户安全,不要使用简单密码。",
"created_at": "2023-06-05T14:20:00Z",
"priority": 4,
"category": "安全通知"
}
]
}