5 Commity 64a934a7b4 ... 53810f0670

Autor SHA1 Správa Dátum
  liukai 53810f0670 重新定义全局默认弹窗的样式AddDefaultDialog。 2 týždňov pred
  liukai befdbb26c5 重置密码 2 týždňov pred
  liukai 8d2799d9bb 修改电话号码 2 týždňov pred
  liukai 0535edee31 设置页面 2 týždňov pred
  liukai db916c0ee8 修改九宫格图片的样式 2 týždňov pred
42 zmenil súbory, kde vykonal 2105 pridanie a 92 odobranie
  1. 9 9
      melos.yaml
  2. 1 1
      packages/cpt_auth/lib/modules/forgot_input/forgot_input_page.dart
  3. 0 1
      packages/cpt_auth/lib/modules/select_unit/select_unit_page.dart
  4. 1 1
      packages/cpt_auth/lib/modules/sign_up/sign_up_page.dart
  5. 0 3
      packages/cpt_auth/lib/router/component/auth_component_service.dart
  6. 3 1
      packages/cpt_main/lib/modules/home/page/home_page.dart
  7. 271 0
      packages/cpt_profile/lib/modules/change_mobile/change_mobile_page.dart
  8. 79 0
      packages/cpt_profile/lib/modules/change_mobile/change_mobile_state.dart
  9. 161 0
      packages/cpt_profile/lib/modules/change_mobile/change_mobile_view_model.dart
  10. 27 0
      packages/cpt_profile/lib/modules/change_mobile/change_mobile_view_model.g.dart
  11. 1 1
      packages/cpt_profile/lib/modules/profile_edit/page/Profile_edit_page.dart
  12. 0 0
      packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.dart
  13. 0 0
      packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.g.dart
  14. 282 0
      packages/cpt_profile/lib/modules/reset_password/reset_password_page.dart
  15. 85 0
      packages/cpt_profile/lib/modules/reset_password/reset_password_state.dart
  16. 158 0
      packages/cpt_profile/lib/modules/reset_password/reset_password_view_model.dart
  17. 27 0
      packages/cpt_profile/lib/modules/reset_password/reset_password_view_model.g.dart
  18. 133 0
      packages/cpt_profile/lib/modules/setting/dialog/account_deactivation_dialog.dart
  19. 105 0
      packages/cpt_profile/lib/modules/setting/setting_page.dart
  20. 15 0
      packages/cpt_profile/lib/modules/setting/setting_state.dart
  21. 53 0
      packages/cpt_profile/lib/modules/setting/setting_view_model.dart
  22. 26 0
      packages/cpt_profile/lib/modules/setting/setting_view_model.g.dart
  23. 18 1
      packages/cpt_profile/lib/router/component/profile_component_service_impl.dart
  24. 7 1
      packages/cpt_profile/lib/router/page/profile_page_router.dart
  25. 61 1
      packages/cpt_profile/lib/router/page/profile_page_router.gr.dart
  26. BIN
      packages/cs_resources/assets/base_service/dialog_delete_icon.webp
  27. BIN
      packages/cs_resources/assets/main/account_deactivation_img.webp
  28. 1 0
      packages/cs_resources/lib/generated/assets.dart
  29. 42 2
      packages/cs_resources/lib/generated/intl/messages_en.dart
  30. 33 2
      packages/cs_resources/lib/generated/intl/messages_zh_CN.dart
  31. 33 2
      packages/cs_resources/lib/generated/intl/messages_zh_HK.dart
  32. 260 0
      packages/cs_resources/lib/generated/l10n.dart
  33. 26 0
      packages/cs_resources/lib/l10n/intl_en.arb
  34. 26 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  35. 26 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  36. 17 2
      packages/cs_resources/lib/theme/app_colors_theme.dart
  37. 1 0
      packages/cs_resources/pubspec.yaml
  38. 10 0
      packages/cs_router/lib/componentRouter/profile_service.dart
  39. 7 1
      packages/cs_router/lib/path/router_path.dart
  40. 83 50
      packages/cs_widgets/lib/dialog/app_default_dialog.dart
  41. 0 2
      packages/cs_widgets/lib/my_appbar.dart
  42. 17 11
      packages/cs_widgets/lib/shatter/setting_item_container.dart

+ 9 - 9
melos.yaml

@@ -48,31 +48,31 @@ scripts:
     description: Run `dart run build_runner build` in auth module
 
   build_runner_community:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_community" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_community" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in community module
 
   build_runner_facility:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_facility" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_facility" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in facility module
 
   build_runner_form:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_form" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_form" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in form module
 
   build_runner_main:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_main" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_main" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in main module
 
   build_runner_notice_board:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_notice_board" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_notice_board" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in notice_board module
 
   build_runner_payment:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_payment" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_payment" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in payment module
 
   build_runner_profile:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_profile" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_profile" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in profile module
 
   build_runner_property:
@@ -84,11 +84,11 @@ scripts:
     description: Run `dart run build_runner build` in property module
 
   build_runner_rewards:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_rewards" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_rewards" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in rewards module
 
   build_runner_services:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_services" && dart run build_runner build
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_services" && dart run build_runner build --delete-conflicting-outputs
     description: Run `dart run build_runner build` in services module
 
   clean_all:

+ 1 - 1
packages/cpt_auth/lib/modules/forgot_input/forgot_input_page.dart

@@ -92,7 +92,7 @@ class ForgotInputPage extends HookConsumerWidget {
                   MyTextView(
                     "+65",
                     textColor: context.appColors.textBlack,
-                    fontSize: 20,
+                    fontSize: 18.5,
                     marginLeft: 15,
                     marginRight: 12,
                     isFontMedium: true,

+ 0 - 1
packages/cpt_auth/lib/modules/select_unit/select_unit_page.dart

@@ -1,4 +1,3 @@
-import 'package:cpt_auth/modules/select_estate/select_estate_state.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';

+ 1 - 1
packages/cpt_auth/lib/modules/sign_up/sign_up_page.dart

@@ -114,7 +114,7 @@ class SignUpPage extends HookConsumerWidget {
                   MyTextView(
                     "+65",
                     textColor: context.appColors.textBlack,
-                    fontSize: 20,
+                    fontSize: 18.5,
                     marginLeft: 15,
                     marginRight: 12,
                     isFontMedium: true,

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

@@ -1,10 +1,7 @@
 /*
  * Auth 组件的组件路由
  */
-import 'package:cpt_auth/modules/forgot_input/forgot_input_page.dart';
-import 'package:flutter/cupertino.dart';
 import 'package:router/componentRouter/auth_service.dart';
-import 'package:flutter/material.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 

+ 3 - 1
packages/cpt_main/lib/modules/home/page/home_page.dart

@@ -101,7 +101,9 @@ class HomePage extends HookConsumerWidget {
                   child: Text('Forgot'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () {
+                    ComponentServiceManager().profileService.startSettingPage();
+                  },
                   child: Text('Setting'),
                 ),
               ],

+ 271 - 0
packages/cpt_profile/lib/modules/change_mobile/change_mobile_page.dart

@@ -0,0 +1,271 @@
+import 'package:cpt_profile/modules/change_mobile/change_mobile_state.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/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_field.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+import '../../router/page/profile_page_router.dart';
+import 'change_mobile_view_model.dart';
+
+@RoutePage()
+class ChangeMobilePage extends HookConsumerWidget {
+  const ChangeMobilePage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const ChangeMobilePageRoute());
+    } else {
+      appRouter.push(const ChangeMobilePageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(changeMobileViewModelProvider.notifier);
+    final state = ref.watch(changeMobileViewModelProvider);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, S.current.change_mobile_phone),
+      backgroundColor: context.appColors.backgroundDefault,
+      body: SingleChildScrollView(
+        scrollDirection: Axis.vertical,
+        physics: const BouncingScrollPhysics(),
+        child: Container(
+          margin: const EdgeInsets.symmetric(horizontal: 15),
+          width: double.infinity,
+          child: Column(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              //旧手机
+              MyTextView(
+                S.current.old_mobile_phone,
+                fontSize: 16.5,
+                marginTop: 38,
+                marginBottom: 15,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              //旧的电话号码
+              Row(
+                mainAxisSize: MainAxisSize.max,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.authCountrySg,
+                    width: 45,
+                    height: 30,
+                  ),
+                  MyTextView(
+                    "+65",
+                    textColor: context.appColors.textBlack,
+                    fontSize: 18.5,
+                    marginLeft: 15,
+                    marginRight: 12,
+                    isFontMedium: true,
+                  ),
+                  //电话输入框
+                  _buildInputLayout(
+                    context,
+                    state,
+                    "old",
+                    textInputType: TextInputType.number,
+                    textInputAction: TextInputAction.next,
+                    onSubmit: (formKey, value) {
+                      state.formData[formKey]!['focusNode'].unfocus();
+                      FocusScope.of(context).requestFocus(state.formData['old_code']!['focusNode']);
+                    },
+                  ).expanded(),
+                ],
+              ),
+
+              //旧手机的验证码
+              MyTextView(
+                S.current.verification_code,
+                fontSize: 16.5,
+                marginTop: 13,
+                marginBottom: 15,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              // 表单 - 旧的电话号码验证码
+              _buildInputLayout(
+                context,
+                state,
+                "old_code",
+                textInputType: TextInputType.number,
+                textInputAction: TextInputAction.next,
+                errorText: state.oldCodeErrorText,
+                showRightIcon: true,
+                rightWidget: MyTextView(
+                  state.isOldCounting ? "${state.oldCountdownTime} s" : S.current.get_code,
+                  textAlign: TextAlign.center,
+                  textColor: context.appColors.textPrimary,
+                  fontSize: 15,
+                  paddingRight: 5,
+                  isFontMedium: true,
+                  onClick: state.isOldCounting ? null : () => viewModel.showVerifyCodedDialog(false),
+                ).paddingOnly(top: 15, bottom: 15),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['new']!['focusNode']);
+                },
+              ),
+
+              //新电话
+              MyTextView(
+                S.current.new_mobile_phone,
+                fontSize: 16.5,
+                marginTop: 38,
+                marginBottom: 15,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              //新的电话号码
+              Row(
+                mainAxisSize: MainAxisSize.max,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.authCountrySg,
+                    width: 45,
+                    height: 30,
+                  ),
+                  MyTextView(
+                    "+65",
+                    textColor: context.appColors.textBlack,
+                    fontSize: 18.5,
+                    marginLeft: 15,
+                    marginRight: 12,
+                    isFontMedium: true,
+                  ),
+                  //电话输入框
+                  _buildInputLayout(
+                    context,
+                    state,
+                    "new",
+                    textInputType: TextInputType.number,
+                    textInputAction: TextInputAction.next,
+                    onSubmit: (formKey, value) {
+                      state.formData[formKey]!['focusNode'].unfocus();
+                      FocusScope.of(context).requestFocus(state.formData['new_code']!['focusNode']);
+                    },
+                  ).expanded(),
+                ],
+              ),
+
+              //新手机的验证码
+              MyTextView(
+                S.current.verification_code,
+                fontSize: 16.5,
+                marginTop: 13,
+                marginBottom: 15,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              // 表单 - 新的电话号码验证码
+              _buildInputLayout(
+                context,
+                state,
+                "new_code",
+                textInputType: TextInputType.number,
+                textInputAction: TextInputAction.done,
+                errorText: state.newCodeErrorText,
+                showRightIcon: true,
+                rightWidget: MyTextView(
+                  state.isNewCounting ? "${state.newCountdownTime} s" : S.current.get_code,
+                  textAlign: TextAlign.center,
+                  textColor: context.appColors.textPrimary,
+                  fontSize: 15,
+                  paddingRight: 5,
+                  isFontMedium: true,
+                  onClick: state.isNewCounting ? null : () => viewModel.showVerifyCodedDialog(true),
+                ).paddingOnly(top: 15, bottom: 15),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  viewModel.submitChangeMobile();
+                },
+              ),
+
+              //提交按钮
+              MyButton(
+                onPressed: viewModel.submitChangeMobile,
+                text: S.current.submit,
+                textColor: Colors.white,
+                backgroundColor: context.appColors.btnBgDefault,
+                fontWeight: FontWeight.w500,
+                type: ClickType.throttle,
+                fontSize: 16,
+                minHeight: 50,
+                radius: 5,
+              ).marginOnly(top: 50, bottom: 30),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  /// 输入框
+  Widget _buildInputLayout(
+    BuildContext context,
+    ChangeMobileState state,
+    String key, {
+    double marginTop = 0,
+    bool? showRightIcon = false, //是否展示右侧的布局
+    Widget? rightWidget, //右侧的布局
+    TextInputType textInputType = TextInputType.text,
+    String? errorText,
+    bool obscureText = false,
+    TextInputAction textInputAction = TextInputAction.done,
+    Function? onSubmit,
+  }) {
+    return IgnoreKeyboardDismiss(
+      child: MyTextField(
+        key,
+        fillBackgroundColor: context.appColors.authFiledBG,
+        state.formData[key]!['value'],
+        hintText: state.formData[key]!['hintText'],
+        hintStyle: TextStyle(
+          color: context.appColors.authFiledHint,
+          fontSize: 15.0,
+          fontWeight: FontWeight.w500,
+        ),
+        controller: state.formData[key]!['controller'],
+        focusNode: state.formData[key]!['focusNode'],
+        margin: EdgeInsets.only(top: marginTop),
+        padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
+        showDivider: false,
+        height: 44,
+        style: TextStyle(
+          color: context.appColors.authFiledText,
+          fontSize: 15.0,
+          fontWeight: FontWeight.w500,
+        ),
+        inputType: textInputType,
+        textInputAction: textInputAction,
+        onSubmit: onSubmit,
+        cursorColor: context.appColors.authFiledText,
+        obscureText: obscureText,
+        errorText: errorText,
+        showLeftIcon: true,
+        showRightIcon: showRightIcon,
+        rightWidget: rightWidget,
+      ),
+    );
+  }
+}

+ 79 - 0
packages/cpt_profile/lib/modules/change_mobile/change_mobile_state.dart

@@ -0,0 +1,79 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:flutter/material.dart';
+
+class ChangeMobileState {
+  //表单的校验与数据
+  final Map<String, Map<String, dynamic>> formData;
+
+  //获取验证码的倒计时
+  bool isOldCounting;
+  int oldCountdownTime;
+
+  bool isNewCounting;
+  int newCountdownTime;
+
+  //表单的错误信息展示
+  String? oldCodeErrorText;
+  String? newCodeErrorText;
+
+  // ===================================  Begin  ↓  ===================================
+
+  ChangeMobileState({
+    Map<String, Map<String, dynamic>>? formData,
+    this.isOldCounting = false,
+    this.oldCountdownTime = 0,
+    this.isNewCounting = false,
+    this.newCountdownTime = 0,
+    this.oldCodeErrorText,
+    this.newCodeErrorText,
+  }) : formData = formData ??
+            {
+              'old': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.mobile_phone,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'old_code': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.verification_code,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'new': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.mobile_phone,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'new_code': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.verification_code,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+            };
+
+  ChangeMobileState copyWith({
+    bool? isOldCounting,
+    int? oldCountdownTime,
+    bool? isNewCounting,
+    int? newCountdownTime,
+    String? oldCodeErrorText,
+    String? newCodeErrorText,
+  }) {
+    return ChangeMobileState(
+      formData: this.formData,
+      isOldCounting: isOldCounting ?? this.isOldCounting,
+      oldCountdownTime: oldCountdownTime ?? this.oldCountdownTime,
+      isNewCounting: isNewCounting ?? this.isNewCounting,
+      newCountdownTime: newCountdownTime ?? this.newCountdownTime,
+      oldCodeErrorText: oldCodeErrorText,
+      newCodeErrorText: newCodeErrorText,
+    );
+  }
+}

+ 161 - 0
packages/cpt_profile/lib/modules/change_mobile/change_mobile_view_model.dart

@@ -0,0 +1,161 @@
+import 'dart:async';
+
+import 'package:cpt_profile/modules/setting/setting_page.dart';
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/util.dart';
+
+import 'change_mobile_state.dart';
+
+part 'change_mobile_view_model.g.dart';
+
+@riverpod
+class ChangeMobileViewModel extends _$ChangeMobileViewModel {
+  @override
+  ChangeMobileState build() {
+    final state = ChangeMobileState();
+    initListener(state);
+    ref.onDispose(() {
+      onDispose(state);
+    });
+    return state;
+  }
+
+  /// 提交表单修改电话号码
+  void submitChangeMobile() {
+    state = state.copyWith(oldCodeErrorText: null, newCodeErrorText: null);
+
+    final FocusNode oldMobileFocusNode = state.formData['old']!['focusNode'];
+    final FocusNode oldCodeFocusNode = state.formData['old_code']!['focusNode'];
+    final FocusNode newMobileFocusNode = state.formData['new']!['focusNode'];
+    final FocusNode newCodeFocusNode = state.formData['new_code']!['focusNode'];
+
+    final TextEditingController oldMobileController = state.formData['old']!['controller'];
+    final TextEditingController oldCodeController = state.formData['old_code']!['controller'];
+    final TextEditingController newMobileController = state.formData['new']!['controller'];
+    final TextEditingController newCodeController = state.formData['new_code']!['controller'];
+
+    oldMobileFocusNode.unfocus();
+    oldCodeFocusNode.unfocus();
+    newMobileFocusNode.unfocus();
+    newCodeFocusNode.unfocus();
+
+    final oldMobile = oldMobileController.text;
+    final oldCode = oldCodeController.text;
+    final newMobile = newMobileController.text;
+    final newCode = newCodeController.text;
+
+    Log.d('当前待提交的 oldMobile:$oldMobile oldCode:$oldCode newMobile:$newMobile newCode:$newCode');
+
+    if (Utils.isEmpty(oldMobile)) {
+      ToastEngine.show("Enter Old Mobile Phone");
+      return;
+    }
+
+    if (Utils.isEmpty(oldCode)) {
+      state = state.copyWith(oldCodeErrorText: "Old mobile phone verification code cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(newMobile)) {
+      ToastEngine.show("Enter New Mobile Phone");
+      return;
+    }
+
+    if (Utils.isEmpty(newCode)) {
+      state = state.copyWith(newCodeErrorText: "New mobile phone verification code cannot be empty!");
+      return;
+    }
+
+    //执行密码登录
+    ToastEngine.show('准备执行请求发送验证码 oldMobile:$oldMobile oldCode:$oldCode newMobile:$newMobile newCode:$newCode');
+
+    //返回设置页面
+    SettingPage.startInstance();
+  }
+
+  //展示发送验证码弹窗
+  showVerifyCodedDialog(bool isNewMobile) {
+    if (isNewMobile) {
+      _startNewCountDown();
+    } else {
+      _startOldCountDown();
+    }
+  }
+
+  Timer? oldCountdownTimer;
+  Timer? newCountdownTimer;
+
+  /// 开启倒计时 - Old
+  void _startOldCountDown() {
+    //60秒倒计时
+    state = state.copyWith(isOldCounting: true, oldCountdownTime: 60);
+
+    //每秒的倒计时
+    oldCountdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
+      int time = state.oldCountdownTime;
+      Log.d('Old倒计时-->$time');
+      if (time > 0) {
+        time--;
+        state = state.copyWith(isOldCounting: true, oldCountdownTime: time);
+      } else {
+        state = state.copyWith(isOldCounting: false, oldCountdownTime: 0);
+        oldCountdownTimer?.cancel(); // 取消计时器
+      }
+    });
+  }
+
+  /// 开启倒计时 - New
+  void _startNewCountDown() {
+    //60秒倒计时
+    state = state.copyWith(isNewCounting: true, newCountdownTime: 60);
+
+    //每秒的倒计时
+    newCountdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
+      int time = state.newCountdownTime;
+      Log.d('Old倒计时-->$time');
+      if (time > 0) {
+        time--;
+        state = state.copyWith(isNewCounting: true, newCountdownTime: time);
+      } else {
+        state = state.copyWith(isNewCounting: false, newCountdownTime: 0);
+        newCountdownTimer?.cancel(); // 取消计时器
+      }
+    });
+  }
+
+  //初始化监听
+  void initListener(ChangeMobileState initState) {
+    final FocusNode oldCodeFocusNode = initState.formData['old_code']!['focusNode'];
+    final FocusNode newCodeFocusNode = initState.formData['new_code']!['focusNode'];
+
+    oldCodeFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (oldCodeFocusNode.hasFocus) {
+        state = state.copyWith(oldCodeErrorText: null);
+      }
+    });
+
+    newCodeFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (newCodeFocusNode.hasFocus) {
+        state = state.copyWith(newCodeErrorText: null);
+      }
+    });
+  }
+
+  //销毁资源
+  void onDispose(ChangeMobileState initState) {
+    final FocusNode oldCodeFocusNode = initState.formData['old_code']!['focusNode'];
+    final FocusNode newCodeFocusNode = initState.formData['new_code']!['focusNode'];
+    oldCodeFocusNode.dispose();
+    newCodeFocusNode.dispose();
+
+    oldCountdownTimer?.cancel();
+    newCountdownTimer?.cancel();
+
+    Log.d("ChangeMobileViewModel 销毁 onDispose");
+  }
+}

+ 27 - 0
packages/cpt_profile/lib/modules/change_mobile/change_mobile_view_model.g.dart

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

+ 1 - 1
packages/cpt_profile/lib/modules/profile_edit/page/Profile_edit_page.dart

@@ -1,4 +1,4 @@
-import 'package:cpt_profile/modules/profile_edit/vm/profile_edit_view_model.dart';
+import 'package:cpt_profile/modules/profile_edit/profile_edit_view_model.dart';
 import 'package:cpt_profile/router/page/profile_page_router.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';

packages/cpt_profile/lib/modules/profile_edit/vm/profile_edit_view_model.dart → packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.dart


packages/cpt_profile/lib/modules/profile_edit/vm/profile_edit_view_model.g.dart → packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.g.dart


+ 282 - 0
packages/cpt_profile/lib/modules/reset_password/reset_password_page.dart

@@ -0,0 +1,282 @@
+
+import 'package:cpt_profile/modules/reset_password/reset_password_state.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/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_field.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+
+import '../../router/page/profile_page_router.dart';
+import 'reset_password_view_model.dart';
+
+@RoutePage()
+class ResetPasswordPage extends HookConsumerWidget {
+  const ResetPasswordPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const ResetPasswordPageRoute());
+    } else {
+      appRouter.push(const ResetPasswordPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(resetPasswordViewModelProvider.notifier);
+    final state = ref.watch(resetPasswordViewModelProvider);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, S.current.reset_password),
+      backgroundColor: context.appColors.backgroundDefault,
+      body: SingleChildScrollView(
+        scrollDirection: Axis.vertical,
+        physics: const BouncingScrollPhysics(),
+        child: Container(
+          margin: const EdgeInsets.symmetric(horizontal: 15),
+          width: double.infinity,
+          child: Column(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              //手机号码
+              MyTextView(
+                S.current.mobile_phone,
+                fontSize: 16.5,
+                marginTop: 38,
+                marginBottom: 15,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              //电话号码
+              Row(
+                mainAxisSize: MainAxisSize.max,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.authCountrySg,
+                    width: 45,
+                    height: 30,
+                  ),
+                  MyTextView(
+                    "+65",
+                    textColor: context.appColors.textBlack,
+                    fontSize: 18.5,
+                    marginLeft: 15,
+                    marginRight: 12,
+                    isFontMedium: true,
+                  ),
+                  //电话输入框
+                  _buildInputLayout(
+                    context,
+                    state,
+                    "phone",
+                    textInputType: TextInputType.number,
+                    textInputAction: TextInputAction.next,
+                    onSubmit: (formKey, value) {
+                      state.formData[formKey]!['focusNode'].unfocus();
+                      FocusScope.of(context).requestFocus(state.formData['code']!['focusNode']);
+                    },
+                  ).expanded(),
+                ],
+              ),
+
+              //手机的验证码
+              MyTextView(
+                S.current.verification_code,
+                fontSize: 16.5,
+                marginTop: 14,
+                marginBottom: 16,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              // 表单 - 电话号码验证码
+              _buildInputLayout(
+                context,
+                state,
+                "code",
+                textInputType: TextInputType.number,
+                textInputAction: TextInputAction.next,
+                errorText: state.codeErrorText,
+                showRightIcon: true,
+                rightWidget: MyTextView(
+                  state.isCounting ? "${state.countdownTime} s" : S.current.get_code,
+                  textAlign: TextAlign.center,
+                  textColor: context.appColors.textPrimary,
+                  fontSize: 15,
+                  paddingRight: 5,
+                  isFontMedium: true,
+                  onClick: state.isCounting ? null : () => viewModel.showVerifyCodedDialog(),
+                ).paddingOnly(top: 15, bottom: 15),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['password']!['focusNode']);
+                },
+              ),
+
+              //新密码
+              MyTextView(
+                S.current.new_password,
+                fontSize: 16.5,
+                marginTop: 14,
+                marginBottom: 16,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              // 表单 - 新密码
+              _buildInputLayout(
+                context,
+                state,
+                "password",
+                obscureText: !state.pwdVisibility,
+                errorText: state.passwordErrorText,
+                textInputAction: TextInputAction.next,
+                showRightIcon: true,
+                rightWidget: IconButton(
+                  highlightColor: Colors.transparent,
+                  splashColor: Colors.transparent,
+                  icon: state.pwdVisibility
+                      ? const MyAssetImage(
+                    Assets.authPasswordHide,
+                    width: 22.5,
+                    height: 16.5,
+                  )
+                      : const MyAssetImage(
+                    Assets.authPasswordShow,
+                    width: 22.5,
+                    height: 16.5,
+                  ),
+                  onPressed: () {
+                    viewModel.switchPwdVisibility();
+                  },
+                ),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['confirm_password']!['focusNode']);
+                },
+              ),
+
+              //重复密码
+              MyTextView(
+                S.current.confirm_new_password,
+                fontSize: 16.5,
+                marginTop: 14,
+                marginBottom: 16,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+
+              // 表单 - 确认密码
+              _buildInputLayout(
+                context,
+                state,
+                "confirm_password",
+                obscureText: !state.confirmPwdVisibility,
+                errorText: state.confirmPasswordErrorText,
+                showRightIcon: true,
+                rightWidget: IconButton(
+                  highlightColor: Colors.transparent,
+                  splashColor: Colors.transparent,
+                  icon: state.confirmPwdVisibility
+                      ? const MyAssetImage(
+                    Assets.authPasswordHide,
+                    width: 22.5,
+                    height: 16.5,
+                  )
+                      : const MyAssetImage(
+                    Assets.authPasswordShow,
+                    width: 22.5,
+                    height: 16.5,
+                  ),
+                  onPressed: () {
+                    viewModel.switchConfirmPwdVisibility();
+                  },
+                ),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  viewModel.submitResetPassword();
+                },
+              ),
+
+              //提交按钮
+              MyButton(
+                onPressed: viewModel.submitResetPassword,
+                text: S.current.submit,
+                textColor: Colors.white,
+                backgroundColor: context.appColors.btnBgDefault,
+                fontWeight: FontWeight.w500,
+                type: ClickType.throttle,
+                fontSize: 16,
+                minHeight: 50,
+                radius: 5,
+              ).marginOnly(top: 50, bottom: 30),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  /// 输入框
+  Widget _buildInputLayout(
+      BuildContext context,
+      ResetPasswordState state,
+      String key, {
+        double marginTop = 0,
+        bool? showRightIcon = false, //是否展示右侧的布局
+        Widget? rightWidget, //右侧的布局
+        TextInputType textInputType = TextInputType.text,
+        String? errorText,
+        bool obscureText = false,
+        TextInputAction textInputAction = TextInputAction.done,
+        Function? onSubmit,
+      }) {
+    return IgnoreKeyboardDismiss(
+      child: MyTextField(
+        key,
+        fillBackgroundColor: context.appColors.authFiledBG,
+        state.formData[key]!['value'],
+        hintText: state.formData[key]!['hintText'],
+        hintStyle: TextStyle(
+          color: context.appColors.authFiledHint,
+          fontSize: 15.0,
+          fontWeight: FontWeight.w500,
+        ),
+        controller: state.formData[key]!['controller'],
+        focusNode: state.formData[key]!['focusNode'],
+        margin: EdgeInsets.only(top: marginTop),
+        padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
+        showDivider: false,
+        height: 44,
+        style: TextStyle(
+          color: context.appColors.authFiledText,
+          fontSize: 15.0,
+          fontWeight: FontWeight.w500,
+        ),
+        inputType: textInputType,
+        textInputAction: textInputAction,
+        onSubmit: onSubmit,
+        cursorColor: context.appColors.authFiledText,
+        obscureText: obscureText,
+        errorText: errorText,
+        showLeftIcon: true,
+        showRightIcon: showRightIcon,
+        rightWidget: rightWidget,
+      ),
+    );
+  }
+
+}

+ 85 - 0
packages/cpt_profile/lib/modules/reset_password/reset_password_state.dart

@@ -0,0 +1,85 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:flutter/material.dart';
+
+class ResetPasswordState{
+  //表单的校验与数据
+  final Map<String, Map<String, dynamic>> formData;
+
+  //表单的错误信息展示
+  String? codeErrorText;
+  String? passwordErrorText;
+  String? confirmPasswordErrorText;
+
+  //是否明文展示密码
+  bool pwdVisibility;
+
+  bool confirmPwdVisibility;
+
+  //获取验证码的倒计时
+  bool isCounting;
+  int countdownTime;
+
+  // ===================================  Begin  ↓  ===================================
+
+  ResetPasswordState({
+    Map<String, Map<String, dynamic>>? formData,
+    this.pwdVisibility = false,
+    this.confirmPwdVisibility = false,
+    this.isCounting = false,
+    this.countdownTime = 0,
+    this.codeErrorText,
+    this.passwordErrorText,
+    this.confirmPasswordErrorText,
+  }) : formData = formData ??
+      {
+        'phone': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.mobile_phone,
+          'focusNode': FocusNode(),
+          'obsecure': false,
+        },
+        'code': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.verification_code,
+          'focusNode': FocusNode(),
+          'obsecure': false,
+        },
+        'password': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.password_format,
+          'focusNode': FocusNode(),
+          'obsecure': true,
+        },
+        'confirm_password': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.password_format,
+          'focusNode': FocusNode(),
+          'obsecure': true,
+        },
+      };
+
+  ResetPasswordState copyWith({
+    String? codeErrorText,
+    String? passwordErrorText,
+    String? confirmPasswordErrorText,
+    bool? pwdVisibility,
+    bool? confirmPwdVisibility,
+    bool? isCounting,
+    int? countdownTime,
+  }) {
+    return ResetPasswordState(
+      formData: this.formData,
+      pwdVisibility: pwdVisibility ?? this.pwdVisibility,
+      confirmPwdVisibility: confirmPwdVisibility ?? this.confirmPwdVisibility,
+      isCounting: isCounting ?? this.isCounting,
+      countdownTime: countdownTime ?? this.countdownTime,
+      codeErrorText: codeErrorText,
+      passwordErrorText: passwordErrorText,
+      confirmPasswordErrorText: confirmPasswordErrorText,
+    );
+  }
+}

+ 158 - 0
packages/cpt_profile/lib/modules/reset_password/reset_password_view_model.dart

@@ -0,0 +1,158 @@
+import 'dart:async';
+
+import 'package:cpt_profile/modules/reset_password/reset_password_state.dart';
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/util.dart';
+
+part 'reset_password_view_model.g.dart';
+
+@riverpod
+class ResetPasswordViewModel extends _$ResetPasswordViewModel {
+  @override
+  ResetPasswordState build() {
+    final state = ResetPasswordState();
+    initListener(state);
+    ref.onDispose(() {
+      onDispose(state);
+    });
+    return state;
+  }
+
+  /// 提交重置密码请求
+  void submitResetPassword() {
+    state = state.copyWith(codeErrorText: null, passwordErrorText: null, confirmPasswordErrorText: null);
+
+    final FocusNode phoneFocusNode = state.formData['phone']!['focusNode'];
+    final FocusNode codeFocusNode = state.formData['code']!['focusNode'];
+    final FocusNode passwordFocusNode = state.formData['password']!['focusNode'];
+    final FocusNode confirmPasswordFocusNode = state.formData['confirm_password']!['focusNode'];
+
+    final TextEditingController phoneController = state.formData['phone']!['controller'];
+    final TextEditingController codeController = state.formData['code']!['controller'];
+    final TextEditingController passwordController = state.formData['password']!['controller'];
+    final TextEditingController confirmPasswordController = state.formData['confirm_password']!['controller'];
+
+    phoneFocusNode.unfocus();
+    codeFocusNode.unfocus();
+    passwordFocusNode.unfocus();
+    confirmPasswordFocusNode.unfocus();
+
+    final phone = phoneController.text;
+    final code = codeController.text;
+    final password = passwordController.text;
+    final confirmPassword = confirmPasswordController.text;
+
+    Log.d('当前待提交的 phone:$phone code:$code password:$password confirmPassword:$confirmPassword');
+
+    if (Utils.isEmpty(phone)) {
+      ToastEngine.show("Enter Mobile Phone");
+      return;
+    }
+
+    if (Utils.isEmpty(code)) {
+      state = state.copyWith(codeErrorText: "Verification Code cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(password)) {
+      state = state.copyWith(passwordErrorText: "Password cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(confirmPassword)) {
+      state = state.copyWith(confirmPasswordErrorText: "Confirm Password cannot be empty!");
+      return;
+    }
+
+    if (confirmPassword != password) {
+      state = state.copyWith(confirmPasswordErrorText: "Password mismatch, please check password");
+      return;
+    }
+
+    //执行密码登录
+    ToastEngine.show('准备执行请求发送验证码 phone:$phone code:$code password:$password confirmPassword:$confirmPassword');
+
+    //页面返回
+    appRouter.maybePop();
+  }
+
+  //切换隐藏显示密码
+  void switchPwdVisibility() {
+    state = state.copyWith(pwdVisibility: !state.pwdVisibility);
+  }
+
+  void switchConfirmPwdVisibility() {
+    state = state.copyWith(confirmPwdVisibility: !state.confirmPwdVisibility);
+  }
+
+  void showVerifyCodedDialog() {
+    _startCountDown();
+  }
+
+  Timer? countdownTimer;
+
+  /// 开启倒计时
+  void _startCountDown() {
+    //60秒倒计时
+    state = state.copyWith(isCounting: true, countdownTime: 60);
+
+    //每秒的倒计时
+    countdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
+      int time = state.countdownTime;
+      Log.d('倒计时-->$time');
+      if (time > 0) {
+        time--;
+        state = state.copyWith(isCounting: true, countdownTime: time);
+      } else {
+        state = state.copyWith(isCounting: false, countdownTime: 0);
+        countdownTimer?.cancel(); // 取消计时器
+      }
+    });
+  }
+
+  //初始化监听
+  void initListener(ResetPasswordState initState) {
+    final FocusNode codeFocusNode = initState.formData['code']!['focusNode'];
+    final FocusNode passwordFocusNode = initState.formData['password']!['focusNode'];
+    final FocusNode confirmPasswordFocusNode = initState.formData['confirm_password']!['focusNode'];
+
+    codeFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (codeFocusNode.hasFocus) {
+        state = state.copyWith(codeErrorText: null);
+      }
+    });
+
+    passwordFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (passwordFocusNode.hasFocus) {
+        state = state.copyWith(passwordErrorText: null);
+      }
+    });
+
+    confirmPasswordFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (confirmPasswordFocusNode.hasFocus) {
+        state = state.copyWith(confirmPasswordErrorText: null);
+      }
+    });
+  }
+
+  //销毁资源
+  void onDispose(ResetPasswordState initState) {
+    final FocusNode codeFocusNode = initState.formData['code']!['focusNode'];
+    final FocusNode passwordFocusNode = initState.formData['password']!['focusNode'];
+    final FocusNode confirmPasswordFocusNode = initState.formData['confirm_password']!['focusNode'];
+    codeFocusNode.dispose();
+    passwordFocusNode.dispose();
+    confirmPasswordFocusNode.dispose();
+
+    countdownTimer?.cancel();
+
+    Log.d("ForgotVerifyViewModel 销毁 onDispose");
+  }
+}

+ 27 - 0
packages/cpt_profile/lib/modules/reset_password/reset_password_view_model.g.dart

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

+ 133 - 0
packages/cpt_profile/lib/modules/setting/dialog/account_deactivation_dialog.dart

@@ -0,0 +1,133 @@
+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:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+
+class AccountDeactivationDialog extends StatelessWidget {
+  VoidCallback confirmAction;
+
+  AccountDeactivationDialog({
+    required this.confirmAction,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.center,
+      mainAxisAlignment: MainAxisAlignment.center,
+      children: [
+        Container(
+          width: double.infinity,
+          height: 55,
+          decoration: BoxDecoration(
+            color: context.appColors.btnBgDefault,
+            borderRadius: const BorderRadius.only(
+              topRight: Radius.circular(15),
+              topLeft: Radius.circular(15),
+            ),
+          ),
+          child: Row(
+            children: [
+              const SizedBox(width: 45),
+              MyTextView(
+                S.current.account_deactivation,
+                fontSize: 18,
+                textAlign: TextAlign.center,
+                isFontMedium: true,
+                textColor: Colors.white,
+              ).expanded(),
+              const MyAssetImage(
+                Assets.baseServiceDialogDeleteIcon,
+                width: 25,
+                height: 25.5,
+              ).onTap(() {
+                onCancel();
+              }, padding: 10)
+            ],
+          ),
+        ),
+        Container(
+          width: double.infinity,
+          padding: const EdgeInsets.only(top: 22),
+          decoration: BoxDecoration(
+            color: context.appColors.whiteSecondBG,
+            borderRadius: const BorderRadius.only(
+              bottomLeft: Radius.circular(15),
+              bottomRight: Radius.circular(15),
+            ),
+          ),
+          child: Column(
+            children: [
+              const MyAssetImage(Assets.mainAccountDeactivationImg, width: 296.5, height: 158.5),
+
+              MyTextView(
+                S.current.account_deactivate_alert,
+                textAlign: TextAlign.center,
+                textColor: context.appColors.textBlack,
+                marginTop: 24,
+                paddingLeft: 30,
+                paddingRight: 30,
+                fontSize: 15,
+                isFontMedium: true,
+              ),
+
+              Row(
+                children: [
+                  const SizedBox(width: 18),
+                  Expanded(
+                      flex: 1,
+                      child: InkWell(
+                        onTap: () {
+                          onCancel();
+                        },
+                        child: MyTextView(
+                          S.current.no,
+                          fontSize: 16,
+                          isFontMedium: true,
+                          paddingTop: 13,
+                          marginRight: 15,
+                          paddingBottom: 13,
+                          textAlign: TextAlign.center,
+                          textColor: Colors.white,
+                          backgroundColor: context.appColors.orangeBG,
+                          cornerRadius: 7,
+                        ),
+                      )),
+                  Expanded(
+                      flex: 1,
+                      child: InkWell(
+                        onTap: () async {
+                          onCancel();
+                          confirmAction();
+                        },
+                        child: MyTextView(
+                          S.current.yes,
+                          fontSize: 16,
+                          paddingTop: 13,
+                          paddingBottom: 13,
+                          isFontMedium: true,
+                          textAlign: TextAlign.center,
+                          textColor: Colors.white,
+                          backgroundColor: context.appColors.btnBgDefault,
+                          cornerRadius: 7,
+                        ),
+                      )),
+                  const SizedBox(width: 18),
+                ],
+              ).marginOnly(bottom: 30, top: 28),
+            ],
+          ),
+        ),
+      ],
+    ).constrained(width: 340);
+  }
+
+//取消弹框
+  void onCancel() async {
+    SmartDialog.dismiss();
+  }
+}

+ 105 - 0
packages/cpt_profile/lib/modules/setting/setting_page.dart

@@ -0,0 +1,105 @@
+import 'package:cpt_profile/modules/setting/setting_view_model.dart';
+import 'package:cpt_profile/router/page/profile_page_router.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_basic/provider/app_config/app_config_service.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_text_view.dart';
+import 'package:widgets/shatter/setting_item_container.dart';
+
+@RoutePage()
+class SettingPage extends HookConsumerWidget {
+  const SettingPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.navigate(const SettingPageRoute());
+    } else {
+      appRouter.navigate(const SettingPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(settingViewModelProvider.notifier);
+    final state = ref.watch(settingViewModelProvider);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, S.current.settings, backgroundColor: context.appColors.whiteBG),
+      backgroundColor: context.appColors.backgroundDark,
+      body: SingleChildScrollView(
+        scrollDirection: Axis.vertical,
+        physics: const BouncingScrollPhysics(),
+        child: Column(
+          mainAxisSize: MainAxisSize.max,
+          crossAxisAlignment: CrossAxisAlignment.center,
+          children: [
+            const SizedBox(height: 10),
+
+            //允许通知
+            SettingItemContainer(
+              title: S.current.enable_notification,
+              rightWidget: CupertinoSwitch(
+                activeColor: context.appColors.textPrimary,
+                value: state.enbaleNofitication,
+                onChanged: (value) {
+                  viewModel.changeEnableNotification(value);
+                },
+              ),
+            ),
+
+            //修改手机号码
+            SettingItemContainer(title: S.current.change_mobile_phone).onTap(viewModel.gotoChangeMobilePage),
+
+            //重置密码
+            SettingItemContainer(title: S.current.reset_password).onTap(viewModel.gotoResetPasswordPage),
+
+            //隐私协议
+            SettingItemContainer(title: S.current.privacy_policy),
+
+            //服务条款
+            SettingItemContainer(title: S.current.terms_conditions),
+
+            //删除账号
+            SettingItemContainer(title: S.current.account_deactivation).onTap(viewModel.doDeleteAccount),
+
+            //评价我们
+            SettingItemContainer(title: S.current.rate_us),
+
+            //版本号
+            SettingItemContainer(
+              title: S.current.version_no,
+              rightWidget: MyTextView(
+                AppConfigService.getState().version,
+                textColor: context.appColors.textPrimary,
+                fontSize: 15,
+                isFontMedium: true,
+              ),
+            ),
+
+            //提交按钮
+            MyButton(
+              onPressed: viewModel.doLogout,
+              text: S.current.logout,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 5,
+            ).marginOnly(top: 22, bottom: 25, left: 15, right: 15),
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 15 - 0
packages/cpt_profile/lib/modules/setting/setting_state.dart

@@ -0,0 +1,15 @@
+class SettingState {
+  final bool enbaleNofitication;  //是否允许通知
+
+  const SettingState({
+    this.enbaleNofitication = true,
+  });
+
+  SettingState copyWith({
+    bool? enbaleNofitication,
+  }) {
+    return SettingState(
+      enbaleNofitication: enbaleNofitication ?? this.enbaleNofitication,
+    );
+  }
+}

+ 53 - 0
packages/cpt_profile/lib/modules/setting/setting_view_model.dart

@@ -0,0 +1,53 @@
+import 'package:cpt_profile/modules/change_mobile/change_mobile_page.dart';
+import 'package:cpt_profile/modules/reset_password/reset_password_page.dart';
+import 'package:cpt_profile/modules/setting/dialog/account_deactivation_dialog.dart';
+import 'package:cpt_profile/modules/setting/setting_state.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:widgets/dialog/app_default_dialog.dart';
+
+part 'setting_view_model.g.dart';
+
+@riverpod
+class SettingViewModel extends _$SettingViewModel {
+  @override
+  SettingState build() {
+    return SettingState();
+  }
+
+  void changeEnableNotification(bool value) {
+    state = state.copyWith(enbaleNofitication: value);
+  }
+
+  //去修改手机号码的页面
+  void gotoChangeMobilePage() {
+    ChangeMobilePage.startInstance();
+  }
+
+  void gotoResetPasswordPage() {
+    ResetPasswordPage.startInstance();
+  }
+
+  // 退出登录
+  void doLogout() {
+    DialogEngine.show(
+        widget: AppDefaultDialog(
+      message: "Are you sure you want to logout?",
+      confirmAction: () {
+        ToastEngine.show("点击了确定");
+      },
+    ));
+  }
+
+  //展示删除账号的提示弹窗
+  void doDeleteAccount() {
+    DialogEngine.show(widget: AccountDeactivationDialog(
+      confirmAction: () {
+        ToastEngine.show("点击了确定");
+      },
+    ));
+  }
+
+}

+ 26 - 0
packages/cpt_profile/lib/modules/setting/setting_view_model.g.dart

@@ -0,0 +1,26 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'setting_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$settingViewModelHash() => r'e008ce2120bd069243f13ad1502eba8992950a63';
+
+/// See also [SettingViewModel].
+@ProviderFor(SettingViewModel)
+final settingViewModelProvider =
+    AutoDisposeNotifierProvider<SettingViewModel, SettingState>.internal(
+  SettingViewModel.new,
+  name: r'settingViewModelProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$settingViewModelHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$SettingViewModel = AutoDisposeNotifier<SettingState>;
+// 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

+ 18 - 1
packages/cpt_profile/lib/router/component/profile_component_service_impl.dart

@@ -1,10 +1,11 @@
 /*
  * Profile 组件的组件路由
  */
+import 'package:cpt_profile/modules/setting/setting_page.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:router/componentRouter/profile_service.dart';
 
-import '../../modules/profile_edit/page/Profile_edit_page.dart';
+import '../../modules/profile_edit/Profile_edit_page.dart';
 
 class ProfileComponentServiceImpl extends ProfileService {
   @override
@@ -12,4 +13,20 @@ class ProfileComponentServiceImpl extends ProfileService {
     ProfileEditPage.startInstance(context: context);
   }
 
+  @override
+  void startMyEstatePage({BuildContext? context}) {}
+
+  @override
+  void startMyFollowPage({BuildContext? context}) {}
+
+  @override
+  void startMyHouseHoldPage({BuildContext? context}) {}
+
+  @override
+  void startMyPostPage({BuildContext? context}) {}
+
+  @override
+  void startSettingPage({BuildContext? context}) {
+    SettingPage.startInstance(context: context);
+  }
 }

+ 7 - 1
packages/cpt_profile/lib/router/page/profile_page_router.dart

@@ -3,7 +3,10 @@ import 'package:flutter/material.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/path/router_path.dart';
 
-import '../../modules/profile_edit/page/Profile_edit_page.dart';
+import '../../modules/profile_edit/Profile_edit_page.dart';
+import '../../modules/setting/setting_page.dart';
+import '../../modules/change_mobile/change_mobile_page.dart';
+import '../../modules/reset_password/reset_password_page.dart';
 
 
 part 'profile_page_router.gr.dart';
@@ -17,5 +20,8 @@ class ProfilePageRouter extends _$ProfilePageRouter {
   List<AutoRoute> get routes => [
 
     CustomRoute(page: ProfileEditPageRoute.page, path: RouterPath.profileEdit, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: SettingPageRoute.page, path: RouterPath.settings, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: ChangeMobilePageRoute.page, path: RouterPath.settingsChangeMobile, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: ResetPasswordPageRoute.page, path: RouterPath.settingsResetPassword, transitionsBuilder: applySlideTransition),
   ];
 }

+ 61 - 1
packages/cpt_profile/lib/router/page/profile_page_router.gr.dart

@@ -15,16 +15,48 @@ abstract class _$ProfilePageRouter extends RootStackRouter {
 
   @override
   final Map<String, PageFactory> pagesMap = {
+    ChangeMobilePageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const ChangeMobilePage(),
+      );
+    },
     ProfileEditPageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
         routeData: routeData,
         child: const ProfileEditPage(),
       );
-    }
+    },
+    ResetPasswordPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const ResetPasswordPage(),
+      );
+    },
+    SettingPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const SettingPage(),
+      );
+    },
   };
 }
 
 /// generated route for
+/// [ChangeMobilePage]
+class ChangeMobilePageRoute extends PageRouteInfo<void> {
+  const ChangeMobilePageRoute({List<PageRouteInfo>? children})
+      : super(
+          ChangeMobilePageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'ChangeMobilePageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
 /// [ProfileEditPage]
 class ProfileEditPageRoute extends PageRouteInfo<void> {
   const ProfileEditPageRoute({List<PageRouteInfo>? children})
@@ -37,3 +69,31 @@ class ProfileEditPageRoute extends PageRouteInfo<void> {
 
   static const PageInfo<void> page = PageInfo<void>(name);
 }
+
+/// generated route for
+/// [ResetPasswordPage]
+class ResetPasswordPageRoute extends PageRouteInfo<void> {
+  const ResetPasswordPageRoute({List<PageRouteInfo>? children})
+      : super(
+          ResetPasswordPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'ResetPasswordPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
+/// [SettingPage]
+class SettingPageRoute extends PageRouteInfo<void> {
+  const SettingPageRoute({List<PageRouteInfo>? children})
+      : super(
+          SettingPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'SettingPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}

BIN
packages/cs_resources/assets/base_service/dialog_delete_icon.webp


BIN
packages/cs_resources/assets/main/account_deactivation_img.webp


+ 1 - 0
packages/cs_resources/lib/generated/assets.dart

@@ -39,6 +39,7 @@ class Assets {
   static const String baseServiceTitleBarFilterIcon = 'assets/base_service/title_bar_filter_icon.webp';
   static const String baseServiceTriangleDropDown = 'assets/base_service/triangle_drop_down.webp';
   static const String baseServiceTriangleDropDownIcon = 'assets/base_service/triangle_drop_down_icon.webp';
+  static const String mainAccountDeactivationImg = 'assets/main/account_deactivation_img.webp';
   static const String propertyAdvicePic2x = 'assets/property/advice_pic@2x.png';
   static const String propertyApproval2x = 'assets/property/approval@2x.png';
   static const String propertyConveyancingLawyer2x = 'assets/property/conveyancing_lawyer@2x.png';

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

@@ -20,11 +20,20 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
 class MessageLookup extends MessageLookupByLibrary {
   String get localeName => 'en';
 
-  static String m0(name) => "Welcome ${name}";
+  static String m0(count) => "Followers(${count})";
+
+  static String m1(count) => "Following(${count})";
+
+  static String m2(name) => "Welcome ${name}";
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
+        "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
+            "Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request."),
+        "account_deactivation":
+            MessageLookupByLibrary.simpleMessage("Account Deactivation"),
         "agree_to": MessageLookupByLibrary.simpleMessage("Agree to"),
+        "alert": MessageLookupByLibrary.simpleMessage("Alert"),
         "block": MessageLookupByLibrary.simpleMessage("Block"),
         "block_desc": MessageLookupByLibrary.simpleMessage(
             "Block refers to the street number of the unit\'s official mailing address"),
@@ -32,6 +41,12 @@ class MessageLookup extends MessageLookupByLibrary {
             "123 Example Road #08-08 Country 123456"),
         "block_example_desc": MessageLookupByLibrary.simpleMessage(
             "123 is the block number #08-08 is the unit number"),
+        "cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
+        "change_mobile_phone":
+            MessageLookupByLibrary.simpleMessage("Change Mobile Phone"),
+        "confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
+        "confirm_new_password":
+            MessageLookupByLibrary.simpleMessage("Confirm New Password"),
         "confirm_password":
             MessageLookupByLibrary.simpleMessage("Confirm Password"),
         "create_new_yy_home_account":
@@ -39,12 +54,17 @@ class MessageLookup extends MessageLookupByLibrary {
         "did_not_receive":
             MessageLookupByLibrary.simpleMessage("Did Not Receive?"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
+        "enable_notification":
+            MessageLookupByLibrary.simpleMessage("Enable Notification"),
+        "estate": MessageLookupByLibrary.simpleMessage("Estate"),
         "estate_name_desc": MessageLookupByLibrary.simpleMessage(
             "Tell us the name of the estateor building you are applying to"),
         "estate_or_building_name":
             MessageLookupByLibrary.simpleMessage("Estate or Building Name?"),
         "facility": MessageLookupByLibrary.simpleMessage("Facility"),
         "first_name": MessageLookupByLibrary.simpleMessage("First Name"),
+        "followers": m0,
+        "following": m1,
         "forgot_password":
             MessageLookupByLibrary.simpleMessage("Forgot Password?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage(
@@ -53,12 +73,23 @@ class MessageLookup extends MessageLookupByLibrary {
         "get_code": MessageLookupByLibrary.simpleMessage("Get Code"),
         "get_started":
             MessageLookupByLibrary.simpleMessage("let\'s get started"),
+        "household": MessageLookupByLibrary.simpleMessage("Household"),
         "last_name": MessageLookupByLibrary.simpleMessage("Last Name"),
         "login": MessageLookupByLibrary.simpleMessage("Log In"),
+        "logout": MessageLookupByLibrary.simpleMessage("Logout"),
+        "logout_alert": MessageLookupByLibrary.simpleMessage(
+            "Are you sure you want to logout?"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("Mobile Phone"),
+        "my_post": MessageLookupByLibrary.simpleMessage("My Posts"),
+        "new_mobile_phone":
+            MessageLookupByLibrary.simpleMessage("New Mobile Phone"),
+        "new_password": MessageLookupByLibrary.simpleMessage("New Password"),
         "next": MessageLookupByLibrary.simpleMessage("Next"),
+        "no": MessageLookupByLibrary.simpleMessage("No"),
         "notice_board": MessageLookupByLibrary.simpleMessage("Notice Board"),
         "notification": MessageLookupByLibrary.simpleMessage("Notification"),
+        "old_mobile_phone":
+            MessageLookupByLibrary.simpleMessage("Old Mobile Phone"),
         "other": MessageLookupByLibrary.simpleMessage("Other"),
         "owner": MessageLookupByLibrary.simpleMessage("Owner"),
         "owner_or_tenant":
@@ -78,10 +109,14 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("8 Digits Alphanumeric"),
         "payment": MessageLookupByLibrary.simpleMessage("Payment"),
         "phone_email": MessageLookupByLibrary.simpleMessage("Phone/Email"),
+        "privacy_policy":
+            MessageLookupByLibrary.simpleMessage("Privacy Policy"),
+        "rate_us": MessageLookupByLibrary.simpleMessage("Rate Us"),
         "resend_code": MessageLookupByLibrary.simpleMessage("Resend Code"),
         "reset_password":
             MessageLookupByLibrary.simpleMessage("Reset Password"),
         "rewards": MessageLookupByLibrary.simpleMessage("Rewards"),
+        "settings": MessageLookupByLibrary.simpleMessage("Settings"),
         "sign_up_success_txt1": MessageLookupByLibrary.simpleMessage(
             "You have successfully created an YY Home account"),
         "sign_up_success_txt2": MessageLookupByLibrary.simpleMessage(
@@ -90,6 +125,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "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"),
+        "submit": MessageLookupByLibrary.simpleMessage("Submit"),
         "tenant": MessageLookupByLibrary.simpleMessage("Tenant"),
         "tenants_desc1": MessageLookupByLibrary.simpleMessage(
             "My name is in the lease agreement"),
@@ -99,6 +135,8 @@ class MessageLookup extends MessageLookupByLibrary {
             "I am the tenant of the company that rented the unit"),
         "tenants_desc4": MessageLookupByLibrary.simpleMessage(
             "The Management will verify your application accordingly"),
+        "terms_conditions":
+            MessageLookupByLibrary.simpleMessage("Terms & Conditions"),
         "terms_of_service":
             MessageLookupByLibrary.simpleMessage("Terms of Service"),
         "tries_left": MessageLookupByLibrary.simpleMessage("Tries Left"),
@@ -115,11 +153,13 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Upload Documents"),
         "verification_code":
             MessageLookupByLibrary.simpleMessage("Verification Code"),
-        "welcome_name": m0,
+        "version_no": MessageLookupByLibrary.simpleMessage("Version No."),
+        "welcome_name": m2,
         "who_are_owners":
             MessageLookupByLibrary.simpleMessage("Who are owners?"),
         "who_are_tenants":
             MessageLookupByLibrary.simpleMessage("Who are tenants?"),
+        "yes": MessageLookupByLibrary.simpleMessage("Yes"),
         "you_have": MessageLookupByLibrary.simpleMessage("You have"),
         "yy_home_accounts":
             MessageLookupByLibrary.simpleMessage("YY Home Accounts")

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

@@ -20,39 +20,63 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
 class MessageLookup extends MessageLookupByLibrary {
   String get localeName => 'zh_CN';
 
-  static String m0(name) => "欢迎你 ${name}";
+  static String m0(count) => "粉丝(${count})";
+
+  static String m1(count) => "关注(${count})";
+
+  static String m2(name) => "欢迎你 ${name}";
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
+        "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
+            "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。"),
+        "account_deactivation": MessageLookupByLibrary.simpleMessage("删除账号"),
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
+        "alert": MessageLookupByLibrary.simpleMessage("提示"),
         "block": MessageLookupByLibrary.simpleMessage("街区"),
         "block_desc": MessageLookupByLibrary.simpleMessage("街区是指单位官方邮编街道号"),
         "block_example":
             MessageLookupByLibrary.simpleMessage("123 示例路 #08-08 国家 123456"),
         "block_example_desc":
             MessageLookupByLibrary.simpleMessage("123 是街区地址邮编 #08-08 是单元号码"),
+        "cancel": MessageLookupByLibrary.simpleMessage("取消"),
+        "change_mobile_phone": MessageLookupByLibrary.simpleMessage("修改手机号码"),
+        "confirm": MessageLookupByLibrary.simpleMessage("确认"),
+        "confirm_new_password": MessageLookupByLibrary.simpleMessage("确认新密码"),
         "confirm_password": MessageLookupByLibrary.simpleMessage("确认密码"),
         "create_new_yy_home_account":
             MessageLookupByLibrary.simpleMessage("创建新的 YY Home 账户"),
         "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
+        "enable_notification": MessageLookupByLibrary.simpleMessage("允许通知"),
+        "estate": MessageLookupByLibrary.simpleMessage("房产"),
         "estate_name_desc":
             MessageLookupByLibrary.simpleMessage("告诉我们您申请的公寓楼的名称"),
         "estate_or_building_name":
             MessageLookupByLibrary.simpleMessage("房产或建筑名称?"),
         "facility": MessageLookupByLibrary.simpleMessage("设施"),
         "first_name": MessageLookupByLibrary.simpleMessage("名"),
+        "followers": m0,
+        "following": m1,
         "forgot_password": MessageLookupByLibrary.simpleMessage("忘记密码?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage("请输入您的邮箱和手机号码"),
         "form": MessageLookupByLibrary.simpleMessage("表单"),
         "get_code": MessageLookupByLibrary.simpleMessage("获取验证码"),
         "get_started": MessageLookupByLibrary.simpleMessage("让我们开始吧"),
+        "household": MessageLookupByLibrary.simpleMessage("家庭"),
         "last_name": MessageLookupByLibrary.simpleMessage("姓"),
         "login": MessageLookupByLibrary.simpleMessage("登录"),
+        "logout": MessageLookupByLibrary.simpleMessage("退出登录"),
+        "logout_alert": MessageLookupByLibrary.simpleMessage("你确定要退出登录吗?"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("手机号码"),
+        "my_post": MessageLookupByLibrary.simpleMessage("我的发布"),
+        "new_mobile_phone": MessageLookupByLibrary.simpleMessage("新的手机号码"),
+        "new_password": MessageLookupByLibrary.simpleMessage("新密码"),
         "next": MessageLookupByLibrary.simpleMessage("下一步"),
+        "no": MessageLookupByLibrary.simpleMessage("否"),
         "notice_board": MessageLookupByLibrary.simpleMessage("消息板"),
         "notification": MessageLookupByLibrary.simpleMessage("通知"),
+        "old_mobile_phone": MessageLookupByLibrary.simpleMessage("旧的手机号码"),
         "other": MessageLookupByLibrary.simpleMessage("其他"),
         "owner": MessageLookupByLibrary.simpleMessage("业主"),
         "owner_or_tenant": MessageLookupByLibrary.simpleMessage("您是业主还是租户?"),
@@ -66,9 +90,12 @@ class MessageLookup extends MessageLookupByLibrary {
         "password_format": MessageLookupByLibrary.simpleMessage("8位数字或字母"),
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
+        "privacy_policy": MessageLookupByLibrary.simpleMessage("隐私协议"),
+        "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "rewards": MessageLookupByLibrary.simpleMessage("奖励"),
+        "settings": MessageLookupByLibrary.simpleMessage("设置"),
         "sign_up_success_txt1":
             MessageLookupByLibrary.simpleMessage("您已成功创建 YYHome 的帐户"),
         "sign_up_success_txt2":
@@ -77,11 +104,13 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("现在,让我们把你和你的社区关联起来"),
         "sign_up_verify_txt":
             MessageLookupByLibrary.simpleMessage("我们已经向您发送了短信验证码,请在下面输入"),
+        "submit": MessageLookupByLibrary.simpleMessage("提交"),
         "tenant": MessageLookupByLibrary.simpleMessage("租户"),
         "tenants_desc1": MessageLookupByLibrary.simpleMessage("我的名字在租赁协议上"),
         "tenants_desc2": MessageLookupByLibrary.simpleMessage("我和指定的租户住在同一个家庭"),
         "tenants_desc3": MessageLookupByLibrary.simpleMessage("我是租用该单元的公司的租户"),
         "tenants_desc4": MessageLookupByLibrary.simpleMessage("管理员将相应地验证您的申请"),
+        "terms_conditions": MessageLookupByLibrary.simpleMessage("服务条款"),
         "terms_of_service": MessageLookupByLibrary.simpleMessage("服务条款"),
         "tries_left": MessageLookupByLibrary.simpleMessage("次尝试机会"),
         "type_here": MessageLookupByLibrary.simpleMessage("在此输入"),
@@ -95,9 +124,11 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("(2)租赁协议印花税收据"),
         "upload_documents": MessageLookupByLibrary.simpleMessage("上传文档"),
         "verification_code": MessageLookupByLibrary.simpleMessage("验证码"),
-        "welcome_name": m0,
+        "version_no": MessageLookupByLibrary.simpleMessage("版本号."),
+        "welcome_name": m2,
         "who_are_owners": MessageLookupByLibrary.simpleMessage("怎样才算业主?"),
         "who_are_tenants": MessageLookupByLibrary.simpleMessage("怎样才算租户?"),
+        "yes": MessageLookupByLibrary.simpleMessage("是"),
         "you_have": MessageLookupByLibrary.simpleMessage("你还有"),
         "yy_home_accounts": MessageLookupByLibrary.simpleMessage("YY Home 账户")
       };

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

@@ -20,47 +20,74 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
 class MessageLookup extends MessageLookupByLibrary {
   String get localeName => 'zh_HK';
 
-  static String m0(name) => "欢迎你 ${name}";
+  static String m0(count) => "粉丝(${count})";
+
+  static String m1(count) => "关注(${count})";
+
+  static String m2(name) => "欢迎你 ${name}";
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
+        "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
+            "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。"),
+        "account_deactivation": MessageLookupByLibrary.simpleMessage("删除账号"),
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
+        "alert": MessageLookupByLibrary.simpleMessage("提示"),
         "block": MessageLookupByLibrary.simpleMessage("街区"),
         "block_desc": MessageLookupByLibrary.simpleMessage("街区是指单位官方邮编街道号"),
         "block_example":
             MessageLookupByLibrary.simpleMessage("123 示例路 #08-08 国家 123456"),
         "block_example_desc":
             MessageLookupByLibrary.simpleMessage("123 是街区地址邮编 #08-08 是单元号码"),
+        "cancel": MessageLookupByLibrary.simpleMessage("取消"),
+        "change_mobile_phone": MessageLookupByLibrary.simpleMessage("修改手机号码"),
+        "confirm": MessageLookupByLibrary.simpleMessage("确认"),
+        "confirm_new_password": MessageLookupByLibrary.simpleMessage("确认新密码"),
         "confirm_password": MessageLookupByLibrary.simpleMessage("确认密码"),
         "create_new_yy_home_account":
             MessageLookupByLibrary.simpleMessage("创建新的 YY Home 账户"),
         "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
+        "enable_notification": MessageLookupByLibrary.simpleMessage("允许通知"),
+        "estate": MessageLookupByLibrary.simpleMessage("房产"),
         "estate_name_desc":
             MessageLookupByLibrary.simpleMessage("告诉我们您申请的公寓楼的名称"),
         "estate_or_building_name":
             MessageLookupByLibrary.simpleMessage("房产或建筑名称?"),
         "facility": MessageLookupByLibrary.simpleMessage("設施"),
         "first_name": MessageLookupByLibrary.simpleMessage("名"),
+        "followers": m0,
+        "following": m1,
         "forgot_password": MessageLookupByLibrary.simpleMessage("忘记密码?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage("请输入您的邮箱和手机号码"),
         "form": MessageLookupByLibrary.simpleMessage("表單"),
         "get_code": MessageLookupByLibrary.simpleMessage("获取验证码"),
         "get_started": MessageLookupByLibrary.simpleMessage("让我们开始吧"),
+        "household": MessageLookupByLibrary.simpleMessage("家庭"),
         "last_name": MessageLookupByLibrary.simpleMessage("姓"),
         "login": MessageLookupByLibrary.simpleMessage("登录"),
+        "logout": MessageLookupByLibrary.simpleMessage("退出登录"),
+        "logout_alert": MessageLookupByLibrary.simpleMessage("你确定要退出登录吗?"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("手机号码"),
+        "my_post": MessageLookupByLibrary.simpleMessage("我的发布"),
+        "new_mobile_phone": MessageLookupByLibrary.simpleMessage("新的手机号码"),
+        "new_password": MessageLookupByLibrary.simpleMessage("新密码"),
         "next": MessageLookupByLibrary.simpleMessage("下一步"),
+        "no": MessageLookupByLibrary.simpleMessage("否"),
         "notice_board": MessageLookupByLibrary.simpleMessage("通知板"),
         "notification": MessageLookupByLibrary.simpleMessage("通知"),
+        "old_mobile_phone": MessageLookupByLibrary.simpleMessage("旧的手机号码"),
         "other": MessageLookupByLibrary.simpleMessage("其他"),
         "password": MessageLookupByLibrary.simpleMessage("密码"),
         "password_format": MessageLookupByLibrary.simpleMessage("8位数字或字母"),
         "payment": MessageLookupByLibrary.simpleMessage("支付"),
         "phone_email": MessageLookupByLibrary.simpleMessage("电话或邮箱"),
+        "privacy_policy": MessageLookupByLibrary.simpleMessage("隐私协议"),
+        "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "rewards": MessageLookupByLibrary.simpleMessage("獎勵"),
+        "settings": MessageLookupByLibrary.simpleMessage("设置"),
         "sign_up_success_txt1":
             MessageLookupByLibrary.simpleMessage("您已成功创建 YYHome 的帐户"),
         "sign_up_success_txt2":
@@ -69,6 +96,8 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("现在,让我们把你和你的社区关联起来"),
         "sign_up_verify_txt":
             MessageLookupByLibrary.simpleMessage("我们已经向您发送了短信验证码,请在下面输入"),
+        "submit": MessageLookupByLibrary.simpleMessage("提交"),
+        "terms_conditions": MessageLookupByLibrary.simpleMessage("服务条款"),
         "terms_of_service": MessageLookupByLibrary.simpleMessage("服务条款"),
         "tries_left": MessageLookupByLibrary.simpleMessage("次尝试机会"),
         "type_here": MessageLookupByLibrary.simpleMessage("在此输入"),
@@ -82,7 +111,9 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("(2)租赁协议印花税收据"),
         "upload_documents": MessageLookupByLibrary.simpleMessage("上传文档"),
         "verification_code": MessageLookupByLibrary.simpleMessage("验证码"),
-        "welcome_name": m0,
+        "version_no": MessageLookupByLibrary.simpleMessage("版本号."),
+        "welcome_name": m2,
+        "yes": MessageLookupByLibrary.simpleMessage("是"),
         "you_have": MessageLookupByLibrary.simpleMessage("你还有"),
         "yy_home_accounts": MessageLookupByLibrary.simpleMessage("YY Home 账户")
       };

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

@@ -670,6 +670,266 @@ class S {
     );
   }
 
+  /// `Following({count})`
+  String following(Object count) {
+    return Intl.message(
+      'Following($count)',
+      name: 'following',
+      desc: '',
+      args: [count],
+    );
+  }
+
+  /// `Followers({count})`
+  String followers(Object count) {
+    return Intl.message(
+      'Followers($count)',
+      name: 'followers',
+      desc: '',
+      args: [count],
+    );
+  }
+
+  /// `My Posts`
+  String get my_post {
+    return Intl.message(
+      'My Posts',
+      name: 'my_post',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Household`
+  String get household {
+    return Intl.message(
+      'Household',
+      name: 'household',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Estate`
+  String get estate {
+    return Intl.message(
+      'Estate',
+      name: 'estate',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Settings`
+  String get settings {
+    return Intl.message(
+      'Settings',
+      name: 'settings',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Enable Notification`
+  String get enable_notification {
+    return Intl.message(
+      'Enable Notification',
+      name: 'enable_notification',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Change Mobile Phone`
+  String get change_mobile_phone {
+    return Intl.message(
+      'Change Mobile Phone',
+      name: 'change_mobile_phone',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Privacy Policy`
+  String get privacy_policy {
+    return Intl.message(
+      'Privacy Policy',
+      name: 'privacy_policy',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Terms & Conditions`
+  String get terms_conditions {
+    return Intl.message(
+      'Terms & Conditions',
+      name: 'terms_conditions',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Account Deactivation`
+  String get account_deactivation {
+    return Intl.message(
+      'Account Deactivation',
+      name: 'account_deactivation',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Rate Us`
+  String get rate_us {
+    return Intl.message(
+      'Rate Us',
+      name: 'rate_us',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Version No.`
+  String get version_no {
+    return Intl.message(
+      'Version No.',
+      name: 'version_no',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Logout`
+  String get logout {
+    return Intl.message(
+      'Logout',
+      name: 'logout',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Old Mobile Phone`
+  String get old_mobile_phone {
+    return Intl.message(
+      'Old Mobile Phone',
+      name: 'old_mobile_phone',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `New Mobile Phone`
+  String get new_mobile_phone {
+    return Intl.message(
+      'New Mobile Phone',
+      name: 'new_mobile_phone',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Submit`
+  String get submit {
+    return Intl.message(
+      'Submit',
+      name: 'submit',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `New Password`
+  String get new_password {
+    return Intl.message(
+      'New Password',
+      name: 'new_password',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Confirm New Password`
+  String get confirm_new_password {
+    return Intl.message(
+      'Confirm New Password',
+      name: 'confirm_new_password',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Cancel`
+  String get cancel {
+    return Intl.message(
+      'Cancel',
+      name: 'cancel',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Confirm`
+  String get confirm {
+    return Intl.message(
+      'Confirm',
+      name: 'confirm',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Yes`
+  String get yes {
+    return Intl.message(
+      'Yes',
+      name: 'yes',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `No`
+  String get no {
+    return Intl.message(
+      'No',
+      name: 'no',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Alert`
+  String get alert {
+    return Intl.message(
+      'Alert',
+      name: 'alert',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Are you sure you want to logout?`
+  String get logout_alert {
+    return Intl.message(
+      'Are you sure you want to logout?',
+      name: 'logout_alert',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.`
+  String get account_deactivate_alert {
+    return Intl.message(
+      'Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.',
+      name: 'account_deactivate_alert',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

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

@@ -61,5 +61,31 @@
   "upload_doc_desc1": "(1)A valid tenancy agreement showing your name,unit numper,tenancy expiration date and a list of occupants (if applicable)",
   "upload_doc_desc2": "(2)Tenancy Agreement Stamp Duty receipt",
   "upload": "Upload",
+  "following": "Following({count})",
+  "followers": "Followers({count})",
+  "my_post": "My Posts",
+  "household": "Household",
+  "estate": "Estate",
+  "settings": "Settings",
+  "enable_notification": "Enable Notification",
+  "change_mobile_phone": "Change Mobile Phone",
+  "privacy_policy": "Privacy Policy",
+  "terms_conditions": "Terms & Conditions",
+  "account_deactivation": "Account Deactivation",
+  "rate_us": "Rate Us",
+  "version_no": "Version No.",
+  "logout": "Logout",
+  "old_mobile_phone": "Old Mobile Phone",
+  "new_mobile_phone": "New Mobile Phone",
+  "submit": "Submit",
+  "new_password": "New Password",
+  "confirm_new_password": "Confirm New Password",
+  "cancel": "Cancel",
+  "confirm": "Confirm",
+  "yes": "Yes",
+  "no": "No",
+  "alert": "Alert",
+  "logout_alert": "Are you sure you want to logout?",
+  "account_deactivate_alert": "Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.",
   "other": "Other"
 }

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

@@ -61,5 +61,31 @@
   "upload_doc_desc1": "(1)一份有效的租赁协议,显示您的姓名、单位编号、租赁到期日期和居住者名单(如果适用)",
   "upload_doc_desc2": "(2)租赁协议印花税收据",
   "upload": "上传",
+  "following": "关注({count})",
+  "followers": "粉丝({count})",
+  "my_post": "我的发布",
+  "household": "家庭",
+  "estate": "房产",
+  "settings": "设置",
+  "enable_notification": "允许通知",
+  "change_mobile_phone": "修改手机号码",
+  "privacy_policy": "隐私协议",
+  "terms_conditions": "服务条款",
+  "account_deactivation": "删除账号",
+  "rate_us": "评价我们",
+  "version_no": "版本号.",
+  "logout": "退出登录",
+  "old_mobile_phone": "旧的手机号码",
+  "new_mobile_phone": "新的手机号码",
+  "submit": "提交",
+  "new_password": "新密码",
+  "confirm_new_password": "确认新密码",
+  "cancel": "取消",
+  "confirm": "确认",
+  "yes": "是",
+  "no": "否",
+  "alert": "提示",
+  "logout_alert": "你确定要退出登录吗?",
+  "account_deactivate_alert": "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。",
   "other": "其他"
 }

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

@@ -47,5 +47,31 @@
   "upload_doc_desc1": "(1)一份有效的租赁协议,显示您的姓名、单位编号、租赁到期日期和居住者名单(如果适用)",
   "upload_doc_desc2": "(2)租赁协议印花税收据",
   "upload": "上传",
+  "following": "关注({count})",
+  "followers": "粉丝({count})",
+  "my_post": "我的发布",
+  "household": "家庭",
+  "estate": "房产",
+  "settings": "设置",
+  "enable_notification": "允许通知",
+  "change_mobile_phone": "修改手机号码",
+  "privacy_policy": "隐私协议",
+  "terms_conditions": "服务条款",
+  "account_deactivation": "删除账号",
+  "rate_us": "评价我们",
+  "version_no": "版本号.",
+  "logout": "退出登录",
+  "old_mobile_phone": "旧的手机号码",
+  "new_mobile_phone": "新的手机号码",
+  "submit": "提交",
+  "new_password": "新密码",
+  "confirm_new_password": "确认新密码",
+  "cancel": "取消",
+  "confirm": "确认",
+  "yes": "是",
+  "no": "否",
+  "alert": "提示",
+  "logout_alert": "你确定要退出登录吗?",
+  "account_deactivate_alert": "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。",
   "other": "其他"
 }

+ 17 - 2
packages/cs_resources/lib/theme/app_colors_theme.dart

@@ -13,7 +13,6 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   //亮色主题的自定义颜色值
   static const _colorPrimary = Color(0xFF4161D0); //主题色
   static const _colorFCFCFC = Color(0xFFFCFCFC);
-  static const _color6C6C6C = Color(0xFF6C6C6C);
   static const _color666666 = Color(0xFF666666);
   static const _colorD7DBE7 = Color(0xffD7DBE7);
   static const _colorBDBDBD = Color(0xFFBDBDBD);
@@ -23,6 +22,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _color333333 = Color(0xFF333333);
   static const _colorF3F3F3 = Color(0xFFF3F3F3);
   static const _color999999 = Color(0xFF999999);
+  static const _colorF2F3F6 = Color(0xFFF2F3F6);
 
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -32,7 +32,8 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _darkBlackItemDivider = Color(0xFF3B3B3F);
 
   // 页面中真正使用到的颜色名称
-  final Color backgroundDefault; //页面背景颜色
+  final Color backgroundDefault; //页面背景颜色(偏白)
+  final Color backgroundDark; //页面背景颜色(蓝灰蓝)
   final Color btnBgDefault; //按钮背景颜色
   final Color searchFiledBorder; //搜索框的边框颜色
   final Color authFiledHint; //输入框默认的提示文本颜色
@@ -48,10 +49,13 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color tabTextUnSelectedPrimary; //Tab的未选中主题色文本
   final Color imgGrayBg; //灰色的图片底色背景
   final Color textDarkGray999; //文本深灰色
+  final Color whiteBG; //按钮的白色色背景
+  final Color whiteSecondBG; //按钮的白色色背景
 
   // 私有的构造函数
   const AppColorsTheme._internal({
     required this.backgroundDefault,
+    required this.backgroundDark,
     required this.btnBgDefault,
     required this.searchFiledBorder,
     required this.authFiledHint,
@@ -67,12 +71,15 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.tabTextUnSelectedPrimary,
     required this.imgGrayBg,
     required this.textDarkGray999,
+    required this.whiteBG,
+    required this.whiteSecondBG,
   });
 
   // 浅色主题工厂方法
   factory AppColorsTheme.light() {
     return const AppColorsTheme._internal(
       backgroundDefault: _colorFCFCFC,
+      backgroundDark: _colorF2F3F6,
       btnBgDefault: _colorPrimary,
       searchFiledBorder: _colorD7DBE7,
       authFiledHint: _colorBDBDBD,
@@ -88,6 +95,8 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextUnSelectedPrimary: _color333333,
       imgGrayBg: _colorF3F3F3,
       textDarkGray999: _color999999,
+      whiteBG: Colors.white,
+      whiteSecondBG: Colors.white,
     );
   }
 
@@ -95,6 +104,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   factory AppColorsTheme.dark() {
     return const AppColorsTheme._internal(
       backgroundDefault: _darkBlackBg,
+      backgroundDark: _darkBlackBg,
       btnBgDefault: _darkBlackItem,
       searchFiledBorder: _darkBlackItem,
       authFiledHint: _colorD7DBE7,
@@ -110,6 +120,8 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextUnSelectedPrimary: Colors.white,
       imgGrayBg: _darkBlackItem,
       textDarkGray999: Colors.white,
+      whiteBG: _darkBlackItem,
+      whiteSecondBG: _darkBlackItemLight,
     );
   }
 
@@ -126,6 +138,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     if (other is! AppColorsTheme) return this;
     return AppColorsTheme._internal(
       backgroundDefault: Color.lerp(backgroundDefault, other.backgroundDefault, t)!,
+      backgroundDark: Color.lerp(backgroundDark, other.backgroundDark, t)!,
       btnBgDefault: Color.lerp(btnBgDefault, other.btnBgDefault, t)!,
       searchFiledBorder: Color.lerp(searchFiledBorder, other.searchFiledBorder, t)!,
       authFiledHint: Color.lerp(authFiledHint, other.authFiledHint, t)!,
@@ -141,6 +154,8 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextUnSelectedPrimary: Color.lerp(tabTextUnSelectedPrimary, other.tabTextUnSelectedPrimary, t)!,
       imgGrayBg: Color.lerp(imgGrayBg, other.imgGrayBg, t)!,
       textDarkGray999: Color.lerp(textDarkGray999, other.textDarkGray999, t)!,
+      whiteBG: Color.lerp(whiteBG, other.whiteBG, t)!,
+      whiteSecondBG: Color.lerp(whiteSecondBG, other.whiteSecondBG, t)!,
     );
   }
 }

+ 1 - 0
packages/cs_resources/pubspec.yaml

@@ -29,6 +29,7 @@ flutter:
     - assets/base_service/
     - assets/property/
     - assets/auth/
+    - assets/main/
 
 
 flutter_intl:

+ 10 - 0
packages/cs_router/lib/componentRouter/profile_service.dart

@@ -8,4 +8,14 @@ abstract class ProfileService {
 
   void startEditProfilePage({BuildContext? context});
 
+  void startMyPostPage({BuildContext? context});
+
+  void startMyFollowPage({BuildContext? context});
+
+  void startMyHouseHoldPage({BuildContext? context});
+
+  void startMyEstatePage({BuildContext? context});
+
+  void startSettingPage({BuildContext? context});
+
 }

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

@@ -19,11 +19,17 @@ class RouterPath {
 
   //首页
   static const main = '/main';
-  static const settings = '/settings';
   static const notification = '/notification';
+  static const settings = '/settings';
+  static const settingsChangeMobile = '/settings/change/mobile';
+  static const settingsResetPassword = '/settings/reset/psd';
 
   //用户
   static const profileEdit = '/profile/edit';
+  static const profileEstate = '/profile/estate';
+  static const profileHousehold = '/profile/household';
+  static const profileMyFollow = '/profile/my/follow';
+  static const profileMyPost = '/profile/my/post';
 
   //社区
   static const community = '/community';

+ 83 - 50
packages/cs_widgets/lib/dialog/app_default_dialog.dart

@@ -1,28 +1,39 @@
+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:flutter_smart_dialog/flutter_smart_dialog.dart';
 import 'package:widgets/ext/ex_widget.dart';
-import 'package:cs_resources/constants/color_constants.dart';
+import 'package:widgets/my_load_image.dart';
 import '../my_text_view.dart';
-import '../no_shadow_scroll_behavior.dart';
 import 'dart:ui';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/widgets.dart';
 import 'package:widgets/widget_export.dart';
 
+import '../no_shadow_scroll_behavior.dart';
+
 /*
  * 默认的弹窗
  */
 class AppDefaultDialog extends StatelessWidget {
-  String title;
+  String? title;
+
   String message;
   VoidCallback confirmAction;
   VoidCallback? cancelAction;
+  bool isShowCancelBtn;
+  String? confirmTxt;
+  String? cancelTxt;
 
   AppDefaultDialog({
-    required this.title,
     required this.message,
     required this.confirmAction,
+    this.title,
     this.cancelAction,
+    this.isShowCancelBtn = true,
+    this.confirmTxt,
+    this.cancelTxt,
   });
 
   @override
@@ -35,29 +46,52 @@ class AppDefaultDialog extends StatelessWidget {
         //Title (如果使用 Container 为最外层容器则默认为 match_parent 的效果,除非我们限制宽度和最大高度最小高度)
         Container(
           width: double.infinity,
-          decoration: const BoxDecoration(
-            color: Colors.white,
-            borderRadius: BorderRadius.all(Radius.circular(15)),
+          height: 55,
+          decoration: BoxDecoration(
+            color: context.appColors.btnBgDefault,
+            borderRadius: const BorderRadius.only(
+              topRight: Radius.circular(15),
+              topLeft: Radius.circular(15),
+            ),
           ),
-          child: Column(
+          child: Row(
             children: [
+              const SizedBox(width: 45),
               MyTextView(
-                title,
-                fontSize: 19,
+                title ?? S.current.alert,
+                fontSize: 18,
+                textAlign: TextAlign.center,
                 isFontMedium: true,
-                textColor: ColorConstants.black,
-                marginTop: 15,
-                marginBottom: 15,
-              ),
+                textColor: Colors.white,
+              ).expanded(),
+              const MyAssetImage(Assets.baseServiceDialogDeleteIcon,width: 25,height: 25.5,).onTap((){
+                onCancel();
+              },padding: 10)
+            ],
 
+          ),
+        ),
+
+        Container(
+          width: double.infinity,
+          padding: const EdgeInsets.only(top: 30),
+          decoration: BoxDecoration(
+            color: context.appColors.whiteSecondBG,
+            borderRadius: const BorderRadius.only(
+              bottomLeft: Radius.circular(15),
+              bottomRight: Radius.circular(15),
+            ),
+          ),
+          child: Column(
+            children: [
               Scrollbar(
                 child: ScrollConfiguration(
                   behavior: NoShadowScrollBehavior(),
                   child: SingleChildScrollView(
                     child: MyTextView(
                       message,
-                      fontSize: 16,
-                      textColor: Colors.black,
+                      fontSize: 18,
+                      textColor: context.appColors.textBlack,
                       isFontRegular: true,
                       textAlign: TextAlign.center,
                       paddingLeft: 30,
@@ -66,35 +100,31 @@ class AppDefaultDialog extends StatelessWidget {
                   ),
                 ),
               ).constrained(maxHeight: 210),
-
-
-              Container(
-                margin: EdgeInsets.only(top: 25),
-                color: Color(0XFFCECECE),
-                height: 0.5,
-              ),
               Row(
                 children: [
-                  Expanded(
-                      flex: 1,
-                      child: InkWell(
-                        onTap: () {
-                          onCancel();
-                          cancelAction?.call();
-                        },
-                        child: MyTextView(
-                          "Cancel",
-                          fontSize: 17.5,
-                          isFontMedium: true,
-                          textAlign: TextAlign.center,
-                          textColor: Color(0XFF0085C4),
-                          cornerRadius: 3,
-                          borderWidth: 1,
-                        ),
-                      )),
-                  Container(
-                    color: Color(0xff09141F).withOpacity(0.13),
-                    width: 0.5,
+                  const SizedBox(width: 18),
+                  Visibility(
+                    visible: isShowCancelBtn,
+                    child: Expanded(
+                        flex: 1,
+                        child: InkWell(
+                          onTap: () {
+                            onCancel();
+                            cancelAction?.call();
+                          },
+                          child: MyTextView(
+                            cancelTxt ?? S.current.no,
+                            fontSize: 16,
+                            isFontMedium: true,
+                            paddingTop: 13,
+                            marginRight: 15,
+                            paddingBottom: 13,
+                            textAlign: TextAlign.center,
+                            textColor: Colors.white,
+                            backgroundColor: context.appColors.orangeBG,
+                            cornerRadius: 7,
+                          ),
+                        )),
                   ),
                   Expanded(
                       flex: 1,
@@ -104,22 +134,25 @@ class AppDefaultDialog extends StatelessWidget {
                           confirmAction();
                         },
                         child: MyTextView(
-                          "Confirm",
-                          marginLeft: 10,
-                          fontSize: 17.5,
+                          confirmTxt ?? S.current.yes,
+                          fontSize: 16,
+                          paddingTop: 13,
+                          paddingBottom: 13,
                           isFontMedium: true,
                           textAlign: TextAlign.center,
-                          textColor: Color(0XFF0085C4),
-                          cornerRadius: 3,
+                          textColor: Colors.white,
+                          backgroundColor: context.appColors.btnBgDefault,
+                          cornerRadius: 7,
                         ),
                       )),
+                  const SizedBox(width: 18),
                 ],
-              ).constrained(height: 46),
+              ).marginOnly(bottom: 30, top: 28),
             ],
           ),
         ),
       ],
-    ).constrained(width: 295);
+    ).constrained(width: 300);
   }
 
   //取消弹框

+ 0 - 2
packages/cs_widgets/lib/my_appbar.dart

@@ -3,10 +3,8 @@ import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 import 'package:flutter/widgets.dart';
-import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/constants/color_constants.dart';
 import 'package:router/ext/auto_router_extensions.dart';
-import 'package:widgets/ext/ex_widget.dart';
 import 'my_load_image.dart';
 import 'search_app_bar.dart';
 

+ 17 - 11
packages/cs_widgets/lib/shatter/setting_item_container.dart

@@ -1,5 +1,6 @@
 import 'package:cs_resources/constants/color_constants.dart';
 import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
@@ -9,10 +10,12 @@ import 'package:widgets/my_text_view.dart';
  * 设置页面的Item容器,左侧图标,中间文本,右侧箭头
  */
 class SettingItemContainer extends StatelessWidget {
-  final String iconPath;
+  final String? iconPath;
   final String title;
+  final bool isShowMoreIcon;
+  final Widget? rightWidget;
 
-  SettingItemContainer({required this.iconPath, required this.title});
+  SettingItemContainer({this.iconPath, this.isShowMoreIcon = true, required this.title, this.rightWidget});
 
   @override
   Widget build(BuildContext context) {
@@ -20,26 +23,29 @@ class SettingItemContainer extends StatelessWidget {
       width: double.infinity,
       height: 60,
       margin: const EdgeInsets.symmetric(vertical: 5, horizontal: 15),
-      padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 16.5),
+      padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 19),
       decoration: BoxDecoration(
-        color: const Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
-        borderRadius: BorderRadius.circular(5.0), // 设置圆角
+        color: context.appColors.whiteBG, // 设置背景颜色和不透明度
+        borderRadius: BorderRadius.circular(10.0), // 设置圆角
       ),
       child: Row(
         mainAxisSize: MainAxisSize.max,
         mainAxisAlignment: MainAxisAlignment.start,
         crossAxisAlignment: CrossAxisAlignment.center,
         children: [
-          MyAssetImage(iconPath, width: 30.2, height: 30.2),
+          iconPath == null ? const SizedBox() : MyAssetImage(iconPath!, width: 30.2, height: 30.2).marginOnly(right: 11),
           MyTextView(
             title,
-            isFontRegular: true,
-            fontSize: 14,
-            marginLeft: 11,
+            isFontMedium: true,
+            fontSize: 15,
             marginRight: 11,
-            textColor: ColorConstants.textGrayAECAE5,
+            textColor: context.appColors.textBlack,
           ).expanded(),
-          const MyAssetImage(Assets.baseLibItemMoreIcon, width: 7.5, height: 13.5),
+          isShowMoreIcon
+              ? rightWidget == null
+                  ?  const MyAssetImage(Assets.baseLibItemMoreIcon, width: 7.5, height: 13.5, color: Color(0XFF28394A))
+                  : rightWidget!
+              :  const SizedBox(),
         ],
       ),
     );