feat(client): 登录模块对接后端 API

- auth_state: 增加 refreshToken 字段 + flutter_secure_storage 持久化
- api_client: 增加 401 自动 refresh + retry 拦截器
- auth_repository: 封装 POST /api/v1/auth/login 调用,错误信息本地化
- login_screen: 增加门店编号字段,调真实 API,行内错误展示
- main: 启动时 restore 持久化登录态,避免每次重启都要重新登录
- 修复 app_shell: hotelName → hotelNo
- 修复 widget_test: 移除失效的占位测试

测试账号:门店编号 H001 / 用户名 admin / 密码 password123

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-04-04 23:18:57 +08:00
parent 7849f6e7e5
commit cc687ae0c3
7 changed files with 341 additions and 76 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class DataTableCard extends StatelessWidget {
children: [
ConstrainedBox(
constraints: BoxConstraints(
minWidth: MediaQuery.of(context).size.width - 212 - 24,
minWidth: (MediaQuery.of(context).size.width - 212 - 24).clamp(0.0, double.infinity),
),
child: toolbar!,
),