From e8bdb191955bc662b46994cc38d4b3a600f2f34b Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 16 Jun 2026 22:26:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(client):=20=E6=8A=BD=E5=B1=89+=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E5=8A=A0=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=EF=BC=9B=E9=85=92=E8=A1=8C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BE=AE=E4=BF=A1=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 左侧抽屉底部、系统设置页底部各加「退出登录」按钮(窄屏顶栏菜单 不便时也能退出;登出后路由 redirect 自动跳 /login) - 酒行信息 tab 补显示「微信号」行(模型/编辑弹窗早已支持 wechat_id, 仅只读展示遗漏) 121 测试通过。todo #54 #55。 Co-Authored-By: Claude Opus 4.8 --- .../lib/screens/settings/settings_screen.dart | 26 ++++++++ client/lib/screens/shell/app_shell.dart | 13 ++++ todo/todo.html | 62 ++++++++++++++++++- todo/todo.json | 30 ++++++++- 4 files changed, 126 insertions(+), 5 deletions(-) diff --git a/client/lib/screens/settings/settings_screen.dart b/client/lib/screens/settings/settings_screen.dart index 6a439f9..b2f7d7d 100644 --- a/client/lib/screens/settings/settings_screen.dart +++ b/client/lib/screens/settings/settings_screen.dart @@ -78,6 +78,28 @@ class _SettingsScreenState extends ConsumerState { ], ), ), + // 退出登录(常驻底部;登出后路由 redirect 自动跳 /login) + const Divider(height: 1), + SafeArea( + top: false, + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 8, 16, 12), + child: SizedBox( + width: double.infinity, + child: OutlinedButton.icon( + onPressed: () => + ref.read(authStateProvider.notifier).logout(), + icon: const Icon(Icons.logout, size: 18), + label: const Text('退出登录'), + style: OutlinedButton.styleFrom( + foregroundColor: AppTheme.danger, + side: const BorderSide(color: AppTheme.danger), + padding: const EdgeInsets.symmetric(vertical: 12), + ), + ), + ), + ), + ), ], ), ); @@ -154,6 +176,10 @@ class _SettingsScreenState extends ConsumerState { label: '负责人', value: shop.managerName.isNotEmpty ? shop.managerName : '—'), + const Divider(height: 16), + _ShopInfoRow( + label: '微信号', + value: shop.wechatId.isNotEmpty ? shop.wechatId : '—'), ], ), ), diff --git a/client/lib/screens/shell/app_shell.dart b/client/lib/screens/shell/app_shell.dart index 8a87479..a39cff4 100644 --- a/client/lib/screens/shell/app_shell.dart +++ b/client/lib/screens/shell/app_shell.dart @@ -142,6 +142,19 @@ class _AppShellState extends ConsumerState { }).toList(), ), ), + // 退出登录(抽屉底部常驻,窄屏顶栏菜单不便时也能退出) + const Divider(height: 1, color: Colors.white24), + ListTile( + leading: const Icon(Icons.logout, color: Colors.white70), + title: const Text('退出登录', + style: TextStyle( + color: Colors.white, fontWeight: FontWeight.w500)), + onTap: () { + Navigator.pop(context); // 关闭抽屉 + ref.read(authStateProvider.notifier).logout(); + context.go('/login'); + }, + ), ], ), ), diff --git a/todo/todo.html b/todo/todo.html index 37c7a69..d886036 100644 --- a/todo/todo.html +++ b/todo/todo.html @@ -223,10 +223,10 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }

酒库管理系统 — 项目 TODO

生成于 2026-06-16 · 真相源 todo/todo.json
-
49全部
+
51全部
1待开始
0开发中
-
34待验收
+
36待验收
14已验收
@@ -318,7 +318,7 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
- 🔍 待验收 34 + 🔍 待验收 36 ▴ 收起
@@ -875,6 +875,62 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; } + + + +
  • +
    + 左侧抽屉+系统设置页加退出登录按钮 +
    + 待验收 + 重要 + + + +
    +
    + + + + +
  • + +
  • +
    + 酒行信息显示微信号 +
    + 待验收 + 重要 + + + +
    +
    + + +