Procházet zdrojové kódy

注册与注册成功页面

liukai před 2 týdny
rodič
revize
36715636ae
26 změnil soubory, kde provedl 790 přidání a 10 odebrání
  1. 2 2
      packages/cpt_auth/lib/modules/auth_login/auth_login_page.dart
  2. 1 1
      packages/cpt_auth/lib/modules/auth_login/auth_login_view_model.g.dart
  3. 2 3
      packages/cpt_auth/lib/modules/sign_up/sign_up_view_model.dart
  4. 1 1
      packages/cpt_auth/lib/modules/sign_up/sign_up_view_model.g.dart
  5. 92 0
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_full_screen.dart
  6. 38 0
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_page.dart
  7. 90 0
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_small_screen.dart
  8. 15 0
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_view_model.dart
  9. 27 0
      packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_view_model.g.dart
  10. 169 0
      packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_page.dart
  11. 8 0
      packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_state.dart
  12. 31 0
      packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_view_model.dart
  13. 27 0
      packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_view_model.g.dart
  14. 4 0
      packages/cpt_auth/lib/router/page/auth_page_router.dart
  15. 40 0
      packages/cpt_auth/lib/router/page/auth_page_router.gr.dart
  16. 3 0
      packages/cpt_auth/pubspec.yaml
  17. 19 1
      packages/cs_resources/lib/generated/intl/messages_en.dart
  18. 17 1
      packages/cs_resources/lib/generated/intl/messages_zh_CN.dart
  19. 17 1
      packages/cs_resources/lib/generated/intl/messages_zh_HK.dart
  20. 100 0
      packages/cs_resources/lib/generated/l10n.dart
  21. 10 0
      packages/cs_resources/lib/l10n/intl_en.arb
  22. 10 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  23. 10 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  24. 6 0
      packages/cs_resources/lib/theme/app_colors_theme.dart
  25. 2 0
      packages/cs_router/lib/path/router_path.dart
  26. 49 0
      packages/cs_widgets/lib/responsive_widget.dart

+ 2 - 2
packages/cpt_auth/lib/modules/auth_login/auth_login_page.dart

@@ -140,7 +140,7 @@ class AuthLoginPage extends HookConsumerWidget {
                 type: ClickType.throttle,
                 minHeight: 50,
                 radius: 5,
-              ).marginOnly(top: 28, bottom: 30),
+              ).marginOnly(top: 28),
 
               //同意协议
               Row(
@@ -170,7 +170,7 @@ class AuthLoginPage extends HookConsumerWidget {
                     ),
                   ),
                 ],
-              ),
+              ).marginOnly(top: 30, bottom: 30),
 
               //结束
             ],

+ 1 - 1
packages/cpt_auth/lib/modules/auth_login/auth_login_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'auth_login_view_model.dart';
 // **************************************************************************
 
 String _$authLoginViewModelHash() =>
-    r'1556a80c857673abab8a1062452673469ca2aa1e';
+    r'45f0dfb96b894b4df90cd94bbd921c26344d3a96';
 
 /// See also [AuthLoginViewModel].
 @ProviderFor(AuthLoginViewModel)

+ 2 - 3
packages/cpt_auth/lib/modules/sign_up/sign_up_view_model.dart

@@ -1,3 +1,4 @@
+import 'package:cpt_auth/modules/sing_up_verify/sign_up_verify_page.dart';
 import 'package:flutter/material.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -100,12 +101,11 @@ class SignUpViewModel extends _$SignUpViewModel {
     ToastEngine.show('准备执行请求发送验证码 firstName:$firstName lastName:$lastName email:$email phone:$phone password:$password confirmPassword:$confirmPassword');
 
     gotoSignUpVerifyPage();
-
   }
 
   //去注册的短信校验页面
   void gotoSignUpVerifyPage() {
-
+    SignUpVerifyPage.startInstance();
   }
 
   //切换隐藏显示密码
@@ -195,5 +195,4 @@ class SignUpViewModel extends _$SignUpViewModel {
 
     Log.d("SignUpViewModel 销毁 onDispose");
   }
-
 }

+ 1 - 1
packages/cpt_auth/lib/modules/sign_up/sign_up_view_model.g.dart

@@ -6,7 +6,7 @@ part of 'sign_up_view_model.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$signUpViewModelHash() => r'b85704f97138aebd2e6e6abc9ef7efb2c6cbfb2d';
+String _$signUpViewModelHash() => r'9953c49f83eace3fa24d85f5bc8cf95212175ff9';
 
 /// See also [SignUpViewModel].
 @ProviderFor(SignUpViewModel)

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

@@ -0,0 +1,92 @@
+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),
+            ],
+          ),
+        );
+      },
+    );
+  }
+}

+ 38 - 0
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_page.dart

@@ -0,0 +1,38 @@
+import 'package:cpt_auth/modules/sing_up_success/sign_up_success_full_screen.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: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/my_appbar.dart';
+import 'package:widgets/responsive_widget.dart';
+import '../../router/page/auth_page_router.dart';
+import 'sign_up_success_small_screen.dart';
+
+@RoutePage()
+class SignUpSuccessPage extends HookConsumerWidget {
+  const SignUpSuccessPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.popAndPush(const SignUpSuccessPageRoute());
+    } else {
+      appRouter.popAndPush(const SignUpSuccessPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, ""),
+      backgroundColor: context.appColors.backgroundDefault,
+      body: const ResponsiveWidget(
+        smallScreen: SignUpSuccessSmallScreen(),
+        smallFullScreen: SignUpSuccessFullScreen(),
+      ),
+    );
+  }
+}

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

@@ -0,0 +1,90 @@
+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),
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 15 - 0
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_view_model.dart

@@ -0,0 +1,15 @@
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+
+part 'sign_up_success_view_model.g.dart';
+
+@riverpod
+class SignUpSuccessViewModel extends _$SignUpSuccessViewModel {
+  @override
+  void build() {}
+
+  //去选择社区的页面
+  void gotoSelectEstatePage() {
+    ToastEngine.show("去选择社区的页面");
+  }
+}

+ 27 - 0
packages/cpt_auth/lib/modules/sing_up_success/sign_up_success_view_model.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'sign_up_success_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$signUpSuccessViewModelHash() =>
+    r'2f571b709af1af896a291c7515d60df05e629aa7';
+
+/// See also [SignUpSuccessViewModel].
+@ProviderFor(SignUpSuccessViewModel)
+final signUpSuccessViewModelProvider =
+    AutoDisposeNotifierProvider<SignUpSuccessViewModel, void>.internal(
+  SignUpSuccessViewModel.new,
+  name: r'signUpSuccessViewModelProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$signUpSuccessViewModelHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$SignUpSuccessViewModel = AutoDisposeNotifier<void>;
+// 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

+ 169 - 0
packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_page.dart

@@ -0,0 +1,169 @@
+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:plugin_platform/engine/toast/toast_engine.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 'package:pinput/pinput.dart';
+import '../../router/page/auth_page_router.dart';
+import 'sign_up_verify_view_model.dart';
+
+@RoutePage()
+class SignUpVerifyPage extends HookConsumerWidget {
+  const SignUpVerifyPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.popAndPush(const SignUpVerifyPageRoute());
+    } else {
+      appRouter.popAndPush(const SignUpVerifyPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(signUpVerifyViewModelProvider.notifier);
+    final state = ref.watch(signUpVerifyViewModelProvider);
+
+    const length = 4;
+    final borderColor = context.appColors.textPrimary;
+    const errorColor = Colors.redAccent;
+    final fillColor = context.appColors.authFiledBG;
+    final defaultPinTheme = PinTheme(
+      width: 50,
+      height: 50,
+      textStyle: TextStyle(color: context.appColors.textPrimary, fontWeight: FontWeight.w500, fontSize: 15),
+      decoration: BoxDecoration(
+        color: fillColor,
+        borderRadius: BorderRadius.circular(5),
+        border: Border.all(color: Colors.transparent),
+      ),
+    );
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, ""),
+      backgroundColor: context.appColors.backgroundDefault,
+      body: SingleChildScrollView(
+        scrollDirection: Axis.vertical,
+        physics: const BouncingScrollPhysics(),
+        child: Container(
+          margin: const EdgeInsets.symmetric(horizontal: 38),
+          width: double.infinity,
+          child: Column(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              //顶部图片
+              const MyAssetImage(
+                Assets.authSmsVerifyImg,
+                width: 260,
+                height: 180,
+              ).marginOnly(top: 12, bottom: 24),
+
+              MyTextView(
+                S.current.sign_up_verify_txt,
+                fontSize: 15,
+                marginBottom: 24,
+                textAlign: TextAlign.center,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              SizedBox(
+                height: 50,
+                child: Pinput(
+                  length: length,
+                  controller: state.controller,
+                  focusNode: state.focusNode,
+                  defaultPinTheme: defaultPinTheme,
+                  onCompleted: (pin) {
+                    ToastEngine.show("输入的验证码为:$pin");
+                  },
+                  focusedPinTheme: defaultPinTheme.copyWith(
+                    height: 50,
+                    width: 50,
+                    decoration: defaultPinTheme.decoration!.copyWith(
+                      border: Border.all(color: borderColor),
+                    ),
+                  ),
+                  errorPinTheme: defaultPinTheme.copyWith(
+                    decoration: BoxDecoration(
+                      color: errorColor,
+                      borderRadius: BorderRadius.circular(5),
+                    ),
+                  ),
+                ),
+              ),
+
+              MyTextView(
+                S.current.did_not_receive,
+                fontSize: 15,
+                marginTop: 24,
+                marginBottom: 16,
+                textAlign: TextAlign.center,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              MyButton(
+                onPressed: viewModel.verifySignUpInput,
+                text: S.current.resend_code,
+                textColor: Colors.white,
+                backgroundColor: context.appColors.orangeBG,
+                fontWeight: FontWeight.w500,
+                type: ClickType.throttle,
+                fontSize: 16,
+                minHeight: 42,
+                radius: 5,
+              ).constrained(width: 140),
+
+              Row(
+                mainAxisSize: MainAxisSize.min,
+                children: [
+                  RichText(
+                    text: TextSpan(
+                      children: [
+                        TextSpan(
+                          text: S.current.you_have,
+                          style: TextStyle(color: context.appColors.textBlack, fontWeight: FontWeight.w500, fontSize: 15),
+                        ),
+                        TextSpan(
+                          text: " 2 ",
+                          style: TextStyle(color: context.appColors.textPrimary, fontWeight: FontWeight.w500, fontSize: 15),
+                        ),
+                        TextSpan(
+                          text: S.current.tries_left,
+                          style: TextStyle(color: context.appColors.textBlack, fontWeight: FontWeight.w500, fontSize: 15),
+                        ),
+                      ],
+                    ),
+                  ),
+                ],
+              ).marginOnly(top: 16),
+
+              MyButton(
+                onPressed: viewModel.verifySignUpInput,
+                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),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 8 - 0
packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_state.dart

@@ -0,0 +1,8 @@
+import 'package:flutter/material.dart';
+
+class SignUpVerifyState{
+
+  final controller = TextEditingController();
+  final focusNode = FocusNode();
+
+}

+ 31 - 0
packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_view_model.dart

@@ -0,0 +1,31 @@
+import 'package:cpt_auth/modules/sing_up_success/sign_up_success_page.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+
+import 'sign_up_verify_state.dart';
+
+part 'sign_up_verify_view_model.g.dart';
+
+@riverpod
+class SignUpVerifyViewModel extends _$SignUpVerifyViewModel {
+  @override
+  SignUpVerifyState build() {
+    final state = SignUpVerifyState();
+    ref.onDispose(() {
+      onDispose(state);
+    });
+    return state;
+  }
+
+  //校验SMS短信验证码
+  void verifySignUpInput() {
+    SignUpSuccessPage.startInstance();
+  }
+
+  //销毁资源
+  void onDispose(SignUpVerifyState initState) {
+
+    Log.d("SignUpVerifyViewModel 销毁 onDispose");
+  }
+
+}

+ 27 - 0
packages/cpt_auth/lib/modules/sing_up_verify/sign_up_verify_view_model.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'sign_up_verify_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$signUpVerifyViewModelHash() =>
+    r'505c17b6c8fee69bdc0758c329ecdd14dcb8da3c';
+
+/// See also [SignUpVerifyViewModel].
+@ProviderFor(SignUpVerifyViewModel)
+final signUpVerifyViewModelProvider = AutoDisposeNotifierProvider<
+    SignUpVerifyViewModel, SignUpVerifyState>.internal(
+  SignUpVerifyViewModel.new,
+  name: r'signUpVerifyViewModelProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$signUpVerifyViewModelHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$SignUpVerifyViewModel = AutoDisposeNotifier<SignUpVerifyState>;
+// 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

+ 4 - 0
packages/cpt_auth/lib/router/page/auth_page_router.dart

@@ -7,6 +7,8 @@ import '../../modules/auth_login/auth_login_page.dart';
 import '../../modules/forgot_input/forgot_input_page.dart';
 import '../../modules/forgot_verify/forgot_verify_page.dart';
 import '../../modules/sign_up/sign_up_page.dart';
+import '../../modules/sing_up_verify/sign_up_verify_page.dart';
+import '../../modules/sing_up_success/sign_up_success_page.dart';
 
 
 
@@ -23,5 +25,7 @@ class AuthPageRouter extends _$AuthPageRouter {
     CustomRoute(page: ForgotInputPageRoute.page, path: RouterPath.authForgotInput, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ForgotVerifyPageRoute.page, path: RouterPath.authForgotVerify, transitionsBuilder: applySlideTransition),
     CustomRoute(page: SignUpPageRoute.page, path: RouterPath.authSignUp, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: SignUpVerifyPageRoute.page, path: RouterPath.authSignUpVerify, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: SignUpSuccessPageRoute.page, path: RouterPath.authSignUpSuccess, transitionsBuilder: applySlideTransition),
   ];
 }

+ 40 - 0
packages/cpt_auth/lib/router/page/auth_page_router.gr.dart

@@ -39,6 +39,18 @@ abstract class _$AuthPageRouter extends RootStackRouter {
         child: const SignUpPage(),
       );
     },
+    SignUpSuccessPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const SignUpSuccessPage(),
+      );
+    },
+    SignUpVerifyPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const SignUpVerifyPage(),
+      );
+    },
   };
 }
 
@@ -97,3 +109,31 @@ class SignUpPageRoute extends PageRouteInfo<void> {
 
   static const PageInfo<void> page = PageInfo<void>(name);
 }
+
+/// generated route for
+/// [SignUpSuccessPage]
+class SignUpSuccessPageRoute extends PageRouteInfo<void> {
+  const SignUpSuccessPageRoute({List<PageRouteInfo>? children})
+      : super(
+          SignUpSuccessPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'SignUpSuccessPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
+/// [SignUpVerifyPage]
+class SignUpVerifyPageRoute extends PageRouteInfo<void> {
+  const SignUpVerifyPageRoute({List<PageRouteInfo>? children})
+      : super(
+          SignUpVerifyPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'SignUpVerifyPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}

+ 3 - 0
packages/cpt_auth/pubspec.yaml

@@ -48,6 +48,9 @@ dependencies:
   # Hooks 简化 Riverpod 获取
   hooks_riverpod: ^2.5.1
 
+  # 验证码的插件
+  pinput: ^5.0.0
+
 dev_dependencies:
   flutter_test:
     sdk: flutter

+ 19 - 1
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -20,6 +20,8 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
 class MessageLookup extends MessageLookupByLibrary {
   String get localeName => 'en';
 
+  static String m0(name) => "Welcome ${name}";
+
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
         "agree_to": MessageLookupByLibrary.simpleMessage("Agree to"),
@@ -27,6 +29,8 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Confirm Password"),
         "create_new_yy_home_account":
             MessageLookupByLibrary.simpleMessage("Create New YY Home Account"),
+        "did_not_receive":
+            MessageLookupByLibrary.simpleMessage("Did Not Receive?"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
         "facility": MessageLookupByLibrary.simpleMessage("Facility"),
         "first_name": MessageLookupByLibrary.simpleMessage("First Name"),
@@ -36,6 +40,8 @@ class MessageLookup extends MessageLookupByLibrary {
             "Enter your email and mobile phone number"),
         "form": MessageLookupByLibrary.simpleMessage("Form"),
         "get_code": MessageLookupByLibrary.simpleMessage("Get Code"),
+        "get_started":
+            MessageLookupByLibrary.simpleMessage("let\'s get started"),
         "last_name": MessageLookupByLibrary.simpleMessage("Last Name"),
         "login": MessageLookupByLibrary.simpleMessage("Log In"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("Mobile Phone"),
@@ -48,12 +54,24 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("8 Digits Alphanumeric"),
         "payment": MessageLookupByLibrary.simpleMessage("Payment"),
         "phone_email": MessageLookupByLibrary.simpleMessage("Phone/Email"),
+        "resend_code": MessageLookupByLibrary.simpleMessage("Resend Code"),
         "reset_password":
             MessageLookupByLibrary.simpleMessage("Reset Password"),
         "rewards": MessageLookupByLibrary.simpleMessage("Rewards"),
+        "sign_up_success_txt1": MessageLookupByLibrary.simpleMessage(
+            "You have successfully created an YY Home account"),
+        "sign_up_success_txt2": MessageLookupByLibrary.simpleMessage(
+            "Your username is your email address and please keep your password safe"),
+        "sign_up_success_txt3": MessageLookupByLibrary.simpleMessage(
+            "Now, let\'s get you connected to your estate and community"),
+        "sign_up_verify_txt": MessageLookupByLibrary.simpleMessage(
+            "We have sent you an SMS verification code Please enter it below"),
         "terms_of_service":
             MessageLookupByLibrary.simpleMessage("Terms of Service"),
+        "tries_left": MessageLookupByLibrary.simpleMessage("Tries Left"),
         "verification_code":
-            MessageLookupByLibrary.simpleMessage("Verification Code")
+            MessageLookupByLibrary.simpleMessage("Verification Code"),
+        "welcome_name": m0,
+        "you_have": MessageLookupByLibrary.simpleMessage("You have")
       };
 }

+ 17 - 1
packages/cs_resources/lib/generated/intl/messages_zh_CN.dart

@@ -20,12 +20,15 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
 class MessageLookup extends MessageLookupByLibrary {
   String get localeName => 'zh_CN';
 
+  static String m0(name) => "欢迎你 ${name}";
+
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
         "confirm_password": MessageLookupByLibrary.simpleMessage("确认密码"),
         "create_new_yy_home_account":
             MessageLookupByLibrary.simpleMessage("创建新的 YY Home 账户"),
+        "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "facility": MessageLookupByLibrary.simpleMessage("设施"),
         "first_name": MessageLookupByLibrary.simpleMessage("名"),
@@ -33,6 +36,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "forgot_text": MessageLookupByLibrary.simpleMessage("请输入您的邮箱和手机号码"),
         "form": MessageLookupByLibrary.simpleMessage("表单"),
         "get_code": MessageLookupByLibrary.simpleMessage("获取验证码"),
+        "get_started": MessageLookupByLibrary.simpleMessage("让我们开始吧"),
         "last_name": MessageLookupByLibrary.simpleMessage("姓"),
         "login": MessageLookupByLibrary.simpleMessage("登录"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("手机号码"),
@@ -44,9 +48,21 @@ class MessageLookup extends MessageLookupByLibrary {
         "password_format": MessageLookupByLibrary.simpleMessage("8位数字或字母"),
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
+        "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "rewards": MessageLookupByLibrary.simpleMessage("奖励"),
+        "sign_up_success_txt1":
+            MessageLookupByLibrary.simpleMessage("您已成功创建 YYHome 的帐户"),
+        "sign_up_success_txt2":
+            MessageLookupByLibrary.simpleMessage("您的用户名是您的电子邮件地址,请保护您的密码安全"),
+        "sign_up_success_txt3":
+            MessageLookupByLibrary.simpleMessage("现在,让我们把你和你的社区关联起来"),
+        "sign_up_verify_txt":
+            MessageLookupByLibrary.simpleMessage("我们已经向您发送了短信验证码,请在下面输入"),
         "terms_of_service": MessageLookupByLibrary.simpleMessage("服务条款"),
-        "verification_code": MessageLookupByLibrary.simpleMessage("验证码")
+        "tries_left": MessageLookupByLibrary.simpleMessage("次尝试机会"),
+        "verification_code": MessageLookupByLibrary.simpleMessage("验证码"),
+        "welcome_name": m0,
+        "you_have": MessageLookupByLibrary.simpleMessage("你还有")
       };
 }

+ 17 - 1
packages/cs_resources/lib/generated/intl/messages_zh_HK.dart

@@ -20,12 +20,15 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
 class MessageLookup extends MessageLookupByLibrary {
   String get localeName => 'zh_HK';
 
+  static String m0(name) => "欢迎你 ${name}";
+
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
         "confirm_password": MessageLookupByLibrary.simpleMessage("确认密码"),
         "create_new_yy_home_account":
             MessageLookupByLibrary.simpleMessage("创建新的 YY Home 账户"),
+        "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "facility": MessageLookupByLibrary.simpleMessage("設施"),
         "first_name": MessageLookupByLibrary.simpleMessage("名"),
@@ -33,6 +36,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "forgot_text": MessageLookupByLibrary.simpleMessage("请输入您的邮箱和手机号码"),
         "form": MessageLookupByLibrary.simpleMessage("表單"),
         "get_code": MessageLookupByLibrary.simpleMessage("获取验证码"),
+        "get_started": MessageLookupByLibrary.simpleMessage("让我们开始吧"),
         "last_name": MessageLookupByLibrary.simpleMessage("姓"),
         "login": MessageLookupByLibrary.simpleMessage("登录"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("手机号码"),
@@ -44,9 +48,21 @@ class MessageLookup extends MessageLookupByLibrary {
         "password_format": MessageLookupByLibrary.simpleMessage("8位数字或字母"),
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
+        "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "rewards": MessageLookupByLibrary.simpleMessage("獎勵"),
+        "sign_up_success_txt1":
+            MessageLookupByLibrary.simpleMessage("您已成功创建 YYHome 的帐户"),
+        "sign_up_success_txt2":
+            MessageLookupByLibrary.simpleMessage("您的用户名是您的电子邮件地址,请保护您的密码安全"),
+        "sign_up_success_txt3":
+            MessageLookupByLibrary.simpleMessage("现在,让我们把你和你的社区关联起来"),
+        "sign_up_verify_txt":
+            MessageLookupByLibrary.simpleMessage("我们已经向您发送了短信验证码,请在下面输入"),
         "terms_of_service": MessageLookupByLibrary.simpleMessage("服务条款"),
-        "verification_code": MessageLookupByLibrary.simpleMessage("验证码")
+        "tries_left": MessageLookupByLibrary.simpleMessage("次尝试机会"),
+        "verification_code": MessageLookupByLibrary.simpleMessage("验证码"),
+        "welcome_name": m0,
+        "you_have": MessageLookupByLibrary.simpleMessage("你还有")
       };
 }

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

@@ -290,6 +290,106 @@ class S {
     );
   }
 
+  /// `We have sent you an SMS verification code Please enter it below`
+  String get sign_up_verify_txt {
+    return Intl.message(
+      'We have sent you an SMS verification code Please enter it below',
+      name: 'sign_up_verify_txt',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Did Not Receive?`
+  String get did_not_receive {
+    return Intl.message(
+      'Did Not Receive?',
+      name: 'did_not_receive',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Resend Code`
+  String get resend_code {
+    return Intl.message(
+      'Resend Code',
+      name: 'resend_code',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `You have`
+  String get you_have {
+    return Intl.message(
+      'You have',
+      name: 'you_have',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Tries Left`
+  String get tries_left {
+    return Intl.message(
+      'Tries Left',
+      name: 'tries_left',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Welcome {name}`
+  String welcome_name(Object name) {
+    return Intl.message(
+      'Welcome $name',
+      name: 'welcome_name',
+      desc: '',
+      args: [name],
+    );
+  }
+
+  /// `You have successfully created an YY Home account`
+  String get sign_up_success_txt1 {
+    return Intl.message(
+      'You have successfully created an YY Home account',
+      name: 'sign_up_success_txt1',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Your username is your email address and please keep your password safe`
+  String get sign_up_success_txt2 {
+    return Intl.message(
+      'Your username is your email address and please keep your password safe',
+      name: 'sign_up_success_txt2',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Now, let's get you connected to your estate and community`
+  String get sign_up_success_txt3 {
+    return Intl.message(
+      'Now, let\'s get you connected to your estate and community',
+      name: 'sign_up_success_txt3',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `let's get started`
+  String get get_started {
+    return Intl.message(
+      'let\'s get started',
+      name: 'get_started',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

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

@@ -23,5 +23,15 @@
   "get_code": "Get Code",
   "first_name": "First Name",
   "last_name": "Last Name",
+  "sign_up_verify_txt": "We have sent you an SMS verification code Please enter it below",
+  "did_not_receive": "Did Not Receive?",
+  "resend_code": "Resend Code",
+  "you_have": "You have",
+  "tries_left": "Tries Left",
+  "welcome_name": "Welcome {name}",
+  "sign_up_success_txt1": "You have successfully created an YY Home account",
+  "sign_up_success_txt2": "Your username is your email address and please keep your password safe",
+  "sign_up_success_txt3": "Now, let's get you connected to your estate and community",
+  "get_started": "let's get started",
   "other": "Other"
 }

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

@@ -23,5 +23,15 @@
   "get_code": "获取验证码",
   "first_name": "名",
   "last_name": "姓",
+  "sign_up_verify_txt": "我们已经向您发送了短信验证码,请在下面输入",
+  "did_not_receive": "没有收到验证码?",
+  "resend_code": "重新发送",
+  "you_have": "你还有",
+  "tries_left": "次尝试机会",
+  "welcome_name": "欢迎你 {name}",
+  "sign_up_success_txt1": "您已成功创建 YYHome 的帐户",
+  "sign_up_success_txt2": "您的用户名是您的电子邮件地址,请保护您的密码安全",
+  "sign_up_success_txt3": "现在,让我们把你和你的社区关联起来",
+  "get_started": "让我们开始吧",
   "other": "其他"
 }

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

@@ -23,5 +23,15 @@
   "get_code": "获取验证码",
   "first_name": "名",
   "last_name": "姓",
+  "sign_up_verify_txt": "我们已经向您发送了短信验证码,请在下面输入",
+  "did_not_receive": "没有收到验证码?",
+  "resend_code": "重新发送",
+  "you_have": "你还有",
+  "tries_left": "次尝试机会",
+  "welcome_name": "欢迎你 {name}",
+  "sign_up_success_txt1": "您已成功创建 YYHome 的帐户",
+  "sign_up_success_txt2": "您的用户名是您的电子邮件地址,请保护您的密码安全",
+  "sign_up_success_txt3": "现在,让我们把你和你的社区关联起来",
+  "get_started": "让我们开始吧",
   "other": "其他"
 }

+ 6 - 0
packages/cs_resources/lib/theme/app_colors_theme.dart

@@ -18,6 +18,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _colorD7DBE7 = Color(0xffD7DBE7);
   static const _colorBDBDBD = Color(0xFFBDBDBD);
   static const _colorF2F2F2 = Color(0xFFF2F2F2);
+  static const _colorFE6C00 = Color(0xFFFE6C00);
 
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -36,6 +37,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color textPrimary; //主题色文本
   final Color textBlack; //黑色文本
   final Color textDarkGray; //深灰色 666 文本
+  final Color orangeBG; //按钮的橙色背景
 
   // 私有的构造函数
   const AppColorsTheme._internal({
@@ -48,6 +50,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.textPrimary,
     required this.textBlack,
     required this.textDarkGray,
+    required this.orangeBG,
   });
 
   // 浅色主题工厂方法
@@ -62,6 +65,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       textPrimary: _colorPrimary,
       textBlack: Colors.black,
       textDarkGray: _color666666,
+      orangeBG: _colorFE6C00,
     );
   }
 
@@ -77,6 +81,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       textPrimary: Colors.white,
       textBlack: Colors.white,
       textDarkGray: Colors.white,
+      orangeBG: _darkBlackItem,
     );
   }
 
@@ -101,6 +106,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       textPrimary: Color.lerp(textPrimary, other.textPrimary, t)!,
       textBlack: Color.lerp(textBlack, other.textBlack, t)!,
       textDarkGray: Color.lerp(textDarkGray, other.textDarkGray, t)!,
+      orangeBG: Color.lerp(orangeBG, other.orangeBG, t)!,
     );
   }
 }

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

@@ -9,6 +9,8 @@ class RouterPath {
   static const authForgotInput = '/auth/forgot/input'; //忘记密码
   static const authForgotVerify = '/auth/forgot/verify'; //忘记密码校验
   static const authSignUp = '/auth/signup'; //注册
+  static const authSignUpVerify = '/auth/signup/verify'; //注册的短信验证
+  static const authSignUpSuccess = '/auth/signup/success'; //注册的短信验证
   static const authResetPassword = '/auth/rest_psd'; //重置密码
 
   //首页

+ 49 - 0
packages/cs_widgets/lib/responsive_widget.dart

@@ -0,0 +1,49 @@
+import 'package:flutter/material.dart';
+import 'package:shared/utils/log_utils.dart';
+
+/// 响应式的布局,根据不同的尺寸展示不同的布局
+/// 桌面 - 平板 - 手机的布局判断,手机内部分为全面屏与非全面屏
+class ResponsiveWidget extends StatelessWidget {
+  final Widget? largeScreen; // 大屏幕布局
+  final Widget? mediumScreen; // 中等屏幕布局
+  final Widget smallScreen; // 默认手机屏
+  final Widget? smallFullScreen; // 手机的全面屏手机布局
+
+  const ResponsiveWidget({
+    super.key,
+    this.largeScreen,
+    this.mediumScreen,
+    this.smallFullScreen,
+    required this.smallScreen,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return LayoutBuilder(
+      builder: (context, constraints) {
+        // 大屏幕
+        if (constraints.maxWidth > 1200) {
+          return largeScreen ?? smallScreen;
+        }
+        // 中等屏幕
+        else if (constraints.maxWidth <= 1200 && constraints.maxWidth >= 800) {
+          return mediumScreen ?? largeScreen ?? smallScreen;
+        }
+        // 小屏幕
+        else {
+          // 获取屏幕的高度和宽度
+          final double height = constraints.maxHeight;
+          final double width = constraints.maxWidth;
+          final radio = height / width;
+          final isFullScreen = radio > 1.88;
+          // 判断是否为全面屏
+          if (isFullScreen) {
+            return smallFullScreen ?? smallScreen; // 如果是全面屏,使用全面屏布局
+          } else {
+            return smallScreen; // 否则使用默认手机布局
+          }
+        }
+      },
+    );
+  }
+}