fix: 健康仪表盘单位下移 + 档案按钮浅紫 + AI问诊胶囊改名 + 删除账号功能
This commit is contained in:
@@ -13,7 +13,6 @@ import '../pages/consultation/consultation_pages.dart';
|
||||
import '../pages/settings/settings_pages.dart';
|
||||
import '../pages/settings/notification_prefs_page.dart';
|
||||
import '../pages/profile/profile_page.dart';
|
||||
import '../pages/profile/service_package_detail_page.dart';
|
||||
import '../pages/diet/diet_capture_page.dart';
|
||||
import '../pages/device/device_scan_page.dart';
|
||||
import '../pages/device/device_management_page.dart';
|
||||
@@ -32,45 +31,74 @@ import '../providers/auth_provider.dart' show userRoleProvider;
|
||||
Widget buildPage(RouteInfo route, WidgetRef ref) {
|
||||
final params = route.params;
|
||||
switch (route.name) {
|
||||
case 'login': return const LoginPage();
|
||||
case 'login':
|
||||
return const LoginPage();
|
||||
case 'home':
|
||||
final role = ref.watch(userRoleProvider);
|
||||
return role == 'Doctor' ? const DoctorHomePage() : const HomePage();
|
||||
case 'doctorHome': return const DoctorHomePage();
|
||||
case 'adminHome': return const AdminHomePage();
|
||||
case 'adminAddDoctor': return const AdminAddDoctorPage();
|
||||
case 'trend': return TrendPage(metricType: params['type']?.isNotEmpty == true ? params['type'] : null);
|
||||
case 'calendar': return const HealthCalendarPage();
|
||||
case 'medications': return const MedicationListPage();
|
||||
case 'medCheckIn': return MedicationCheckInPage(medId: params['id']);
|
||||
case 'medicationEdit': return const MedicationEditPage();
|
||||
case 'reports': return const ReportListPage();
|
||||
case 'aiAnalysis': return AiAnalysisPage(id: params['id']!);
|
||||
case 'consultation': return DoctorChatPage(id: params['id']!);
|
||||
case 'exercisePlan': return const ExercisePlanPage();
|
||||
case 'exerciseCreate': return const ExercisePlanCreatePage();
|
||||
case 'dietRecords': return const DietRecordListPage();
|
||||
case 'dietCapture': return const DietCapturePage();
|
||||
case 'profile': return const ProfilePage();
|
||||
case 'doctorProfile': return const DoctorProfileEditPage();
|
||||
case 'doctorSettings': return const DoctorSettingsPage();
|
||||
case 'doctorPatientDetail': return DoctorPatientDetailPage(id: params['id']!);
|
||||
case 'doctorChat': return DoctorChatPage(id: params['id']!);
|
||||
case 'doctorReportDetail': return DoctorReportDetailPage(id: params['id']!);
|
||||
case 'doctorFollowUpEdit': return DoctorFollowUpEditPage(id: params['id']!);
|
||||
case 'devices': return const DeviceManagementPage();
|
||||
case 'deviceScan': return const DeviceScanPage();
|
||||
case 'healthArchive': return const HealthArchivePage();
|
||||
case 'followups': return const FollowUpListPage();
|
||||
case 'settings': return const SettingsPage();
|
||||
case 'notificationPrefs': return const NotificationPrefsPage();
|
||||
case 'staticText': return StaticTextPage(type: params['type']!);
|
||||
case 'servicePackageDetail': return ServicePackageDetailPage(packageId: params['id']!);
|
||||
case 'dietDetail': return DietRecordDetailPage(id: params['id']!);
|
||||
default: return const LoginPage();
|
||||
case 'doctorHome':
|
||||
return const DoctorHomePage();
|
||||
case 'adminHome':
|
||||
return const AdminHomePage();
|
||||
case 'adminAddDoctor':
|
||||
return const AdminAddDoctorPage();
|
||||
case 'trend':
|
||||
return TrendPage(
|
||||
metricType: params['type']?.isNotEmpty == true ? params['type'] : null,
|
||||
);
|
||||
case 'calendar':
|
||||
return const HealthCalendarPage();
|
||||
case 'medications':
|
||||
return const MedicationListPage();
|
||||
case 'medCheckIn':
|
||||
return MedicationCheckInPage(medId: params['id']);
|
||||
case 'medicationEdit':
|
||||
return const MedicationEditPage();
|
||||
case 'reports':
|
||||
return const ReportListPage();
|
||||
case 'aiAnalysis':
|
||||
return AiAnalysisPage(id: params['id']!);
|
||||
case 'exercisePlan':
|
||||
return const ExercisePlanPage();
|
||||
case 'exerciseCreate':
|
||||
return const ExercisePlanCreatePage();
|
||||
case 'dietRecords':
|
||||
return const DietRecordListPage();
|
||||
case 'dietCapture':
|
||||
return const DietCapturePage();
|
||||
case 'profile':
|
||||
return const ProfilePage();
|
||||
case 'doctorProfile':
|
||||
return const DoctorProfileEditPage();
|
||||
case 'doctorSettings':
|
||||
return const DoctorSettingsPage();
|
||||
case 'doctorPatientDetail':
|
||||
return DoctorPatientDetailPage(id: params['id']!);
|
||||
case 'doctorChat':
|
||||
return DoctorChatPage(id: params['id']!);
|
||||
case 'doctorReportDetail':
|
||||
return DoctorReportDetailPage(id: params['id']!);
|
||||
case 'doctorFollowUpEdit':
|
||||
return DoctorFollowUpEditPage(id: params['id']!);
|
||||
case 'devices':
|
||||
return const DeviceManagementPage();
|
||||
case 'deviceScan':
|
||||
return const DeviceScanPage();
|
||||
case 'healthArchive':
|
||||
return const HealthArchivePage();
|
||||
case 'followups':
|
||||
return const FollowUpListPage();
|
||||
case 'settings':
|
||||
return const SettingsPage();
|
||||
case 'notificationPrefs':
|
||||
return const NotificationPrefsPage();
|
||||
case 'staticText':
|
||||
return StaticTextPage(type: params['type']!);
|
||||
case 'dietDetail':
|
||||
return DietRecordDetailPage(id: params['id']!);
|
||||
default:
|
||||
return const LoginPage();
|
||||
}
|
||||
}
|
||||
|
||||
// ── 医生端次级页面 Stubs(逐步实现)──
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user