feat(flutter): 增加轮播自动播放与站内通知

This commit is contained in:
Zhou Weidong committed 2026-10-17 16:50:25 +08:00
1 parent b7b1c50427
commit b870956665
24 files changed
+1398 -26

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
// Author: fruit.com.cn
import '../models/notice.dart';
import 'api_client.dart';
/// Anonymous system notice API.
class NoticeApi {
const NoticeApi(this._client);
final ApiClient _client;
/// Loads one page from `GET /app/notices`.
Future<NoticePage> page({required int pageIndex, int pageSize = 20}) async {
final data = await _client.get(
'/app/notices',
query: {'pageIndex': '$pageIndex', 'pageSize': '$pageSize'},
);
if (data is! Map<String, dynamic>) {
return const NoticePage(total: 0);
}
return NoticePage.fromJson(data);
}
}