Browse Source

设施的确认页面与详情页面

liukai 4 days ago
parent
commit
8653907739
34 changed files with 996 additions and 669 deletions
  1. 63 110
      packages/cpt_auth/lib/modules/select_estate/select_estate_page.dart
  2. 0 3
      packages/cpt_auth/lib/modules/select_estate/select_estate_view_model.dart
  3. 1 1
      packages/cpt_auth/lib/modules/select_role/select_role_page.dart
  4. 151 199
      packages/cpt_auth/lib/modules/select_unit/select_unit_page.dart
  5. 0 4
      packages/cpt_auth/lib/modules/select_unit/select_unit_view_model.dart
  6. 0 92
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_full_screen.dart
  7. 73 6
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_page.dart
  8. 0 90
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_small_screen.dart
  9. 3 1
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_view_model.dart
  10. 53 100
      packages/cpt_auth/lib/modules/tenant_doc/tenant_doc_page.dart
  11. 0 4
      packages/cpt_auth/lib/modules/tenant_doc/tenant_doc_view_model.dart
  12. 0 5
      packages/cpt_auth/lib/router/component/auth_component_service.dart
  13. 284 0
      packages/cpt_facility/lib/modules/book_confirm/book_confirm_page.dart
  14. 3 0
      packages/cpt_facility/lib/modules/book_confirm/book_confirm_state.dart
  15. 25 0
      packages/cpt_facility/lib/modules/book_confirm/book_confirm_view_model.dart
  16. 27 0
      packages/cpt_facility/lib/modules/book_confirm/book_confirm_view_model.g.dart
  17. 142 35
      packages/cpt_facility/lib/modules/booking/facility_booking_page.dart
  18. 19 0
      packages/cpt_facility/lib/modules/booking/facility_booking_state.dart
  19. 34 3
      packages/cpt_facility/lib/modules/booking/facility_booking_view_model.dart
  20. 1 1
      packages/cpt_facility/lib/modules/booking/facility_booking_view_model.g.dart
  21. 12 2
      packages/cpt_facility/lib/modules/detail/facility_detail_page.dart
  22. 3 4
      packages/cpt_facility/lib/modules/facility/history/facility_history_screen.dart
  23. 2 0
      packages/cpt_facility/lib/router/page/facility_page_router.dart
  24. 20 0
      packages/cpt_facility/lib/router/page/facility_page_router.gr.dart
  25. 1 1
      packages/cpt_property/lib/modules/property/vm/property_vm.g.dart
  26. 10 2
      packages/cs_resources/lib/generated/intl/messages_en.dart
  27. 8 2
      packages/cs_resources/lib/generated/intl/messages_zh_CN.dart
  28. 8 2
      packages/cs_resources/lib/generated/intl/messages_zh_HK.dart
  29. 40 0
      packages/cs_resources/lib/generated/l10n.dart
  30. 4 0
      packages/cs_resources/lib/l10n/intl_en.arb
  31. 4 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  32. 4 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  33. 0 2
      packages/cs_router/lib/componentRouter/auth_service.dart
  34. 1 0
      packages/cs_router/lib/path/router_path.dart

+ 63 - 110
packages/cpt_auth/lib/modules/select_estate/select_estate_page.dart

@@ -4,10 +4,8 @@ import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:auto_route/auto_route.dart';
-import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/ext/auto_router_extensions.dart';
-import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_button.dart';
@@ -32,121 +30,76 @@ class SelectEstatePage extends HookConsumerWidget {
     }
     }
   }
   }
 
 
-  // 为需要测量的控件创建 GlobalKey
-  final GlobalKey _appbarKey = GlobalKey();
-  final GlobalKey _topImageKey = GlobalKey();
-  final GlobalKey _titleKey = GlobalKey();
-  final GlobalKey _inputKey = GlobalKey();
-  final GlobalKey _descriptionKey = GlobalKey();
-  final GlobalKey _buttonKey = GlobalKey();
-
   @override
   @override
   Widget build(BuildContext context, WidgetRef ref) {
   Widget build(BuildContext context, WidgetRef ref) {
     final viewModel = ref.watch(selectEstateViewModelProvider.notifier);
     final viewModel = ref.watch(selectEstateViewModelProvider.notifier);
     final state = ref.watch(selectEstateViewModelProvider);
     final state = ref.watch(selectEstateViewModelProvider);
 
 
-    // 获取屏幕高度
-    final screenHeight = MediaQuery.of(context).size.height;
-    final statusBarHeight = MediaQuery.of(context).padding.top;
-    final navigationBarHeight = MediaQuery.of(context).padding.bottom;
-
-    useEffect(() {
-      double usedHeight = 0;
-      // 组件挂载时执行,获取控件高度
-      WidgetsBinding.instance.addPostFrameCallback((_) {
-        // 获取各个控件的高度
-        usedHeight += _appbarKey.currentContext?.size?.height ?? 0;
-        usedHeight += _topImageKey.currentContext?.size?.height ?? 0;
-        usedHeight += _titleKey.currentContext?.size?.height ?? 0;
-        usedHeight += _inputKey.currentContext?.size?.height ?? 0;
-        usedHeight += _descriptionKey.currentContext?.size?.height ?? 0;
-        usedHeight += _buttonKey.currentContext?.size?.height ?? 0;
-
-        // 计算剩余空间
-        double remainingSpace = screenHeight - statusBarHeight - navigationBarHeight - usedHeight - 38 - 28 - 20 - 19;
-
-        Log.d("计算剩余空间:$remainingSpace");
-
-        if (remainingSpace > 0) {
-          // 设置一个状态来存储剩余空间的高度
-          viewModel.setRemainingSpace(remainingSpace);
-        }
-      });
-      return () {
-        // 组件卸载时执行
-      };
-    }, []);
-
     return Scaffold(
     return Scaffold(
-      appBar: MyAppBar.appBar(context, S.current.yy_home_accounts, key: _appbarKey),
+      appBar: MyAppBar.appBar(context, S.current.yy_home_accounts),
       backgroundColor: context.appColors.backgroundDefault,
       backgroundColor: context.appColors.backgroundDefault,
-      body: SingleChildScrollView(
-        scrollDirection: Axis.vertical,
-        physics: const BouncingScrollPhysics(),
-        child: Container(
-          padding: const EdgeInsets.symmetric(horizontal: 38),
-          width: double.infinity,
-          child: Column(
-            mainAxisSize: MainAxisSize.max,
-            crossAxisAlignment: CrossAxisAlignment.center,
-            children: [
-              //顶部图片
-              MyAssetImage(
-                key: _topImageKey,
-                Assets.authChooseEstateBuilding,
-                width: 267,
-                height: 158,
-              ).marginOnly(top: 28, bottom: 38),
-
-              MyTextView(
-                key: _titleKey,
-                S.current.estate_or_building_name,
-                fontSize: 23,
-                marginBottom: 20,
-                textAlign: TextAlign.center,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              //输入资产的名称
-              _buildInputLayout(
-                context,
-                state,
-                "estate",
-                key: _inputKey,
-                textInputAction: TextInputAction.done,
-                onSubmit: (formKey, value) {
-                  state.formData[formKey]!['focusNode'].unfocus();
-                },
-              ),
-
-              MyTextView(
-                key: _descriptionKey,
-                S.current.estate_name_desc,
-                fontSize: 15,
-                marginTop: 19,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              SizedBox(
-                height: state.remainingSpace, // 使用剩余空间的值
-              ),
-
-              MyButton(
-                key: _buttonKey,
-                onPressed: viewModel.submitEstate,
-                text: S.current.next,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                fontWeight: FontWeight.w500,
-                type: ClickType.throttle,
-                fontSize: 16,
-                minHeight: 50,
-                radius: 5,
-              ).marginOnly(top: 40, bottom: 30),
-            ],
-          ),
+      body: Container(
+        padding: const EdgeInsets.symmetric(horizontal: 38),
+        width: double.infinity,
+        child: Column(
+          mainAxisSize: MainAxisSize.max,
+          crossAxisAlignment: CrossAxisAlignment.center,
+          children: [
+            SingleChildScrollView(
+                scrollDirection: Axis.vertical,
+                physics: const BouncingScrollPhysics(),
+                child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  children: [
+                    //顶部图片
+                    const MyAssetImage(
+                      Assets.authChooseEstateBuilding,
+                      width: 267,
+                      height: 158,
+                    ).marginOnly(top: 28, bottom: 38),
+
+                    MyTextView(
+                      S.current.estate_or_building_name,
+                      fontSize: 23,
+                      marginBottom: 20,
+                      textAlign: TextAlign.center,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+
+                    //输入资产的名称
+                    _buildInputLayout(
+                      context,
+                      state,
+                      "estate",
+                      textInputAction: TextInputAction.done,
+                      onSubmit: (formKey, value) {
+                        state.formData[formKey]!['focusNode'].unfocus();
+                      },
+                    ),
+
+                    MyTextView(
+                      S.current.estate_name_desc,
+                      fontSize: 15,
+                      marginTop: 19,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                  ],
+                )).expanded(),
+
+            MyButton(
+              onPressed: viewModel.submitEstate,
+              text: S.current.next,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 5,
+            ).marginOnly(top: 50, bottom: 50),
+          ],
         ),
         ),
       ),
       ),
     );
     );

+ 0 - 3
packages/cpt_auth/lib/modules/select_estate/select_estate_view_model.dart

@@ -18,7 +18,4 @@ class SelectEstateViewModel extends _$SelectEstateViewModel {
     SelectUnitPage.startInstance();
     SelectUnitPage.startInstance();
   }
   }
 
 
-  void setRemainingSpace(double remainingSpace) {
-    state = state.copyWith(remainingSpace: remainingSpace);
-  }
 }
 }

+ 1 - 1
packages/cpt_auth/lib/modules/select_role/select_role_page.dart

@@ -106,7 +106,7 @@ class SelectRolePage extends HookConsumerWidget {
               fontSize: 16,
               fontSize: 16,
               minHeight: 50,
               minHeight: 50,
               radius: 5,
               radius: 5,
-            ).marginOnly(top: 30, bottom: 30, left: 18, right: 18),
+            ).marginOnly(top: 50, bottom: 50, left: 18, right: 18),
           ],
           ],
         ),
         ),
       ),
       ),

+ 151 - 199
packages/cpt_auth/lib/modules/select_unit/select_unit_page.dart

@@ -32,212 +32,164 @@ class SelectUnitPage extends HookConsumerWidget {
     }
     }
   }
   }
 
 
-  // 为需要测量的控件创建 GlobalKey
-  final GlobalKey _appbarKey = GlobalKey();
-  final GlobalKey _topImageKey = GlobalKey();
-  final GlobalKey _inputKey = GlobalKey();
-  final GlobalKey _description1Key = GlobalKey();
-  final GlobalKey _description2Key = GlobalKey();
-  final GlobalKey _description3Key = GlobalKey();
-  final GlobalKey _buttonKey = GlobalKey();
-
   @override
   @override
   Widget build(BuildContext context, WidgetRef ref) {
   Widget build(BuildContext context, WidgetRef ref) {
     final viewModel = ref.watch(selectUnitViewModelProvider.notifier);
     final viewModel = ref.watch(selectUnitViewModelProvider.notifier);
     final state = ref.watch(selectUnitViewModelProvider);
     final state = ref.watch(selectUnitViewModelProvider);
 
 
-    // 获取屏幕高度
-    final screenHeight = MediaQuery.of(context).size.height;
-    final statusBarHeight = MediaQuery.of(context).padding.top;
-    final navigationBarHeight = MediaQuery.of(context).padding.bottom;
-
-    useEffect(() {
-      double usedHeight = 0;
-      // 组件挂载时执行,获取控件高度
-      WidgetsBinding.instance.addPostFrameCallback((_) {
-        // 获取各个控件的高度
-        usedHeight += _appbarKey.currentContext?.size?.height ?? 0;
-        usedHeight += _topImageKey.currentContext?.size?.height ?? 0;
-        usedHeight += _inputKey.currentContext?.size?.height ?? 0;
-        usedHeight += _description1Key.currentContext?.size?.height ?? 0;
-        usedHeight += _description2Key.currentContext?.size?.height ?? 0;
-        usedHeight += _description3Key.currentContext?.size?.height ?? 0;
-        usedHeight += _buttonKey.currentContext?.size?.height ?? 0;
-
-        // 计算剩余空间
-        double remainingSpace = screenHeight - statusBarHeight - navigationBarHeight - usedHeight - 28 - 18 - 25 - 20 - 20;
-
-        Log.d("计算剩余空间:$remainingSpace");
-
-        if (remainingSpace > 0) {
-          // 设置一个状态来存储剩余空间的高度
-          viewModel.setRemainingSpace(remainingSpace);
-        }
-      });
-      return () {
-        // 组件卸载时执行
-      };
-    }, []);
-
     return Scaffold(
     return Scaffold(
-      appBar: MyAppBar.appBar(context, S.current.yy_home_accounts, key: _appbarKey),
+      appBar: MyAppBar.appBar(context, S.current.yy_home_accounts),
       backgroundColor: context.appColors.backgroundDefault,
       backgroundColor: context.appColors.backgroundDefault,
-      body: SingleChildScrollView(
-        scrollDirection: Axis.vertical,
-        physics: const BouncingScrollPhysics(),
-        child: Container(
-          padding: const EdgeInsets.symmetric(horizontal: 20),
-          width: double.infinity,
-          child: Column(
-            mainAxisSize: MainAxisSize.max,
-            crossAxisAlignment: CrossAxisAlignment.center,
-            children: [
-              //顶部图片
-              MyAssetImage(
-                key: _topImageKey,
-                Assets.authSignUpUnitImg,
-                width: 266.5,
-                height: 162,
-              ).marginOnly(top: 28, bottom: 18),
-
-              Row(
-                key: _inputKey,
-                mainAxisSize: MainAxisSize.min,
-                children: [
-                  //街区
-                  Column(
-                    crossAxisAlignment: CrossAxisAlignment.start,
-                    children: [
-                      MyTextView(
-                        S.current.block,
-                        marginBottom: 9,
-                        textColor: context.appColors.textBlack,
-                        fontSize: 16,
-                        isFontMedium: true,
-                      ),
-
-                      // 表单 - 街区
-                      _buildInputLayout(
-                        context,
-                        state,
-                        "block",
-                        textInputAction: TextInputAction.next,
-                        onSubmit: (formKey, value) {
-                          state.formData[formKey]!['focusNode'].unfocus();
-                          FocusScope.of(context).requestFocus(state.formData['unit']!['focusNode']);
-                        },
-                      ).constrained(width: 88),
-                    ],
-                  ),
-
-                  MyTextView(
-                    "#",
-                    marginTop: 20,
-                    marginLeft: 8.5,
-                    marginRight: 8.5,
-                    textColor: context.appColors.textBlack,
-                    fontSize: 16,
-                    isFontMedium: true,
-                  ),
-
-                  //单元
-                  Column(
-                    crossAxisAlignment: CrossAxisAlignment.start,
-                    children: [
-                      MyTextView(
-                        S.current.unit_number,
-                        marginBottom: 9,
-                        textColor: context.appColors.textBlack,
-                        fontSize: 16,
-                        isFontMedium: true,
-                      ),
-                      Row(
-                        children: [
-                          // 表单 - 单元
-                          _buildInputLayout(
-                            context,
-                            state,
-                            "unit",
-                            textInputAction: TextInputAction.next,
-                            onSubmit: (formKey, value) {
-                              state.formData[formKey]!['focusNode'].unfocus();
-                              FocusScope.of(context).requestFocus(state.formData['room']!['focusNode']);
-                            },
-                          ).constrained(width: 83),
-
-                          MyTextView(
-                            "-",
-                            textColor: context.appColors.textBlack,
-                            marginLeft: 4,
-                            marginRight: 4,
-                            isFontMedium: true,
-                          ),
-
-                          // 表单 - 房号
-                          _buildInputLayout(
-                            context,
-                            state,
-                            "room",
-                            textInputAction: TextInputAction.done,
-                            onSubmit: (formKey, value) {
-                              state.formData[formKey]!['focusNode'].unfocus();
-                            },
-                          ).constrained(width: 83),
-                        ],
-                      ),
-                    ],
-                  ),
-                ],
-              ),
-
-              MyTextView(
-                key: _description1Key,
-                S.current.block_desc,
-                fontSize: 15,
-                marginTop: 25,
-                textAlign: TextAlign.center,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              MyTextView(
-                key: _description2Key,
-                S.current.block_example,
-                fontSize: 15,
-                marginTop: 20,
-                textAlign: TextAlign.center,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              MyTextView(
-                key: _description3Key,
-                S.current.block_example_desc,
-                fontSize: 15,
-                marginTop: 20,
-                textAlign: TextAlign.center,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              SizedBox(
-                height: state.remainingSpace, // 使用剩余空间的值
-              ),
-
-              MyButton(
-                key: _buttonKey,
-                onPressed: viewModel.submitUnit,
-                text: S.current.next,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                fontWeight: FontWeight.w500,
-                type: ClickType.throttle,
-                fontSize: 16,
-                minHeight: 50,
-                radius: 5,
-              ).marginOnly(top: 40, bottom: 30, left: 18, right: 18),
-            ],
-          ),
+      body: Container(
+        padding: const EdgeInsets.symmetric(horizontal: 20),
+        width: double.infinity,
+        child: Column(
+          mainAxisSize: MainAxisSize.max,
+          crossAxisAlignment: CrossAxisAlignment.center,
+          children: [
+            SingleChildScrollView(
+                scrollDirection: Axis.vertical,
+                physics: const BouncingScrollPhysics(),
+                child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  children: [
+                    //顶部图片
+                    const MyAssetImage(
+                      Assets.authSignUpUnitImg,
+                      width: 266.5,
+                      height: 162,
+                    ).marginOnly(top: 28, bottom: 18),
+
+                    Row(
+                      mainAxisSize: MainAxisSize.min,
+                      children: [
+                        //街区
+                        Column(
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [
+                            MyTextView(
+                              S.current.block,
+                              marginBottom: 9,
+                              textColor: context.appColors.textBlack,
+                              fontSize: 16,
+                              isFontMedium: true,
+                            ),
+
+                            // 表单 - 街区
+                            _buildInputLayout(
+                              context,
+                              state,
+                              "block",
+                              textInputAction: TextInputAction.next,
+                              onSubmit: (formKey, value) {
+                                state.formData[formKey]!['focusNode'].unfocus();
+                                FocusScope.of(context).requestFocus(state.formData['unit']!['focusNode']);
+                              },
+                            ).constrained(width: 88),
+                          ],
+                        ),
+
+                        MyTextView(
+                          "#",
+                          marginTop: 20,
+                          marginLeft: 8.5,
+                          marginRight: 8.5,
+                          textColor: context.appColors.textBlack,
+                          fontSize: 16,
+                          isFontMedium: true,
+                        ),
+
+                        //单元
+                        Column(
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [
+                            MyTextView(
+                              S.current.unit_number,
+                              marginBottom: 9,
+                              textColor: context.appColors.textBlack,
+                              fontSize: 16,
+                              isFontMedium: true,
+                            ),
+                            Row(
+                              children: [
+                                // 表单 - 单元
+                                _buildInputLayout(
+                                  context,
+                                  state,
+                                  "unit",
+                                  textInputAction: TextInputAction.next,
+                                  onSubmit: (formKey, value) {
+                                    state.formData[formKey]!['focusNode'].unfocus();
+                                    FocusScope.of(context).requestFocus(state.formData['room']!['focusNode']);
+                                  },
+                                ).constrained(width: 83),
+
+                                MyTextView(
+                                  "-",
+                                  textColor: context.appColors.textBlack,
+                                  marginLeft: 4,
+                                  marginRight: 4,
+                                  isFontMedium: true,
+                                ),
+
+                                // 表单 - 房号
+                                _buildInputLayout(
+                                  context,
+                                  state,
+                                  "room",
+                                  textInputAction: TextInputAction.done,
+                                  onSubmit: (formKey, value) {
+                                    state.formData[formKey]!['focusNode'].unfocus();
+                                  },
+                                ).constrained(width: 83),
+                              ],
+                            ),
+                          ],
+                        ),
+                      ],
+                    ),
+
+                    MyTextView(
+                      S.current.block_desc,
+                      fontSize: 15,
+                      marginTop: 25,
+                      textAlign: TextAlign.center,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+
+                    MyTextView(
+                      S.current.block_example,
+                      fontSize: 15,
+                      marginTop: 20,
+                      textAlign: TextAlign.center,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+
+                    MyTextView(
+                      S.current.block_example_desc,
+                      fontSize: 15,
+                      marginTop: 20,
+                      textAlign: TextAlign.center,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                  ],
+                )).expanded(),
+
+            MyButton(
+              onPressed: viewModel.submitUnit,
+              text: S.current.next,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 5,
+            ).marginOnly(top: 50, bottom: 50, left: 18, right: 18),
+          ],
         ),
         ),
       ),
       ),
     );
     );

+ 0 - 4
packages/cpt_auth/lib/modules/select_unit/select_unit_view_model.dart

@@ -17,8 +17,4 @@ class SelectUnitViewModel extends _$SelectUnitViewModel {
     SelectRolePage.startInstance();
     SelectRolePage.startInstance();
   }
   }
 
 
-  void setRemainingSpace(double remainingSpace) {
-    state = state.copyWith(remainingSpace: remainingSpace);
-  }
-
 }
 }

+ 0 - 92
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_full_screen.dart

@@ -1,92 +0,0 @@
-import 'package:cs_resources/generated/assets.dart';
-import 'package:cs_resources/generated/l10n.dart';
-import 'package:cs_resources/theme/app_colors_theme.dart';
-import 'package:flutter/material.dart';
-import 'package:auto_route/auto_route.dart';
-import 'package:hooks_riverpod/hooks_riverpod.dart';
-import 'package:router/ext/auto_router_extensions.dart';
-import 'package:widgets/ext/ex_widget.dart';
-import 'package:widgets/my_appbar.dart';
-import 'package:widgets/my_button.dart';
-import 'package:widgets/my_load_image.dart';
-import 'package:widgets/my_text_view.dart';
-
-import '../../router/page/auth_page_router.dart';
-import 'sign_up_success_view_model.dart';
-
-//全面屏手机
-class SignUpSuccessFullScreen extends HookConsumerWidget {
-  const SignUpSuccessFullScreen({Key? key}) : super(key: key);
-
-  @override
-  Widget build(BuildContext context, WidgetRef ref) {
-    final viewModel = ref.watch(signUpSuccessViewModelProvider.notifier);
-
-    return LayoutBuilder(
-      builder: (context, constraints) {
-        return Container(
-          padding: const EdgeInsets.symmetric(horizontal: 20),
-          width: double.infinity,
-          height: constraints.maxHeight, // 占满父容器的高度
-          child: Column(
-            crossAxisAlignment: CrossAxisAlignment.start,
-            children: [
-              //顶部图片
-              const MyAssetImage(
-                Assets.authYyHomeSuccess,
-                width: 264,
-                height: 180,
-              ).alignCenter().marginOnly(top: 12),
-
-              MyTextView(
-                S.current.welcome_name("Hu yu"),
-                fontSize: 23,
-                marginTop: 30,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              MyTextView(
-                S.current.sign_up_success_txt1,
-                fontSize: 15,
-                marginTop: 25,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              MyTextView(
-                S.current.sign_up_success_txt2,
-                fontSize: 15,
-                marginTop: 20,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              MyTextView(
-                S.current.sign_up_success_txt3,
-                fontSize: 15,
-                marginTop: 20,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-
-              const Spacer(),
-
-              MyButton(
-                onPressed: viewModel.gotoSelectEstatePage,
-                text: S.current.get_started,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                fontWeight: FontWeight.w500,
-                type: ClickType.throttle,
-                fontSize: 16,
-                minHeight: 50,
-                radius: 5,
-              ).marginOnly(top: 50, bottom: 50, left: 18, right: 18),
-            ],
-          ),
-        );
-      },
-    );
-  }
-}

+ 73 - 6
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_page.dart

@@ -1,4 +1,4 @@
-import 'package:cpt_auth/modules/sing_up_success/sign_up_success_full_screen.dart';
+import 'package:cpt_auth/modules/sing_up_success/sign_up_success_view_model.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
@@ -6,10 +6,12 @@ import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_appbar.dart';
-import 'package:widgets/responsive_widget.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
 import '../../router/page/auth_page_router.dart';
 import '../../router/page/auth_page_router.dart';
-import 'sign_up_success_small_screen.dart';
 
 
 @RoutePage()
 @RoutePage()
 class SignUpSuccessPage extends HookConsumerWidget {
 class SignUpSuccessPage extends HookConsumerWidget {
@@ -26,12 +28,77 @@ class SignUpSuccessPage extends HookConsumerWidget {
 
 
   @override
   @override
   Widget build(BuildContext context, WidgetRef ref) {
   Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(signUpSuccessViewModelProvider.notifier);
+
     return Scaffold(
     return Scaffold(
       appBar: MyAppBar.appBar(context, ""),
       appBar: MyAppBar.appBar(context, ""),
       backgroundColor: context.appColors.backgroundDefault,
       backgroundColor: context.appColors.backgroundDefault,
-      body: const ResponsiveWidget(
-        smallScreen: SignUpSuccessSmallScreen(),
-        smallFullScreen: SignUpSuccessFullScreen(),
+      body: Container(
+        padding: const EdgeInsets.symmetric(horizontal: 20),
+        width: double.infinity,
+        child: Column(
+          mainAxisSize: MainAxisSize.max,
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            SingleChildScrollView(
+                scrollDirection: Axis.vertical,
+                physics: const BouncingScrollPhysics(),
+                child: Column(
+                  children: [
+                    //顶部图片
+                    const MyAssetImage(
+                      Assets.authYyHomeSuccess,
+                      width: 264,
+                      height: 180,
+                    ).alignCenter().marginOnly(top: 12),
+
+                    MyTextView(
+                      S.current.welcome_name("Huyu"),
+                      fontSize: 23,
+                      marginTop: 30,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+
+                    MyTextView(
+                      S.current.sign_up_success_txt1,
+                      fontSize: 15,
+                      marginTop: 25,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+
+                    MyTextView(
+                      S.current.sign_up_success_txt2,
+                      fontSize: 15,
+                      marginTop: 20,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+
+                    MyTextView(
+                      S.current.sign_up_success_txt3,
+                      fontSize: 15,
+                      marginTop: 20,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                  ],
+                )).expanded(),
+
+            MyButton(
+              onPressed: viewModel.gotoSelectEstatePage,
+              text: S.current.get_started,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 5,
+            ).marginOnly(top: 50, bottom: 50, left: 18, right: 18),
+          ],
+        ),
       ),
       ),
     );
     );
   }
   }

+ 0 - 90
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_small_screen.dart

@@ -1,90 +0,0 @@
-import 'package:cs_resources/generated/assets.dart';
-import 'package:cs_resources/generated/l10n.dart';
-import 'package:cs_resources/theme/app_colors_theme.dart';
-import 'package:flutter/material.dart';
-import 'package:auto_route/auto_route.dart';
-import 'package:hooks_riverpod/hooks_riverpod.dart';
-import 'package:router/ext/auto_router_extensions.dart';
-import 'package:widgets/ext/ex_widget.dart';
-import 'package:widgets/my_appbar.dart';
-import 'package:widgets/my_button.dart';
-import 'package:widgets/my_load_image.dart';
-import 'package:widgets/my_text_view.dart';
-
-import '../../router/page/auth_page_router.dart';
-import 'sign_up_success_view_model.dart';
-
-//小屏手机
-class SignUpSuccessSmallScreen extends HookConsumerWidget {
-  const SignUpSuccessSmallScreen({Key? key}) : super(key: key);
-
-  @override
-  Widget build(BuildContext context, WidgetRef ref) {
-    final viewModel = ref.watch(signUpSuccessViewModelProvider.notifier);
-
-    return SingleChildScrollView(
-      scrollDirection: Axis.vertical,
-      physics: const BouncingScrollPhysics(),
-      child: Container(
-        padding: const EdgeInsets.symmetric(horizontal: 20),
-        width: double.infinity,
-        child: Column(
-          mainAxisSize: MainAxisSize.max,
-          crossAxisAlignment: CrossAxisAlignment.start,
-          children: [
-            //顶部图片
-            const MyAssetImage(
-              Assets.authYyHomeSuccess,
-              width: 264,
-              height: 180,
-            ).alignCenter().marginOnly(top: 12),
-
-            MyTextView(
-              S.current.welcome_name("Huyu"),
-              fontSize: 23,
-              marginTop: 30,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyTextView(
-              S.current.sign_up_success_txt1,
-              fontSize: 15,
-              marginTop: 25,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyTextView(
-              S.current.sign_up_success_txt2,
-              fontSize: 15,
-              marginTop: 20,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyTextView(
-              S.current.sign_up_success_txt3,
-              fontSize: 15,
-              marginTop: 20,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyButton(
-              onPressed: viewModel.gotoSelectEstatePage,
-              text: S.current.get_started,
-              textColor: Colors.white,
-              backgroundColor: context.appColors.btnBgDefault,
-              fontWeight: FontWeight.w500,
-              type: ClickType.throttle,
-              fontSize: 16,
-              minHeight: 50,
-              radius: 5,
-            ).marginOnly(top: 50, bottom: 50, left: 18, right: 18),
-          ],
-        ),
-      ),
-    );
-  }
-}

+ 3 - 1
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_view_model.dart

@@ -1,6 +1,8 @@
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 
 
+import '../select_estate/select_estate_page.dart';
+
 part 'sign_up_success_view_model.g.dart';
 part 'sign_up_success_view_model.g.dart';
 
 
 @riverpod
 @riverpod
@@ -10,6 +12,6 @@ class SignUpSuccessViewModel extends _$SignUpSuccessViewModel {
 
 
   //去选择社区的页面
   //去选择社区的页面
   void gotoSelectEstatePage() {
   void gotoSelectEstatePage() {
-    ToastEngine.show("去选择社区的页面");
+    SelectEstatePage.startInstance();
   }
   }
 }
 }

+ 53 - 100
packages/cpt_auth/lib/modules/tenant_doc/tenant_doc_page.dart

@@ -2,10 +2,8 @@ import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:auto_route/auto_route.dart';
-import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/ext/auto_router_extensions.dart';
-import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_button.dart';
@@ -28,55 +26,16 @@ class TenantDocPage extends HookConsumerWidget {
     }
     }
   }
   }
 
 
-  // 为需要测量的控件创建 GlobalKey
-  final GlobalKey _appbarKey = GlobalKey();
-  final GlobalKey _titleKey = GlobalKey();
-  final GlobalKey _descriptionKey = GlobalKey();
-  final GlobalKey _description1Key = GlobalKey();
-  final GlobalKey _description2Key = GlobalKey();
-  final GlobalKey _nineGridKey = GlobalKey();
-  final GlobalKey _buttonKey = GlobalKey();
-
   @override
   @override
   Widget build(BuildContext context, WidgetRef ref) {
   Widget build(BuildContext context, WidgetRef ref) {
     final viewModel = ref.read(tenantDocViewModelProvider.notifier);
     final viewModel = ref.read(tenantDocViewModelProvider.notifier);
     final state = ref.watch(tenantDocViewModelProvider);
     final state = ref.watch(tenantDocViewModelProvider);
 
 
-    // 获取屏幕高度
-    final screenHeight = MediaQuery.of(context).size.height;
-    final statusBarHeight = MediaQuery.of(context).padding.top;
-    final navigationBarHeight = MediaQuery.of(context).padding.bottom;
-
-    useEffect(() {
-      double usedHeight = 0;
-      // 组件挂载时执行,获取控件高度
-      WidgetsBinding.instance.addPostFrameCallback((_) {
-        // 获取各个控件的高度
-        usedHeight += _appbarKey.currentContext?.size?.height ?? 0;
-        usedHeight += _titleKey.currentContext?.size?.height ?? 0;
-        usedHeight += _descriptionKey.currentContext?.size?.height ?? 0;
-        usedHeight += _description1Key.currentContext?.size?.height ?? 0;
-        usedHeight += _description2Key.currentContext?.size?.height ?? 0;
-        usedHeight += _nineGridKey.currentContext?.size?.height ?? 0;
-        usedHeight += _buttonKey.currentContext?.size?.height ?? 0;
-
-        // 计算剩余空间
-        double remainingSpace = screenHeight - statusBarHeight - navigationBarHeight - usedHeight - 23 - 21;
-
-        Log.d("计算剩余空间:$remainingSpace");
-
-        if (remainingSpace > 0) {
-          // 设置一个状态来存储剩余空间的高度
-          viewModel.setRemainingSpace(remainingSpace);
-        }
-      });
-      return () {
-        // 组件卸载时执行
-      };
-    }, []);
-
     return Scaffold(
     return Scaffold(
-      appBar: MyAppBar.appBar(context, "", key: _appbarKey),
+      appBar: MyAppBar.appBar(
+        context,
+        "",
+      ),
       backgroundColor: context.appColors.backgroundDefault,
       backgroundColor: context.appColors.backgroundDefault,
       body: Container(
       body: Container(
         padding: const EdgeInsets.symmetric(horizontal: 15),
         padding: const EdgeInsets.symmetric(horizontal: 15),
@@ -85,63 +44,57 @@ class TenantDocPage extends HookConsumerWidget {
           mainAxisSize: MainAxisSize.max,
           mainAxisSize: MainAxisSize.max,
           crossAxisAlignment: CrossAxisAlignment.start,
           crossAxisAlignment: CrossAxisAlignment.start,
           children: [
           children: [
-            MyTextView(
-              key: _titleKey,
-              S.current.upload_documents,
-              fontSize: 23.5,
-              marginTop: 23,
-              marginBottom: 21,
-              textAlign: TextAlign.center,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyTextView(
-              key: _descriptionKey,
-              S.current.upload_doc_desc,
-              fontSize: 15,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyTextView(
-              key: _description1Key,
-              S.current.upload_doc_desc1,
-              fontSize: 15,
-              marginTop: 22,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            MyTextView(
-              key: _description2Key,
-              S.current.upload_doc_desc2,
-              fontSize: 15,
-              marginTop: 22,
-              marginBottom: 24,
-              isFontMedium: true,
-              textColor: context.appColors.textBlack,
-            ),
-
-            ImageNineGrid(
-              key: _nineGridKey,
-              isSelectEnable: true,
-              maxImages: 3,
-              spacing: 10,
-              aspectRatio: 108 / 80,
-              initialImages: [],
-              onImagesChanged: (list) {
-                viewModel.setDocList(list);
-              },
-            ),
-
-            SizedBox(
-              height: state.remainingSpace, // 使用剩余空间的值
-            ),
+            SingleChildScrollView(
+                scrollDirection: Axis.vertical,
+                physics: const BouncingScrollPhysics(),
+                child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  children: [
+                    MyTextView(
+                      S.current.upload_documents,
+                      fontSize: 23.5,
+                      marginTop: 23,
+                      marginBottom: 21,
+                      textAlign: TextAlign.center,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                    MyTextView(
+                      S.current.upload_doc_desc,
+                      fontSize: 15,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                    MyTextView(
+                      S.current.upload_doc_desc1,
+                      fontSize: 15,
+                      marginTop: 22,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                    MyTextView(
+                      S.current.upload_doc_desc2,
+                      fontSize: 15,
+                      marginTop: 22,
+                      marginBottom: 24,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                    ),
+                    ImageNineGrid(
+                      isSelectEnable: true,
+                      maxImages: 3,
+                      spacing: 10,
+                      aspectRatio: 108 / 80,
+                      initialImages: [],
+                      onImagesChanged: (list) {
+                        viewModel.setDocList(list);
+                      },
+                    ),
+                  ],
+                )).expanded(),
 
 
             //底部的按钮
             //底部的按钮
             MyButton(
             MyButton(
-              key: _buttonKey,
               onPressed: viewModel.submitDoc,
               onPressed: viewModel.submitDoc,
               text: S.current.next,
               text: S.current.next,
               textColor: Colors.white,
               textColor: Colors.white,
@@ -151,7 +104,7 @@ class TenantDocPage extends HookConsumerWidget {
               fontSize: 16,
               fontSize: 16,
               minHeight: 50,
               minHeight: 50,
               radius: 5,
               radius: 5,
-            ).marginOnly(top: 30, bottom: 30, left: 18, right: 18),
+            ).marginOnly(top: 50, bottom: 50, left: 18, right: 18),
           ],
           ],
         ),
         ),
       ),
       ),

+ 0 - 4
packages/cpt_auth/lib/modules/tenant_doc/tenant_doc_view_model.dart

@@ -21,12 +21,8 @@ class TenantDocViewModel extends _$TenantDocViewModel {
 
 
   //提交文件
   //提交文件
   void submitDoc() {
   void submitDoc() {
-
     ToastEngine.show("请求接口上传文件:${state.docList}");
     ToastEngine.show("请求接口上传文件:${state.docList}");
   }
   }
 
 
-  void setRemainingSpace(double remainingSpace) {
-    state = state.copyWith(remainingSpace: remainingSpace);
-  }
 
 
 }
 }

+ 0 - 5
packages/cpt_auth/lib/router/component/auth_component_service.dart

@@ -22,11 +22,6 @@ class AuthComponentService extends AuthService {
   }
   }
 
 
   @override
   @override
-  void startResetPasswordPage() {
-    SelectEstatePage.startInstance();
-  }
-
-  @override
   void startSelectEstatePage() {
   void startSelectEstatePage() {
     SelectEstatePage.startInstance();
     SelectEstatePage.startInstance();
   }
   }

+ 284 - 0
packages/cpt_facility/lib/modules/book_confirm/book_confirm_page.dart

@@ -0,0 +1,284 @@
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import '../../router/page/facility_page_router.dart';
+import 'book_confirm_view_model.dart';
+
+@RoutePage()
+class BookConfirmPage extends HookConsumerWidget {
+  const BookConfirmPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const BookConfirmPageRoute());
+    } else {
+      appRouter.push(const BookConfirmPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(bookConfirmViewModelProvider.notifier);
+    final state = ref.watch(bookConfirmViewModelProvider);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Function Room",
+        showBackButton: true,
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      backgroundColor: context.appColors.backgroundDark,
+      body: Column(
+        children: [
+          Expanded(
+            child: SingleChildScrollView(
+              scrollDirection: Axis.vertical,
+              physics: const BouncingScrollPhysics(),
+              child: Column(
+                mainAxisSize: MainAxisSize.max,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const SizedBox(height: 7.5),
+
+                  // 预定
+                  _buildConfirmItem(
+                    context,
+                    ref,
+                    S.current.book,
+                    Assets.facilityConfirmDateIcon,
+                    28.5,
+                    29,
+                    "Tue,24 Oct 2023",
+                    null,
+                    "05:00 PM-10:00 PM",
+                    null,
+                  ),
+
+                  // 设施
+                  _buildConfirmItem(
+                    context,
+                    ref,
+                    S.current.facility,
+                    Assets.facilityConfirmFacilityIcon,
+                    25.0,
+                    30.5,
+                    "Kids party room",
+                    null,
+                    "Blue room",
+                    null,
+                  ),
+
+                  // 付款
+                  _buildConfirmItem(
+                    context,
+                    ref,
+                    S.current.payment,
+                    Assets.facilityConfirmPaymentIcon,
+                    27.0,
+                    22.0,
+                    S.current.booking_fee,
+                    "10.80",
+                    S.current.total,
+                    "\$10.80",
+                  ),
+
+                  // 押金
+                  _buildConfirmItem(
+                    context,
+                    ref,
+                    S.current.deposit,
+                    Assets.facilityConfirmDepositIcon,
+                    28.0,
+                    26.5,
+                    S.current.deposit_hold,
+                    "\$100.00",
+                    null,
+                    null,
+                  ),
+
+                  // 添加间隔
+                  const SizedBox(height: 7.5),
+
+                ],
+              ),
+            ),
+          ),
+
+          // 显示支付信息
+          _paymentInfo(context),
+
+          // 底部按钮
+          MyButton(
+            onPressed:viewModel.doPayment,
+            text: S.current.proceed_with_payment,
+            textColor: Colors.white,
+            backgroundColor: context.appColors.btnBgDefault,
+            fontWeight: FontWeight.w500,
+            type: ClickType.throttle,
+            fontSize: 16,
+            minHeight: 50,
+            radius: 0,
+          ).marginOnly(top: 15),
+        ],
+      ),
+    );
+  }
+
+
+  //展示的Item
+  Widget _buildConfirmItem(
+    BuildContext context,
+    WidgetRef ref,
+    String title,
+    String iconPath,
+    double iconWidth,
+    double iconHeight,
+    String line1Txt,
+    String? line1Content,
+    String? line2Txt,
+    String? line2Content,
+  ) {
+    return Container(
+      width: double.infinity,
+      height: 92.5,
+      padding: const EdgeInsets.only(left: 20, right: 20),
+      margin: const EdgeInsets.only(left: 15, right: 15, top: 7.5, bottom: 7.5),
+      decoration: BoxDecoration(
+        color: context.appColors.whiteBG,
+        borderRadius: BorderRadius.circular(6.0), // 圆角
+        boxShadow: [
+          BoxShadow(
+            color: const Color(0xFFB8BFD9).withOpacity(0.3), // 阴影颜色
+            offset: const Offset(0, 3), // 阴影的偏移量
+            blurRadius: 8.0, // 模糊半径
+            spreadRadius: 3.0, // 扩散半径
+          ),
+        ],
+      ),
+      child: Center(
+        child: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          mainAxisSize: MainAxisSize.min,
+          children: [
+            MyTextView(
+              title,
+              textColor: context.appColors.textBlack,
+              fontSize: 16,
+              marginBottom: 7,
+              isFontMedium: true,
+            ),
+            Row(
+              mainAxisSize: MainAxisSize.max,
+              children: [
+                MyAssetImage(
+                  iconPath,
+                  width: iconWidth,
+                  height: iconHeight,
+                ).marginOnly(right: 15),
+                Column(
+                  mainAxisSize: MainAxisSize.min,
+                  children: [
+                    Row(
+                      children: [
+                        MyTextView(
+                          line1Txt,
+                          textColor: context.appColors.textBlack,
+                          fontSize: 14,
+                          isFontRegular: true,
+                        ).expanded(),
+                        MyTextView(
+                          line1Content ?? "",
+                          textColor: context.appColors.textBlack,
+                          fontSize: 14,
+                          isFontRegular: true,
+                        ),
+                      ],
+                    ),
+                    Visibility(
+                      visible: line2Txt != null,
+                      child: Row(
+                        children: [
+                          MyTextView(
+                            line2Txt ?? "",
+                            textColor: context.appColors.textBlack,
+                            fontSize: 14,
+                            isFontRegular: true,
+                          ).expanded(),
+                          MyTextView(
+                            line2Content ?? "",
+                            textColor: context.appColors.textBlack,
+                            fontSize: 14,
+                            isFontRegular: true,
+                          ),
+                        ],
+                      ).marginOnly(top: 6),
+                    ),
+                  ],
+                ).expanded(),
+              ],
+            ),
+          ],
+        ),
+      ),
+    );
+  }
+
+  //底部的支付信息
+  Widget _paymentInfo(BuildContext context) {
+    return Container(
+      padding: const EdgeInsets.symmetric(vertical: 17.5, horizontal: 23),
+      color: context.appColors.whiteBG,
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          MyTextView(
+            S.current.card_caps,
+            marginBottom: 17,
+            textColor: context.appColors.textPrimary,
+            fontSize: 17,
+            isFontMedium: true,
+          ),
+          Row(
+            children: [
+              const MyAssetImage(
+                Assets.facilityConfirmEcardIcon,
+                height: 38,
+              ),
+              MyTextView(
+                "Ending 9423",
+                marginLeft: 15,
+                marginRight: 15,
+                textColor: context.appColors.textBlack,
+                fontSize: 15,
+                isFontMedium: true,
+              ).expanded(),
+              MyTextView(
+                S.current.change,
+                textColor: Colors.white,
+                backgroundColor: context.appColors.btnBgDefault,
+                paddingRight: 16,
+                paddingLeft: 16,
+                paddingTop: 8,
+                paddingBottom: 8,
+                cornerRadius: 7,
+                fontSize: 15,
+                isFontMedium: true,
+              )
+            ],
+          )
+        ],
+      ),
+    );
+  }
+}

+ 3 - 0
packages/cpt_facility/lib/modules/book_confirm/book_confirm_state.dart

@@ -0,0 +1,3 @@
+class BookConfirmState{
+
+}

+ 25 - 0
packages/cpt_facility/lib/modules/book_confirm/book_confirm_view_model.dart

@@ -0,0 +1,25 @@
+import 'package:cpt_facility/modules/detail/facility_detail_page.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:widgets/widget_export.dart';
+
+import 'book_confirm_state.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+
+part 'book_confirm_view_model.g.dart';
+
+@riverpod
+class BookConfirmViewModel extends _$BookConfirmViewModel {
+  @override
+  BookConfirmState build() {
+    return BookConfirmState();
+  }
+
+  //执行支付
+  void doPayment(){
+
+    ToastEngine.show("点击了确定");
+
+    FacilityDetailPage.startWithPop2Main();
+  }
+
+}

+ 27 - 0
packages/cpt_facility/lib/modules/book_confirm/book_confirm_view_model.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'book_confirm_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$bookConfirmViewModelHash() =>
+    r'94f61f3b11ea3f6bc8baa1abaccf013230ecf2e4';
+
+/// See also [BookConfirmViewModel].
+@ProviderFor(BookConfirmViewModel)
+final bookConfirmViewModelProvider = AutoDisposeNotifierProvider<
+    BookConfirmViewModel, BookConfirmState>.internal(
+  BookConfirmViewModel.new,
+  name: r'bookConfirmViewModelProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$bookConfirmViewModelHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$BookConfirmViewModel = AutoDisposeNotifier<BookConfirmState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 142 - 35
packages/cpt_facility/lib/modules/booking/facility_booking_page.dart

@@ -1,16 +1,19 @@
 import 'dart:math';
 import 'dart:math';
 
 
 import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
-import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/date_time_utils.dart';
 import 'package:shared/utils/date_time_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/select_calendar/calendar_bottom_sheet.dart';
 import 'package:widgets/shatter/select_calendar/calendar_bottom_sheet.dart';
@@ -37,46 +40,91 @@ class FacilityBookingPage extends HookConsumerWidget {
     final viewModel = ref.watch(facilityBookingViewModelProvider.notifier);
     final viewModel = ref.watch(facilityBookingViewModelProvider.notifier);
     final state = ref.watch(facilityBookingViewModelProvider);
     final state = ref.watch(facilityBookingViewModelProvider);
 
 
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => viewModel.fetchListByDate());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
+
     return Scaffold(
     return Scaffold(
       appBar: MyAppBar.appBar(context, "Kids party room", backgroundColor: context.appColors.whiteBG),
       appBar: MyAppBar.appBar(context, "Kids party room", backgroundColor: context.appColors.whiteBG),
       backgroundColor: context.appColors.backgroundDark,
       backgroundColor: context.appColors.backgroundDark,
-      body: SingleChildScrollView(
-        scrollDirection: Axis.vertical,
-        physics: const BouncingScrollPhysics(),
-        child: Column(
-          mainAxisSize: MainAxisSize.max,
-          crossAxisAlignment: CrossAxisAlignment.center,
-          children: [
-            Row(
-              mainAxisSize: MainAxisSize.max,
-              children: [
-                MyTextView(
-                  "${DateTimeUtils.getWeekday(state.selectedDate,languageCode: 'en')}, ${DateTimeUtils.formatDate(state.selectedDate,format: 'dd MMM yyyy')}",
+      body: Column(
+        mainAxisSize: MainAxisSize.max,
+        crossAxisAlignment: CrossAxisAlignment.center,
+        children: [
+          //顶部的选中的日期与日历选择
+          Row(
+            mainAxisSize: MainAxisSize.max,
+            children: [
+              MyTextView(
+                "${DateTimeUtils.getWeekday(state.selectedDate, languageCode: 'en')}, ${DateTimeUtils.formatDate(state.selectedDate, format: 'dd MMM yyyy')}",
+                textColor: context.appColors.textBlack,
+                fontSize: 17,
+                marginTop: 18,
+                marginBottom: 16,
+                marginLeft: 15,
+                isFontMedium: true,
+              ).expanded(),
+              const MyAssetImage(Assets.facilityConfirmDateIcon, width: 22.5, height: 22.5).marginOnly(right: 10).onTap(() {
+                //日历日期选择器
+                _datePickerBottomSheet(context, ref);
+              }, padding: 5),
+            ],
+          ),
+
+          //二周的日期选择
+          WeeklyCalendar(
+            selectedDate: state.selectedDate,
+            onChangedSelectedDate: (dateTime) {
+              Log.d("onChangedSelectedDate选中 - ${dateTime}}");
+              viewModel.changeSelectedDate(dateTime);
+            },
+          ),
+
+          //每天的单独数据
+          LoadStateLayout(
+            state: state.loadingState,
+            errorMessage: state.errorMessage,
+            errorRetry: () {
+              viewModel.retryRequest();
+            },
+            successSliverWidget: [
+              SliverToBoxAdapter(
+                child: MyTextView(
+                  S.current.quota_left_msg(1, DateTimeUtils.formatDate(state.selectedDate, format: 'dd MMM yyyy')),
+                  marginTop: 7,
+                  marginBottom: 15,
                   textColor: context.appColors.textBlack,
                   textColor: context.appColors.textBlack,
-                  fontSize: 17,
-                  marginTop: 18,
-                  marginBottom: 16,
-                  marginLeft: 15,
+                  fontSize: 12,
                   isFontMedium: true,
                   isFontMedium: true,
-                ).expanded(),
-                const MyAssetImage(Assets.facilityConfirmDateIcon, width: 22.5, height: 22.5).marginOnly(right: 10).onTap(() {
-                  //日历日期选择器
-                  _datePickerBottomSheet(context, ref);
-                }, padding: 5),
-              ],
-            ),
+                ),
+              ),
+              SliverList(
+                  delegate: SliverChildBuilderDelegate(
+                (context, index) {
+                  return _buildFacilityOption(context, state.datas[index]);
+                },
+                childCount: state.datas.length,
+              ))
+            ],
+          ).marginOnly(top: 5).expanded(),
 
 
-            //二周的日期选择
-            WeeklyCalendar(
-              selectedDate: state.selectedDate,
-              onChangedSelectedDate: (dateTime) {
-                Log.d("onChangedSelectedDate选中 - ${dateTime}}");
-                viewModel.changeSelectedDate(dateTime);
-              },
-            ),
-
-          ],
-        ),
+          //底部按钮
+          MyButton(
+            onPressed: viewModel.gotoConfirmPage,
+            text: S.current.next,
+            textColor: Colors.white,
+            backgroundColor: context.appColors.btnBgDefault,
+            fontWeight: FontWeight.w500,
+            type: ClickType.throttle,
+            fontSize: 16,
+            minHeight: 50,
+            radius: 0,
+          )
+        ],
       ),
       ),
     );
     );
   }
   }
@@ -106,4 +154,63 @@ class FacilityBookingPage extends HookConsumerWidget {
       },
       },
     );
     );
   }
   }
+
+  //生产当前设施的选项
+  Widget _buildFacilityOption(BuildContext context, String item) {
+    return Column(
+      children: [
+        Container(
+          width: double.infinity,
+          height: 38,
+          color: context.appColors.btnBgDefault,
+          child: Center(
+            child: MyTextView(
+              item,
+              fontSize: 16,
+              textColor: Colors.white,
+              textAlign: TextAlign.center,
+              isFontMedium: true,
+            ),
+          ),
+        ),
+        GridView.builder(
+          shrinkWrap: true,
+          physics: const NeverScrollableScrollPhysics(),
+          gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
+            crossAxisCount: 4,
+            childAspectRatio: 82 / 43,
+            mainAxisSpacing: 6.5,
+            crossAxisSpacing: 6.5,
+          ),
+          itemCount: 4,
+          itemBuilder: (context, index) {
+            return Container(
+              decoration: BoxDecoration(
+                color: context.appColors.whiteBG,
+                borderRadius: BorderRadius.circular(5.0),
+              ),
+              child: Column(
+                crossAxisAlignment: CrossAxisAlignment.center,
+                mainAxisAlignment: MainAxisAlignment.center, // 垂直居中
+                children: [
+                  MyTextView(
+                    "10.00 AM",
+                    fontSize: 12,
+                    textColor: context.appColors.textBlack,
+                    isFontMedium: true,
+                  ),
+                  MyTextView(
+                    "04.00 PM",
+                    fontSize: 12,
+                    textColor: context.appColors.textBlack,
+                    isFontMedium: true,
+                  ),
+                ],
+              ),
+            );
+          },
+        ).marginSymmetric(horizontal: 10, vertical: 17),
+      ],
+    );
+  }
 }
 }

+ 19 - 0
packages/cpt_facility/lib/modules/booking/facility_booking_state.dart

@@ -1,16 +1,35 @@
+import 'package:widgets/load_state_layout.dart';
+
 class FacilityBookingState {
 class FacilityBookingState {
   //当前选中的时间日期
   //当前选中的时间日期
   DateTime selectedDate;
   DateTime selectedDate;
 
 
+  //页面 LoadView 状态的展示
+  LoadState loadingState;
+  String? errorMessage;
+
+  List<String> datas;
+
+  // ===================================  Begin  ↓  ===================================
+
   FacilityBookingState({
   FacilityBookingState({
     required this.selectedDate,
     required this.selectedDate,
+    this.loadingState = LoadState.State_Loading,
+    required this.datas,
+    this.errorMessage,
   });
   });
 
 
   FacilityBookingState copyWith({
   FacilityBookingState copyWith({
     DateTime? selectedDate,
     DateTime? selectedDate,
+    LoadState? loadingState,
+    String? errorMessage,
+    List<String>? datas,
   }) {
   }) {
     return FacilityBookingState(
     return FacilityBookingState(
       selectedDate: selectedDate ?? this.selectedDate,
       selectedDate: selectedDate ?? this.selectedDate,
+      loadingState: loadingState ?? this.loadingState,
+      errorMessage: errorMessage ?? this.errorMessage,
+      datas: datas ?? this.datas,
     );
     );
   }
   }
 }
 }

+ 34 - 3
packages/cpt_facility/lib/modules/booking/facility_booking_view_model.dart

@@ -1,5 +1,9 @@
+import 'package:cs_resources/generated/l10n.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/util.dart';
+import 'package:widgets/load_state_layout.dart';
+import '../book_confirm/book_confirm_page.dart';
 import 'facility_booking_state.dart';
 import 'facility_booking_state.dart';
 
 
 part 'facility_booking_view_model.g.dart';
 part 'facility_booking_view_model.g.dart';
@@ -8,8 +12,10 @@ part 'facility_booking_view_model.g.dart';
 class FacilityBookingViewModel extends _$FacilityBookingViewModel {
 class FacilityBookingViewModel extends _$FacilityBookingViewModel {
   @override
   @override
   FacilityBookingState build() {
   FacilityBookingState build() {
-
-    final state = FacilityBookingState(selectedDate: DateTime.now());
+    final state = FacilityBookingState(
+      selectedDate: DateTime.now(),
+      datas: [],
+    );
     initListener(state);
     initListener(state);
     ref.onDispose(() {
     ref.onDispose(() {
       onDispose(state);
       onDispose(state);
@@ -22,14 +28,39 @@ class FacilityBookingViewModel extends _$FacilityBookingViewModel {
   void changeSelectedDate(DateTime dateTime) {
   void changeSelectedDate(DateTime dateTime) {
     state = state.copyWith(selectedDate: dateTime);
     state = state.copyWith(selectedDate: dateTime);
     Log.d("当前选中的日期:$dateTime");
     Log.d("当前选中的日期:$dateTime");
+    fetchListByDate();
+  }
+
+  //失败的重试
+  void retryRequest() {
+    fetchListByDate();
   }
   }
 
 
-  void initListener(FacilityBookingState state) {
+  /// 获取服务器数据
+  Future fetchListByDate() async {
+    state = state.copyWith(loadingState: LoadState.State_Loading);
+
+    await Future.delayed(const Duration(milliseconds: 1500));
 
 
+    List<String> list = ["Orange Room", "Purple Room", "Red Room"];
+
+    if (list.isNotEmpty) {
+      //加载成功
+      state = state.copyWith(datas: list, loadingState: LoadState.State_Success);
+    } else {
+      //无数据
+      state = state.copyWith(datas: [], loadingState: LoadState.State_Empty);
+    }
   }
   }
 
 
+  void initListener(FacilityBookingState state) {}
+
   void onDispose(FacilityBookingState state) {
   void onDispose(FacilityBookingState state) {
     Log.d("FacilityBookingViewModel - onDispose");
     Log.d("FacilityBookingViewModel - onDispose");
   }
   }
 
 
+  //去付款确认页面
+  void gotoConfirmPage() {
+    BookConfirmPage.startInstance();
+  }
 }
 }

+ 1 - 1
packages/cpt_facility/lib/modules/booking/facility_booking_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'facility_booking_view_model.dart';
 // **************************************************************************
 // **************************************************************************
 
 
 String _$facilityBookingViewModelHash() =>
 String _$facilityBookingViewModelHash() =>
-    r'd90fc41489be510e703686650b6027f6f6cdf77d';
+    r'c6d1d64d1d7100b6864c53327150a9893201e3a9';
 
 
 /// See also [FacilityBookingViewModel].
 /// See also [FacilityBookingViewModel].
 @ProviderFor(FacilityBookingViewModel)
 @ProviderFor(FacilityBookingViewModel)

+ 12 - 2
packages/cpt_facility/lib/modules/detail/facility_detail_page.dart

@@ -25,6 +25,16 @@ class FacilityDetailPage extends HookConsumerWidget {
     }
     }
   }
   }
 
 
+  //启动当前页面并回退至设施首页
+  static void startWithPop2Main() {
+    appRouter.pushAndPopUntil(
+      const FacilityDetailPageRoute(),
+      predicate: (route) {
+        return route.settings.name == 'FacilityPageRoute';
+      },
+    );
+  }
+
   @override
   @override
   Widget build(BuildContext context, WidgetRef ref) {
   Widget build(BuildContext context, WidgetRef ref) {
     final viewModel = ref.watch(facilityDetailViewModelProvider.notifier);
     final viewModel = ref.watch(facilityDetailViewModelProvider.notifier);
@@ -79,7 +89,7 @@ class FacilityDetailPage extends HookConsumerWidget {
               Assets.facilityConfirmPaymentIcon,
               Assets.facilityConfirmPaymentIcon,
               27.0,
               27.0,
               22.0,
               22.0,
-              "Booking Fee",
+              S.current.booking_fee,
               "10.80",
               "10.80",
               S.current.total,
               S.current.total,
               "\$10.80",
               "\$10.80",
@@ -93,7 +103,7 @@ class FacilityDetailPage extends HookConsumerWidget {
               Assets.facilityConfirmDepositIcon,
               Assets.facilityConfirmDepositIcon,
               28.0,
               28.0,
               26.5,
               26.5,
-              "On Hold",
+              S.current.on_hold,
               "\$100.00",
               "\$100.00",
               null,
               null,
               null,
               null,

+ 3 - 4
packages/cpt_facility/lib/modules/facility/history/facility_history_screen.dart

@@ -25,7 +25,7 @@ class FacilityHistoryScreen extends HookConsumerWidget {
       };
       };
     }, []);
     }, []);
 
 
-    return Container(
+    return SizedBox(
       width: double.infinity,
       width: double.infinity,
       height: double.infinity,
       height: double.infinity,
       child: EasyRefresh(
       child: EasyRefresh(
@@ -40,14 +40,13 @@ class FacilityHistoryScreen extends HookConsumerWidget {
           },
           },
           successSliverWidget: [
           successSliverWidget: [
             SliverList(
             SliverList(
-                delegate: SliverChildBuilderDelegate(
-                      (context, index) {
+                delegate: SliverChildBuilderDelegate((context, index) {
                     return FacilityHistoryItem(index: index, item: state.datas[index]).onTap((){
                     return FacilityHistoryItem(index: index, item: state.datas[index]).onTap((){
                       FacilityDetailPage.startInstance(context: context);
                       FacilityDetailPage.startInstance(context: context);
                     });
                     });
                   },
                   },
                   childCount: state.datas.length,
                   childCount: state.datas.length,
-                ))
+                )),
           ],
           ],
         ),
         ),
       ).marginOnly(top: 5, bottom: 5),
       ).marginOnly(top: 5, bottom: 5),

+ 2 - 0
packages/cpt_facility/lib/router/page/facility_page_router.dart

@@ -10,6 +10,7 @@ import '../../modules/facility/deposit/facility_deposit_screen.dart';
 import '../../modules/facility/history/facility_history_screen.dart';
 import '../../modules/facility/history/facility_history_screen.dart';
 import '../../modules/detail/facility_detail_page.dart';
 import '../../modules/detail/facility_detail_page.dart';
 import '../../modules/booking/facility_booking_page.dart';
 import '../../modules/booking/facility_booking_page.dart';
+import '../../modules/book_confirm/book_confirm_page.dart';
 
 
 part 'facility_page_router.gr.dart';
 part 'facility_page_router.gr.dart';
 
 
@@ -33,5 +34,6 @@ class FacilityPageRouter extends _$FacilityPageRouter {
         ),
         ),
         CustomRoute(page: FacilityDetailPageRoute.page, path: RouterPath.facilityDetail, transitionsBuilder: applySlideTransition),
         CustomRoute(page: FacilityDetailPageRoute.page, path: RouterPath.facilityDetail, transitionsBuilder: applySlideTransition),
         CustomRoute(page: FacilityBookingPageRoute.page, path: RouterPath.facilityBook, transitionsBuilder: applySlideTransition),
         CustomRoute(page: FacilityBookingPageRoute.page, path: RouterPath.facilityBook, transitionsBuilder: applySlideTransition),
+        CustomRoute(page: BookConfirmPageRoute.page, path: RouterPath.facilityBookConfirm, transitionsBuilder: applySlideTransition),
       ];
       ];
 }
 }

+ 20 - 0
packages/cpt_facility/lib/router/page/facility_page_router.gr.dart

@@ -15,6 +15,12 @@ abstract class _$FacilityPageRouter extends RootStackRouter {
 
 
   @override
   @override
   final Map<String, PageFactory> pagesMap = {
   final Map<String, PageFactory> pagesMap = {
+    BookConfirmPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const BookConfirmPage(),
+      );
+    },
     FacilityActivePageRoute.name: (routeData) {
     FacilityActivePageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
       return AutoRoutePage<dynamic>(
         routeData: routeData,
         routeData: routeData,
@@ -61,6 +67,20 @@ abstract class _$FacilityPageRouter extends RootStackRouter {
 }
 }
 
 
 /// generated route for
 /// generated route for
+/// [BookConfirmPage]
+class BookConfirmPageRoute extends PageRouteInfo<void> {
+  const BookConfirmPageRoute({List<PageRouteInfo>? children})
+      : super(
+          BookConfirmPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'BookConfirmPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
 /// [FacilityActiveScreen]
 /// [FacilityActiveScreen]
 class FacilityActivePageRoute extends PageRouteInfo<void> {
 class FacilityActivePageRoute extends PageRouteInfo<void> {
   const FacilityActivePageRoute({List<PageRouteInfo>? children})
   const FacilityActivePageRoute({List<PageRouteInfo>? children})

+ 1 - 1
packages/cpt_property/lib/modules/property/vm/property_vm.g.dart

@@ -6,7 +6,7 @@ part of 'property_vm.dart';
 // RiverpodGenerator
 // RiverpodGenerator
 // **************************************************************************
 // **************************************************************************
 
 
-String _$propertyVmHash() => r'9b08b5e83d2b45f67b653daf60bb66bacb9c47ed';
+String _$propertyVmHash() => r'e9f36995f10e7a4a0897046c50ff9ddd047b58d6';
 
 
 /// See also [PropertyVm].
 /// See also [PropertyVm].
 @ProviderFor(PropertyVm)
 @ProviderFor(PropertyVm)

+ 10 - 2
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -24,7 +24,10 @@ class MessageLookup extends MessageLookupByLibrary {
 
 
   static String m1(count) => "${count} Characters";
   static String m1(count) => "${count} Characters";
 
 
-  static String m2(name) => "Welcome ${name}";
+  static String m2(count, date) =>
+      "You have ${count}x quota left (resets on ${date})";
+
+  static String m3(name) => "Welcome ${name}";
 
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@@ -53,6 +56,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "booking_successful":
         "booking_successful":
             MessageLookupByLibrary.simpleMessage("BOOKING SUCCESSFUL"),
             MessageLookupByLibrary.simpleMessage("BOOKING SUCCESSFUL"),
         "cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
         "cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
+        "card_caps": MessageLookupByLibrary.simpleMessage("CARD"),
+        "change": MessageLookupByLibrary.simpleMessage("Change"),
         "change_mobile_phone":
         "change_mobile_phone":
             MessageLookupByLibrary.simpleMessage("Change Mobile Phone"),
             MessageLookupByLibrary.simpleMessage("Change Mobile Phone"),
         "characters": m1,
         "characters": m1,
@@ -177,6 +182,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "phone_email": MessageLookupByLibrary.simpleMessage("Phone/Email"),
         "phone_email": MessageLookupByLibrary.simpleMessage("Phone/Email"),
         "privacy_policy":
         "privacy_policy":
             MessageLookupByLibrary.simpleMessage("Privacy Policy"),
             MessageLookupByLibrary.simpleMessage("Privacy Policy"),
+        "proceed_with_payment":
+            MessageLookupByLibrary.simpleMessage("Proceed With Payment"),
         "property": MessageLookupByLibrary.simpleMessage("Property"),
         "property": MessageLookupByLibrary.simpleMessage("Property"),
         "property_guide":
         "property_guide":
             MessageLookupByLibrary.simpleMessage("Property Guide"),
             MessageLookupByLibrary.simpleMessage("Property Guide"),
@@ -186,6 +193,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "Your feedback has been successfully sent! We will reply to you as soon as possible! thank you!"),
             "Your feedback has been successfully sent! We will reply to you as soon as possible! thank you!"),
         "published_successfully":
         "published_successfully":
             MessageLookupByLibrary.simpleMessage("Published Successfully"),
             MessageLookupByLibrary.simpleMessage("Published Successfully"),
+        "quota_left_msg": m2,
         "rate_us": MessageLookupByLibrary.simpleMessage("Rate Us"),
         "rate_us": MessageLookupByLibrary.simpleMessage("Rate Us"),
         "remove": MessageLookupByLibrary.simpleMessage("Remove"),
         "remove": MessageLookupByLibrary.simpleMessage("Remove"),
         "remove_account":
         "remove_account":
@@ -257,7 +265,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Visitor Registration"),
             MessageLookupByLibrary.simpleMessage("Visitor Registration"),
         "waiting_for_the_administrator": MessageLookupByLibrary.simpleMessage(
         "waiting_for_the_administrator": MessageLookupByLibrary.simpleMessage(
             "Waiting for the administrator"),
             "Waiting for the administrator"),
-        "welcome_name": m2,
+        "welcome_name": m3,
         "who_are_owners":
         "who_are_owners":
             MessageLookupByLibrary.simpleMessage("Who are owners?"),
             MessageLookupByLibrary.simpleMessage("Who are owners?"),
         "who_are_tenants":
         "who_are_tenants":

+ 8 - 2
packages/cs_resources/lib/generated/intl/messages_zh_CN.dart

@@ -24,7 +24,9 @@ class MessageLookup extends MessageLookupByLibrary {
 
 
   static String m1(count) => "${count} 字符";
   static String m1(count) => "${count} 字符";
 
 
-  static String m2(name) => "欢迎你 ${name}";
+  static String m2(count, date) => "你还剩余${count}次的配额 (重置于${date})";
+
+  static String m3(name) => "欢迎你 ${name}";
 
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@@ -49,6 +51,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "booking_fee": MessageLookupByLibrary.simpleMessage("预定费用"),
         "booking_fee": MessageLookupByLibrary.simpleMessage("预定费用"),
         "booking_successful": MessageLookupByLibrary.simpleMessage("预定成功"),
         "booking_successful": MessageLookupByLibrary.simpleMessage("预定成功"),
         "cancel": MessageLookupByLibrary.simpleMessage("取消"),
         "cancel": MessageLookupByLibrary.simpleMessage("取消"),
+        "card_caps": MessageLookupByLibrary.simpleMessage("信用卡"),
+        "change": MessageLookupByLibrary.simpleMessage("更换"),
         "change_mobile_phone": MessageLookupByLibrary.simpleMessage("修改手机号码"),
         "change_mobile_phone": MessageLookupByLibrary.simpleMessage("修改手机号码"),
         "characters": m1,
         "characters": m1,
         "choose_category": MessageLookupByLibrary.simpleMessage("选择类型"),
         "choose_category": MessageLookupByLibrary.simpleMessage("选择类型"),
@@ -144,6 +148,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
         "privacy_policy": MessageLookupByLibrary.simpleMessage("隐私协议"),
         "privacy_policy": MessageLookupByLibrary.simpleMessage("隐私协议"),
+        "proceed_with_payment": MessageLookupByLibrary.simpleMessage("继续付款"),
         "property": MessageLookupByLibrary.simpleMessage("房产"),
         "property": MessageLookupByLibrary.simpleMessage("房产"),
         "property_guide": MessageLookupByLibrary.simpleMessage("物业指南"),
         "property_guide": MessageLookupByLibrary.simpleMessage("物业指南"),
         "property_news": MessageLookupByLibrary.simpleMessage("资产新闻"),
         "property_news": MessageLookupByLibrary.simpleMessage("资产新闻"),
@@ -151,6 +156,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "published_successful_txt":
         "published_successful_txt":
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
+        "quota_left_msg": m2,
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "remove": MessageLookupByLibrary.simpleMessage("移除"),
         "remove": MessageLookupByLibrary.simpleMessage("移除"),
         "remove_account": MessageLookupByLibrary.simpleMessage("移除账号"),
         "remove_account": MessageLookupByLibrary.simpleMessage("移除账号"),
@@ -209,7 +215,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "visitor_registration": MessageLookupByLibrary.simpleMessage("访客登记"),
         "visitor_registration": MessageLookupByLibrary.simpleMessage("访客登记"),
         "waiting_for_the_administrator":
         "waiting_for_the_administrator":
             MessageLookupByLibrary.simpleMessage("等待管理员回复"),
             MessageLookupByLibrary.simpleMessage("等待管理员回复"),
-        "welcome_name": m2,
+        "welcome_name": m3,
         "who_are_owners": MessageLookupByLibrary.simpleMessage("怎样才算业主?"),
         "who_are_owners": MessageLookupByLibrary.simpleMessage("怎样才算业主?"),
         "who_are_tenants": MessageLookupByLibrary.simpleMessage("怎样才算租户?"),
         "who_are_tenants": MessageLookupByLibrary.simpleMessage("怎样才算租户?"),
         "yes": MessageLookupByLibrary.simpleMessage("是"),
         "yes": MessageLookupByLibrary.simpleMessage("是"),

+ 8 - 2
packages/cs_resources/lib/generated/intl/messages_zh_HK.dart

@@ -24,7 +24,9 @@ class MessageLookup extends MessageLookupByLibrary {
 
 
   static String m1(count) => "${count} 字符";
   static String m1(count) => "${count} 字符";
 
 
-  static String m2(name) => "欢迎你 ${name}";
+  static String m2(count, date) => "你还剩余${count}次的配额 (重置于${date})";
+
+  static String m3(name) => "欢迎你 ${name}";
 
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@@ -49,6 +51,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "booking_fee": MessageLookupByLibrary.simpleMessage("预定费用"),
         "booking_fee": MessageLookupByLibrary.simpleMessage("预定费用"),
         "booking_successful": MessageLookupByLibrary.simpleMessage("预定成功"),
         "booking_successful": MessageLookupByLibrary.simpleMessage("预定成功"),
         "cancel": MessageLookupByLibrary.simpleMessage("取消"),
         "cancel": MessageLookupByLibrary.simpleMessage("取消"),
+        "card_caps": MessageLookupByLibrary.simpleMessage("信用卡"),
+        "change": MessageLookupByLibrary.simpleMessage("更换"),
         "change_mobile_phone": MessageLookupByLibrary.simpleMessage("修改手机号码"),
         "change_mobile_phone": MessageLookupByLibrary.simpleMessage("修改手机号码"),
         "characters": m1,
         "characters": m1,
         "choose_category": MessageLookupByLibrary.simpleMessage("选择类型"),
         "choose_category": MessageLookupByLibrary.simpleMessage("选择类型"),
@@ -136,6 +140,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
         "privacy_policy": MessageLookupByLibrary.simpleMessage("隐私协议"),
         "privacy_policy": MessageLookupByLibrary.simpleMessage("隐私协议"),
+        "proceed_with_payment": MessageLookupByLibrary.simpleMessage("继续付款"),
         "property": MessageLookupByLibrary.simpleMessage("房产"),
         "property": MessageLookupByLibrary.simpleMessage("房产"),
         "property_guide": MessageLookupByLibrary.simpleMessage("物业指南"),
         "property_guide": MessageLookupByLibrary.simpleMessage("物业指南"),
         "property_news": MessageLookupByLibrary.simpleMessage("资产新闻"),
         "property_news": MessageLookupByLibrary.simpleMessage("资产新闻"),
@@ -143,6 +148,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "published_successful_txt":
         "published_successful_txt":
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
+        "quota_left_msg": m2,
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "remove": MessageLookupByLibrary.simpleMessage("移除"),
         "remove": MessageLookupByLibrary.simpleMessage("移除"),
         "remove_account": MessageLookupByLibrary.simpleMessage("移除账号"),
         "remove_account": MessageLookupByLibrary.simpleMessage("移除账号"),
@@ -196,7 +202,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "visitor_registration": MessageLookupByLibrary.simpleMessage("访客登记"),
         "visitor_registration": MessageLookupByLibrary.simpleMessage("访客登记"),
         "waiting_for_the_administrator":
         "waiting_for_the_administrator":
             MessageLookupByLibrary.simpleMessage("等待管理员回复"),
             MessageLookupByLibrary.simpleMessage("等待管理员回复"),
-        "welcome_name": m2,
+        "welcome_name": m3,
         "yes": MessageLookupByLibrary.simpleMessage("是"),
         "yes": MessageLookupByLibrary.simpleMessage("是"),
         "you_have": MessageLookupByLibrary.simpleMessage("你还有"),
         "you_have": MessageLookupByLibrary.simpleMessage("你还有"),
         "your_roles_responsibilities":
         "your_roles_responsibilities":

+ 40 - 0
packages/cs_resources/lib/generated/l10n.dart

@@ -1680,6 +1680,46 @@ class S {
     );
     );
   }
   }
 
 
+  /// `You have {count}x quota left (resets on {date})`
+  String quota_left_msg(Object count, Object date) {
+    return Intl.message(
+      'You have ${count}x quota left (resets on $date)',
+      name: 'quota_left_msg',
+      desc: '',
+      args: [count, date],
+    );
+  }
+
+  /// `CARD`
+  String get card_caps {
+    return Intl.message(
+      'CARD',
+      name: 'card_caps',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Change`
+  String get change {
+    return Intl.message(
+      'Change',
+      name: 'change',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Proceed With Payment`
+  String get proceed_with_payment {
+    return Intl.message(
+      'Proceed With Payment',
+      name: 'proceed_with_payment',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   /// `Other`
   String get other {
   String get other {
     return Intl.message(
     return Intl.message(

+ 4 - 0
packages/cs_resources/lib/l10n/intl_en.arb

@@ -162,5 +162,9 @@
   "booking_fee": "Booking Fee",
   "booking_fee": "Booking Fee",
   "on_hold": "On Hold",
   "on_hold": "On Hold",
   "total": "Total",
   "total": "Total",
+  "quota_left_msg": "You have {count}x quota left (resets on {date})",
+  "card_caps": "CARD",
+  "change": "Change",
+  "proceed_with_payment": "Proceed With Payment",
   "other": "Other"
   "other": "Other"
 }
 }

+ 4 - 0
packages/cs_resources/lib/l10n/intl_zh_CN.arb

@@ -162,5 +162,9 @@
   "booking_fee": "预定费用",
   "booking_fee": "预定费用",
   "on_hold": "持有",
   "on_hold": "持有",
   "total": "共计",
   "total": "共计",
+  "quota_left_msg": "你还剩余{count}次的配额 (重置于{date})",
+  "card_caps": "信用卡",
+  "change": "更换",
+  "proceed_with_payment": "继续付款",
   "other": "其他"
   "other": "其他"
 }
 }

+ 4 - 0
packages/cs_resources/lib/l10n/intl_zh_HK.arb

@@ -148,5 +148,9 @@
   "booking_fee": "预定费用",
   "booking_fee": "预定费用",
   "on_hold": "持有",
   "on_hold": "持有",
   "total": "共计",
   "total": "共计",
+  "quota_left_msg": "你还剩余{count}次的配额 (重置于{date})",
+  "card_caps": "信用卡",
+  "change": "更换",
+  "proceed_with_payment": "继续付款",
   "other": "其他"
   "other": "其他"
 }
 }

+ 0 - 2
packages/cs_router/lib/componentRouter/auth_service.dart

@@ -5,7 +5,5 @@ abstract class AuthService {
 
 
   void startLoginPage();
   void startLoginPage();
 
 
-  void startResetPasswordPage();
-
   void startSelectEstatePage();
   void startSelectEstatePage();
 }
 }

+ 1 - 0
packages/cs_router/lib/path/router_path.dart

@@ -56,6 +56,7 @@ class RouterPath {
   static const facility = '/facility';
   static const facility = '/facility';
   static const facilityDetail = '/facility/detail';
   static const facilityDetail = '/facility/detail';
   static const facilityBook = '/facility/book';
   static const facilityBook = '/facility/book';
+  static const facilityBookConfirm = '/facility/book/confirm';
 
 
   //表单
   //表单
   static const form = '/form';
   static const form = '/form';