refactor: 移除前端 Mock API,新增共享组件,优化认证流程
- 删除 mock_api_client、mock_calendar_service、mock_history_service - 新增 fixed_length_code_input、link_button、message_composer 共享组件 - 优化登录/注册/密码重置页面使用新组件 - 简化 injection.dart 移除 mock 分支 - 更新 env.dart 配置(BACKEND_URL 替换 API_URL) - 后端 agentscope 工具和测试更新 - 重构 AGENTS.md 文档结构 - 新增 deploy/ 目录和 protocol 文档
This commit is contained in:
+2
-12
@@ -5,10 +5,9 @@ import 'core/di/injection.dart';
|
||||
import 'core/router/app_router.dart';
|
||||
import 'core/theme/app_theme.dart';
|
||||
import 'core/notifications/local_notification_service.dart';
|
||||
import 'features/auth/data/models/auth_response.dart';
|
||||
import 'features/auth/presentation/bloc/auth_bloc.dart';
|
||||
import 'features/auth/presentation/bloc/auth_event.dart';
|
||||
import 'features/calendar/data/services/mock_calendar_service.dart';
|
||||
import 'features/calendar/data/services/calendar_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@@ -18,16 +17,7 @@ void main() async {
|
||||
await notificationService.initialize();
|
||||
|
||||
final authBloc = sl<AuthBloc>();
|
||||
|
||||
if (Env.isMockApi) {
|
||||
authBloc.add(
|
||||
AuthLoggedIn(
|
||||
user: AuthUser(id: 'user_001', email: 'test@example.com'),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
authBloc.add(AuthStarted());
|
||||
}
|
||||
authBloc.add(AuthStarted());
|
||||
|
||||
try {
|
||||
final now = DateTime.now();
|
||||
|
||||
Reference in New Issue
Block a user