已完成用户APP首期功能开发

交付用户端首期页面、配套接口、后台资源及测试文档。用户APP构建、静态分析和三个管理后台构建通过;完整测试仍有2项失败,后端模型注释检查未通过,详见交付记录。
This commit is contained in:
czl231
2026-09-13 00:57:32 +08:00
parent a0a4bb1218
commit 3ef33b531d
793 changed files with 40959 additions and 1204 deletions

View File

@@ -15,6 +15,7 @@ class RecordListPage extends StatefulWidget {
this.onRecordTap,
this.embedded = false,
this.refreshToken = 0,
this.query = '',
super.key,
});
@@ -27,6 +28,7 @@ class RecordListPage extends StatefulWidget {
final ValueChanged<ClientRecord>? onRecordTap;
final bool embedded;
final int refreshToken;
final String query;
@override
State<RecordListPage> createState() => _RecordListPageState();
@@ -78,6 +80,15 @@ class _RecordListPageState extends State<RecordListPage>
onRetry: state.load,
);
}
final records = widget.query.isEmpty
? state.records
: state.records
.where(
(record) =>
record.title.contains(widget.query) ||
record.subtitle.contains(widget.query),
)
.toList();
return RefreshIndicator(
onRefresh: state.load,
child: CustomScrollView(
@@ -103,10 +114,10 @@ class _RecordListPageState extends State<RecordListPage>
),
),
),
if (state.records.isEmpty)
if (records.isEmpty)
const SliverFillRemaining(
hasScrollBody: false,
child: EmptyState(title: '暂无记录', description: '服务端还没有可展示的数据'),
child: EmptyState(title: '暂无记录', description: '没有符合条件的记录'),
)
else
SliverPadding(
@@ -116,14 +127,14 @@ class _RecordListPageState extends State<RecordListPage>
padding: EdgeInsets.zero,
child: Column(
children: [
for (var index = 0; index < state.records.length; index++) ...[
for (var index = 0; index < records.length; index++) ...[
RecordCard(
record: state.records[index],
record: records[index],
onTap: widget.onRecordTap == null
? null
: () => widget.onRecordTap!(state.records[index]),
: () => widget.onRecordTap!(records[index]),
),
if (index < state.records.length - 1)
if (index < records.length - 1)
const Divider(indent: 16, endIndent: 16),
],
],