已完成用户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

@@ -1,3 +1,5 @@
// 功能描述:共享移动端布局与状态组件,支持 Material 点击反馈。
// 版本1.1.0
import 'package:flutter/material.dart';
import 'tokens.dart';
@@ -35,11 +37,11 @@ class HeqiSurfaceSection extends StatelessWidget {
final EdgeInsetsGeometry padding;
@override
Widget build(BuildContext context) => DecoratedBox(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
Widget build(BuildContext context) => Material(
color: Theme.of(context).colorScheme.surface,
shape: Theme.of(context).cardTheme.shape ?? RoundedRectangleBorder(
borderRadius: BorderRadius.circular(HeqiRadius.large),
border: Border.all(color: Theme.of(context).colorScheme.outlineVariant),
side: BorderSide(color: Theme.of(context).colorScheme.outlineVariant),
),
child: Padding(padding: padding, child: child),
);

View File

@@ -1,3 +1,4 @@
// 功能描述提供双品牌语义主题、组件尺寸与颜色对比规则。版本0.1.1。
import 'package:flutter/material.dart';
import 'tokens.dart';
@@ -25,9 +26,30 @@ abstract final class HeqiTheme {
secondary: dark ? const Color(0xFF86D7B5) : HeqiColors.success,
error: dark ? const Color(0xFFFFB4AB) : HeqiColors.danger,
surface: dark ? HeqiColors.darkSurface : Colors.white,
secondaryContainer: !dark && brand == HeqiBrand.consumer
? const Color(0xFFE8F0FF)
: null,
onSecondaryContainer: !dark && brand == HeqiBrand.consumer
? const Color(0xFF161A22)
: null,
// 用户端使用明确蓝白色板,避免种子推导出紫色容器。
primaryContainer: !dark && brand == HeqiBrand.consumer
? const Color(0xFFE8F0FF)
: null,
onSurface: !dark && brand == HeqiBrand.consumer
? const Color(0xFF161A22)
: null,
onSurfaceVariant: !dark && brand == HeqiBrand.consumer
? const Color(0xFF626977)
: null,
outlineVariant: !dark && brand == HeqiBrand.consumer
? const Color(0xFFE1E5EC)
: null,
);
final textTheme = _textTheme;
final radius = BorderRadius.circular(HeqiRadius.large);
final radius = BorderRadius.circular(
brand == HeqiBrand.consumer ? 10 : HeqiRadius.large,
);
return ThemeData(
brightness: brightness,
@@ -43,7 +65,7 @@ abstract final class HeqiTheme {
foregroundColor: scheme.onSurface,
elevation: 0,
scrolledUnderElevation: 0,
centerTitle: false,
centerTitle: brand == HeqiBrand.consumer,
titleTextStyle: textTheme.titleLarge?.copyWith(color: scheme.onSurface),
),
cardTheme: CardThemeData(
@@ -96,6 +118,9 @@ abstract final class HeqiTheme {
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
side: brand == HeqiBrand.consumer
? BorderSide(color: scheme.primary)
: null,
minimumSize: const Size.fromHeight(HeqiSize.buttonHeight),
shape: RoundedRectangleBorder(borderRadius: radius),
textStyle: textTheme.labelLarge,
@@ -108,10 +133,15 @@ abstract final class HeqiTheme {
),
),
navigationBarTheme: NavigationBarThemeData(
height: HeqiSize.navigationBarHeight,
height: brand == HeqiBrand.consumer ? 64 : HeqiSize.navigationBarHeight,
elevation: 0,
backgroundColor: scheme.surface,
indicatorColor: scheme.primaryContainer,
iconTheme: brand == HeqiBrand.consumer
? WidgetStateProperty.resolveWith(
(states) => IconThemeData(color: scheme.onSurfaceVariant),
)
: null,
labelTextStyle: WidgetStateProperty.resolveWith(
(states) => textTheme.labelSmall?.copyWith(
color: states.contains(WidgetState.selected)
@@ -124,11 +154,12 @@ abstract final class HeqiTheme {
),
),
chipTheme: ChipThemeData(
side: BorderSide.none,
side: BorderSide(color: scheme.outlineVariant),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(HeqiRadius.small),
),
labelStyle: textTheme.labelSmall,
// 显式指定文字对比色,避免 Chip 继承按钮前景色后白字落在白底。
labelStyle: textTheme.labelSmall?.copyWith(color: scheme.onSurface),
),
listTileTheme: const ListTileThemeData(
minTileHeight: 56,

View File

@@ -1,6 +1,6 @@
name: heqi_design_system
description: 和气物联网智能瓶阀移动端共享 Design System。
version: 0.1.0
version: 0.1.1
publish_to: none
environment: