Browse Source

编辑用户信息与头像编辑弹窗

liukai 1 week ago
parent
commit
49fc1baad1
37 changed files with 770 additions and 29 deletions
  1. 3 3
      packages/cpt_main/lib/modules/me/me_view_model.dart
  2. 32 0
      packages/cpt_profile/lib/modules/my_estate/my_estate_page.dart
  3. 3 0
      packages/cpt_profile/lib/modules/my_estate/my_estate_state.dart
  4. 13 0
      packages/cpt_profile/lib/modules/my_estate/my_estate_view_model.dart
  5. 26 0
      packages/cpt_profile/lib/modules/my_estate/my_estate_view_model.g.dart
  6. 32 0
      packages/cpt_profile/lib/modules/my_household/my_household_page.dart
  7. 3 0
      packages/cpt_profile/lib/modules/my_household/my_household_state.dart
  8. 13 0
      packages/cpt_profile/lib/modules/my_household/my_household_view_model.dart
  9. 27 0
      packages/cpt_profile/lib/modules/my_household/my_household_view_model.g.dart
  10. 210 4
      packages/cpt_profile/lib/modules/profile_edit/Profile_edit_page.dart
  11. 133 0
      packages/cpt_profile/lib/modules/profile_edit/dialog/avatar_edit_dialog.dart
  12. 49 0
      packages/cpt_profile/lib/modules/profile_edit/profile_edit_state.dart
  13. 56 3
      packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.dart
  14. 4 4
      packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.g.dart
  15. 1 1
      packages/cpt_profile/lib/modules/reset_password/reset_password_view_model.g.dart
  16. 1 1
      packages/cpt_profile/lib/modules/setting/setting_view_model.g.dart
  17. 8 8
      packages/cpt_profile/lib/router/component/profile_component_service_impl.dart
  18. 4 0
      packages/cpt_profile/lib/router/page/profile_page_router.dart
  19. 40 0
      packages/cpt_profile/lib/router/page/profile_page_router.gr.dart
  20. 2 1
      packages/cs_plugin_platform/lib/platform_export.dart
  21. BIN
      packages/cs_resources/assets/profile/edit_dialog_delete.webp
  22. BIN
      packages/cs_resources/assets/profile/edit_dialog_upload.webp
  23. BIN
      packages/cs_resources/assets/profile/edit_profile_add.webp
  24. BIN
      packages/cs_resources/assets/profile/edit_profile_avatar_bottom.webp
  25. BIN
      packages/cs_resources/assets/profile/edit_profile_avatar_default.webp
  26. BIN
      packages/cs_resources/assets/profile/edit_xu_line.webp
  27. 6 0
      packages/cs_resources/lib/generated/assets.dart
  28. 7 0
      packages/cs_resources/lib/generated/intl/messages_en.dart
  29. 6 0
      packages/cs_resources/lib/generated/intl/messages_zh_CN.dart
  30. 6 0
      packages/cs_resources/lib/generated/intl/messages_zh_HK.dart
  31. 60 0
      packages/cs_resources/lib/generated/l10n.dart
  32. 6 0
      packages/cs_resources/lib/l10n/intl_en.arb
  33. 6 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  34. 6 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  35. 6 0
      packages/cs_resources/lib/theme/app_colors_theme.dart
  36. 1 0
      packages/cs_resources/pubspec.yaml
  37. 0 4
      packages/cs_router/lib/componentRouter/profile_service.dart

+ 3 - 3
packages/cpt_main/lib/modules/me/me_view_model.dart

@@ -11,12 +11,12 @@ class MeViewModel extends _$MeViewModel {
 
 
   //去我的房产页面
   //去我的房产页面
   void gotoMyEstatePage() {
   void gotoMyEstatePage() {
-    ToastEngine.show("去我的房产页面");
+    ComponentServiceManager().profileService.startMyEstatePage();
   }
   }
 
 
   //去我的家庭成员页面
   //去我的家庭成员页面
   void gotoMyHouseholdPage() {
   void gotoMyHouseholdPage() {
-    ToastEngine.show("去我的家庭成员页面");
+    ComponentServiceManager().profileService.startMyHouseHoldPage();
   }
   }
 
 
   //去我的发布页面
   //去我的发布页面
@@ -41,6 +41,6 @@ class MeViewModel extends _$MeViewModel {
 
 
   //编辑附加信息
   //编辑附加信息
   void gotoEditProfilePage() {
   void gotoEditProfilePage() {
-    ToastEngine.show("编辑附加信息");
+    ComponentServiceManager().profileService.startEditProfilePage();
   }
   }
 }
 }

+ 32 - 0
packages/cpt_profile/lib/modules/my_estate/my_estate_page.dart

@@ -0,0 +1,32 @@
+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 '../../router/page/profile_page_router.dart';
+import 'my_estate_view_model.dart';
+
+@RoutePage()
+class MyEstatePage extends HookConsumerWidget {
+  const MyEstatePage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const MyEstatePageRoute());
+    } else {
+      appRouter.push(const MyEstatePageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(myEstateViewModelProvider.notifier);
+
+    return Scaffold(
+      appBar: AppBar(title: Text("Profile Edit Page")),
+      body: Center(
+        child: Text("Profile Edit Page"),
+      ),
+    );
+  }
+}

+ 3 - 0
packages/cpt_profile/lib/modules/my_estate/my_estate_state.dart

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

+ 13 - 0
packages/cpt_profile/lib/modules/my_estate/my_estate_view_model.dart

@@ -0,0 +1,13 @@
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+
+import 'my_estate_state.dart';
+
+part 'my_estate_view_model.g.dart';
+
+@riverpod
+class MyEstateViewModel extends _$MyEstateViewModel {
+  @override
+  MyEstateState build() {
+    return MyEstateState();
+  }
+}

+ 26 - 0
packages/cpt_profile/lib/modules/my_estate/my_estate_view_model.g.dart

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

+ 32 - 0
packages/cpt_profile/lib/modules/my_household/my_household_page.dart

@@ -0,0 +1,32 @@
+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 '../../router/page/profile_page_router.dart';
+import 'my_household_view_model.dart';
+
+@RoutePage()
+class MyHouseholdPage extends HookConsumerWidget {
+  const MyHouseholdPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const MyHouseholdPageRoute());
+    } else {
+      appRouter.push(const MyHouseholdPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(myHouseholdViewModelProvider.notifier);
+
+    return Scaffold(
+      appBar: AppBar(title: Text("Profile Edit Page")),
+      body: Center(
+        child: Text("Profile Edit Page"),
+      ),
+    );
+  }
+}

+ 3 - 0
packages/cpt_profile/lib/modules/my_household/my_household_state.dart

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

+ 13 - 0
packages/cpt_profile/lib/modules/my_household/my_household_view_model.dart

@@ -0,0 +1,13 @@
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+
+import 'my_household_state.dart';
+
+part 'my_household_view_model.g.dart';
+
+@riverpod
+class MyHouseholdViewModel extends _$MyHouseholdViewModel {
+  @override
+  MyHouseholdState build() {
+    return MyHouseholdState();
+  }
+}

+ 27 - 0
packages/cpt_profile/lib/modules/my_household/my_household_view_model.g.dart

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

+ 210 - 4
packages/cpt_profile/lib/modules/profile_edit/Profile_edit_page.dart

@@ -1,9 +1,20 @@
+import 'package:cpt_profile/modules/profile_edit/profile_edit_state.dart';
 import 'package:cpt_profile/modules/profile_edit/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:cpt_profile/router/page/profile_page_router.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:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_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';
 
 
 @RoutePage()
 @RoutePage()
 class ProfileEditPage extends HookConsumerWidget {
 class ProfileEditPage extends HookConsumerWidget {
@@ -20,12 +31,207 @@ class ProfileEditPage extends HookConsumerWidget {
 
 
   @override
   @override
   Widget build(BuildContext context, WidgetRef ref) {
   Widget build(BuildContext context, WidgetRef ref) {
-    final _viewModel = ref.watch(profileEditViewModelProvider.notifier);
+    final viewModel = ref.watch(profileEditViewModelProvider.notifier);
+    final state = ref.watch(profileEditViewModelProvider);
 
 
     return Scaffold(
     return Scaffold(
-      appBar: AppBar(title: Text("Profile Edit Page")),
-      body: Center(
-        child: Text("Profile Edit Page"),
+      appBar: MyAppBar.appBar(context, S.current.edit_profile,backgroundColor: context.appColors.whiteBG),
+      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: [
+              Center(
+                child: Container(
+                  width: 80,
+                  height: 80,
+                  decoration: BoxDecoration(color: context.appColors.avatarBg, shape: BoxShape.circle),
+                  child: Stack(
+                    children: [
+                      //默认的占位图
+                      Visibility(
+                        visible: true,
+                        child: const Align(
+                          alignment: Alignment.bottomCenter,
+                          child: MyAssetImage(
+                            Assets.profileEditProfileAvatarDefault,
+                            width: 49,
+                            height: 64,
+                          ),
+                        ),
+                      ),
+
+                      //用户的头像
+                      Visibility(
+                        visible: false,
+                        child: MyLoadImage(
+                          "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
+                          width: 80,
+                          height: 80,
+                          isCircle: true,
+                        ),
+                      ),
+
+                      //底部的背景色
+                      const Align(
+                        alignment: Alignment.bottomCenter,
+                        child: MyAssetImage(
+                          Assets.profileEditProfileAvatarBottom,
+                          width: 71,
+                          height: 21.5,
+                        ),
+                      ),
+                      //照相机Icon
+                      const Align(
+                        alignment: Alignment.bottomCenter,
+                        child: MyAssetImage(
+                          Assets.profileEditProfileAdd,
+                          width: 12,
+                          height: 11.5,
+                        ),
+                      ).marginOnly(bottom: 4),
+                    ],
+                  ),
+                ).onTap((){
+                  viewModel.showAvatarEditDialog(context);
+                }),
+              ).marginOnly(top: 23),
+
+              // 表单 - 名
+              MyTextView(
+                S.current.first_name,
+                fontSize: 17,
+                marginTop: 33,
+                marginBottom: 16,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+              //表单
+              _buildInputLayout(
+                context,
+                state,
+                "first_name",
+                textInputType: TextInputType.text,
+                textInputAction: TextInputAction.next,
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['last_name']!['focusNode']);
+                },
+              ),
+
+              // 表单 - 姓
+              MyTextView(
+                S.current.last_name,
+                fontSize: 17,
+                marginTop: 15,
+                marginBottom: 16,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+              //表单
+              _buildInputLayout(
+                context,
+                state,
+                "last_name",
+                textInputType: TextInputType.text,
+                textInputAction: TextInputAction.next,
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['email']!['focusNode']);
+                },
+              ),
+
+              // 表单 - 邮箱
+              MyTextView(
+                S.current.email,
+                fontSize: 17,
+                marginTop: 15,
+                marginBottom: 16,
+                isFontMedium: true,
+                textColor: context.appColors.textBlack,
+              ),
+              //表单
+              _buildInputLayout(
+                context,
+                state,
+                "email",
+                textInputType: TextInputType.emailAddress,
+                textInputAction: TextInputAction.next,
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                },
+              ),
+
+              //提交
+              MyButton(
+                onPressed: viewModel.submitEdit,
+                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: 50),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  /// 输入框
+  Widget _buildInputLayout(
+    BuildContext context,
+    ProfileEditState 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: 16.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: 16.0,
+          fontWeight: FontWeight.w500,
+        ),
+        inputType: textInputType,
+        textInputAction: textInputAction,
+        onSubmit: onSubmit,
+        cursorColor: context.appColors.authFiledText,
+        obscureText: obscureText,
+        errorText: errorText,
+        showLeftIcon: true,
+        showRightIcon: showRightIcon,
+        rightWidget: rightWidget,
       ),
       ),
     );
     );
   }
   }

+ 133 - 0
packages/cpt_profile/lib/modules/profile_edit/dialog/avatar_edit_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:plugin_platform/engine/toast/toast_engine.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 AvatarEditDialog extends StatelessWidget {
+  void Function(String path) otherAction;
+  void Function() photoAction;
+
+  final List<String> otherImages = [
+    "https://pic.rmb.bdstatic.com/bjh/bc3fcc5fadee3ab70dc6f941ae3eb4a21534.jpeg@h_1280",
+    "https://img0.baidu.com/it/u=3885044482,1194334042&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
+    "https://q0.itc.cn/q_70/images03/20240508/64f00aea4daa4b808e59fdadb939ff41.jpeg",
+    "https://ww3.sinaimg.cn/mw690/d315af46ly1h7wfnspdomj20u00u0tef.jpg",
+    "https://ww2.sinaimg.cn/mw690/006A8Z5cly1hrhndmtmuaj30he0htq55.jpg",
+    "https://ww1.sinaimg.cn/mw690/d315af46ly1h7wfnuxn91j20j60j60uk.jpg",
+    "https://img0.baidu.com/it/u=80291486,3068765574&fm=253&fmt=auto&app=138&f=JPEG?w=380&h=380",
+    "https://img0.baidu.com/it/u=528233043,1559727912&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500",
+    "https://img0.baidu.com/it/u=691481429,1364097496&fm=253&fmt=auto?w=500&h=500"
+  ];
+
+  AvatarEditDialog({
+    required this.photoAction,
+    required this.otherAction,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.center,
+      mainAxisAlignment: MainAxisAlignment.center,
+      children: [
+        Container(
+          width: double.infinity,
+          padding: const EdgeInsets.only(top: 31.5, bottom: 30.5, left: 27.5, right: 27.5),
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
+            borderRadius: const BorderRadius.all(Radius.circular(15)),
+          ),
+          child: Column(
+            mainAxisSize: MainAxisSize.min,
+            children: [
+              Container(
+                width: double.infinity,
+                height: 50,
+                decoration: const BoxDecoration(
+                  color: Color(0XFFE9ECF8),
+                  borderRadius: BorderRadius.all(Radius.circular(5)),
+                ),
+                child: Row(
+                  mainAxisSize: MainAxisSize.max,
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    const MyAssetImage(
+                      Assets.profileEditDialogUpload,
+                      width: 27.5,
+                      height: 27.5,
+                    ),
+                    MyTextView(
+                      S.current.upload_a_photo, 
+                      fontSize: 16,
+                      isFontMedium: true,
+                      textColor: context.appColors.textBlack,
+                      marginLeft: 12,
+                    ),
+                  ],
+                ).onTap((){
+                  onCancel();
+                  photoAction.call();
+                }),
+              ),
+
+              //分割线
+              Stack(
+                children: [
+                  const MyAssetImage(Assets.profileEditXuLine, width: 270, height: 1).marginOnly(top: 10),
+                  Align(
+                    alignment: Alignment.center,
+                    child: MyTextView(
+                      S.current.or,
+                      textColor: context.appColors.textDarkGray,
+                      fontSize: 16,
+                      isFontMedium: true,
+                    ),
+                  ),
+                ],
+              ).marginOnly(top: 26, bottom: 6),
+
+              //图片九宫格
+              GridView.builder(
+                shrinkWrap: true,
+                physics: const NeverScrollableScrollPhysics(),
+                gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
+                  crossAxisCount: 3, // 每行显示的列数
+                  mainAxisSpacing: 20.0, // 主轴(上下)的间距
+                  crossAxisSpacing: 15.0, // 交叉轴(左右)的间距
+                  childAspectRatio: 1, // 宽高比例
+                ),
+                itemCount: otherImages.length,
+                itemBuilder: (context, index) {
+                  return Center(
+                    child: MyLoadImage(otherImages[index]).onTap((){
+                      onCancel();
+                      otherAction.call(otherImages[index]);
+                    }),
+                  );
+                },
+              ),
+            ],
+          ),
+        ),
+        const MyAssetImage(
+          Assets.profileEditDialogDelete,
+          width: 25,
+          height: 25.5,
+        ).onTap(() {
+          onCancel();
+        }).marginOnly(top: 23.5),
+      ],
+    ).constrained(width: 325);
+  }
+
+//取消弹框
+  void onCancel() async {
+    SmartDialog.dismiss();
+  }
+}

+ 49 - 0
packages/cpt_profile/lib/modules/profile_edit/profile_edit_state.dart

@@ -0,0 +1,49 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:flutter/material.dart';
+
+class ProfileEditState{
+  //表单的校验与数据
+  final Map<String, Map<String, dynamic>> formData;
+
+  String? avatarPath;  //头像的路径或Uri
+
+  // ===================================  Begin  ↓  ===================================
+
+  ProfileEditState({
+    Map<String, Map<String, dynamic>>? formData,
+    this.avatarPath,
+  }) : formData = formData ??
+      {
+        'first_name': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.first_name,
+          'focusNode': FocusNode(),
+          'obsecure': false,
+        },
+        'last_name': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.last_name,
+          'focusNode': FocusNode(),
+          'obsecure': false,
+        },
+        'email': {
+          'value': '',
+          'controller': TextEditingController(),
+          'hintText': S.current.email,
+          'focusNode': FocusNode(),
+          'obsecure': false,
+        },
+      };
+
+  ProfileEditState copyWith({
+    String? avatarPath,
+  }) {
+    return ProfileEditState(
+      formData: this.formData,
+      avatarPath: avatarPath ?? this.avatarPath,
+    );
+  }
+
+}

+ 56 - 3
packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.dart

@@ -1,13 +1,66 @@
-
+import 'package:cpt_profile/modules/profile_edit/dialog/avatar_edit_dialog.dart';
+import 'package:flutter/material.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:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'profile_edit_state.dart';
+import 'package:plugin_platform/platform_export.dart';
+
 part 'profile_edit_view_model.g.dart';
 part 'profile_edit_view_model.g.dart';
 
 
 @riverpod
 @riverpod
 class ProfileEditViewModel extends _$ProfileEditViewModel {
 class ProfileEditViewModel extends _$ProfileEditViewModel {
-
   @override
   @override
-  void build(){
+  ProfileEditState build() {
+    return ProfileEditState();
+  }
+
+  /// 提交编辑用户信息
+  void submitEdit() {
+    final FocusNode firstNameFocusNode = state.formData['first_name']!['focusNode'];
+    final FocusNode lastNameFocusNode = state.formData['last_name']!['focusNode'];
+    final FocusNode emailFocusNode = state.formData['email']!['focusNode'];
+
+    firstNameFocusNode.unfocus();
+    lastNameFocusNode.unfocus();
+    emailFocusNode.unfocus();
+
+    final TextEditingController firstNameController = state.formData['first_name']!['controller'];
+    final TextEditingController lastNameController = state.formData['last_name']!['controller'];
+    final TextEditingController emailController = state.formData['email']!['controller'];
 
 
+    final firstName = firstNameController.text;
+    final lastName = lastNameController.text;
+    final email = emailController.text;
+
+    Log.d('当前待提交的 firstName:$firstName lastName:$lastName email:$email');
+
+    //执行密码登录
+    ToastEngine.show('准备执行请求发送验证码 firstName:$firstName lastName:$lastName email:$email ');
+
+    appRouter.maybePop();
   }
   }
 
 
+  //去编辑头像页面
+  void showAvatarEditDialog(BuildContext context) {
+    DialogEngine.show(
+        widget: AvatarEditDialog(
+      otherAction: (path) {
+        ToastEngine.show("点击了图片:$path");
+      },
+      photoAction: () {
+        //选择相机相册
+        _pickPhoto(context);
+      },
+    ));
+  }
+
+  //相机相册选择
+  void _pickPhoto(BuildContext context) {
+    ImagePickerUtils().show(context, (path) {
+      ToastEngine.show("选中了图片:$path");
+    });
+  }
 }
 }

+ 4 - 4
packages/cpt_profile/lib/modules/profile_edit/profile_edit_view_model.g.dart

@@ -7,12 +7,12 @@ part of 'profile_edit_view_model.dart';
 // **************************************************************************
 // **************************************************************************
 
 
 String _$profileEditViewModelHash() =>
 String _$profileEditViewModelHash() =>
-    r'acfbe7986503c631d7107a9309c85e768b1067f2';
+    r'077ce4db8df95158eed8dfb5a207c1f472271d13';
 
 
 /// See also [ProfileEditViewModel].
 /// See also [ProfileEditViewModel].
 @ProviderFor(ProfileEditViewModel)
 @ProviderFor(ProfileEditViewModel)
-final profileEditViewModelProvider =
-    AutoDisposeNotifierProvider<ProfileEditViewModel, void>.internal(
+final profileEditViewModelProvider = AutoDisposeNotifierProvider<
+    ProfileEditViewModel, ProfileEditState>.internal(
   ProfileEditViewModel.new,
   ProfileEditViewModel.new,
   name: r'profileEditViewModelProvider',
   name: r'profileEditViewModelProvider',
   debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
   debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
@@ -22,6 +22,6 @@ final profileEditViewModelProvider =
   allTransitiveDependencies: null,
   allTransitiveDependencies: null,
 );
 );
 
 
-typedef _$ProfileEditViewModel = AutoDisposeNotifier<void>;
+typedef _$ProfileEditViewModel = AutoDisposeNotifier<ProfileEditState>;
 // ignore_for_file: type=lint
 // 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
 // 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/reset_password/reset_password_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'reset_password_view_model.dart';
 // **************************************************************************
 // **************************************************************************
 
 
 String _$resetPasswordViewModelHash() =>
 String _$resetPasswordViewModelHash() =>
-    r'4b6b7ea5f180d679389a10da92758d39ea9f86e3';
+    r'909d66fe8a4977520cc6d2d5d0607e3d979a74b4';
 
 
 /// See also [ResetPasswordViewModel].
 /// See also [ResetPasswordViewModel].
 @ProviderFor(ResetPasswordViewModel)
 @ProviderFor(ResetPasswordViewModel)

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

@@ -6,7 +6,7 @@ part of 'setting_view_model.dart';
 // RiverpodGenerator
 // RiverpodGenerator
 // **************************************************************************
 // **************************************************************************
 
 
-String _$settingViewModelHash() => r'e008ce2120bd069243f13ad1502eba8992950a63';
+String _$settingViewModelHash() => r'14220f4fbd357cfd7f80abccc4db5ec17814c539';
 
 
 /// See also [SettingViewModel].
 /// See also [SettingViewModel].
 @ProviderFor(SettingViewModel)
 @ProviderFor(SettingViewModel)

+ 8 - 8
packages/cpt_profile/lib/router/component/profile_component_service_impl.dart

@@ -1,6 +1,8 @@
 /*
 /*
  * Profile 组件的组件路由
  * Profile 组件的组件路由
  */
  */
+import 'package:cpt_profile/modules/my_estate/my_estate_page.dart';
+import 'package:cpt_profile/modules/my_household/my_household_page.dart';
 import 'package:cpt_profile/modules/setting/setting_page.dart';
 import 'package:cpt_profile/modules/setting/setting_page.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:router/componentRouter/profile_service.dart';
 import 'package:router/componentRouter/profile_service.dart';
@@ -14,16 +16,14 @@ class ProfileComponentServiceImpl extends ProfileService {
   }
   }
 
 
   @override
   @override
-  void startMyEstatePage({BuildContext? context}) {}
-
-  @override
-  void startMyFollowPage({BuildContext? context}) {}
-
-  @override
-  void startMyHouseHoldPage({BuildContext? context}) {}
+  void startMyEstatePage({BuildContext? context}) {
+    MyEstatePage.startInstance(context: context);
+  }
 
 
   @override
   @override
-  void startMyPostPage({BuildContext? context}) {}
+  void startMyHouseHoldPage({BuildContext? context}) {
+    MyHouseholdPage.startInstance(context: context);
+  }
 
 
   @override
   @override
   void startSettingPage({BuildContext? context}) {
   void startSettingPage({BuildContext? context}) {

+ 4 - 0
packages/cpt_profile/lib/router/page/profile_page_router.dart

@@ -7,6 +7,8 @@ import '../../modules/profile_edit/Profile_edit_page.dart';
 import '../../modules/setting/setting_page.dart';
 import '../../modules/setting/setting_page.dart';
 import '../../modules/change_mobile/change_mobile_page.dart';
 import '../../modules/change_mobile/change_mobile_page.dart';
 import '../../modules/reset_password/reset_password_page.dart';
 import '../../modules/reset_password/reset_password_page.dart';
+import '../../modules/my_estate/my_estate_page.dart';
+import '../../modules/my_household/my_household_page.dart';
 
 
 
 
 part 'profile_page_router.gr.dart';
 part 'profile_page_router.gr.dart';
@@ -23,5 +25,7 @@ class ProfilePageRouter extends _$ProfilePageRouter {
     CustomRoute(page: SettingPageRoute.page, path: RouterPath.settings, transitionsBuilder: applySlideTransition),
     CustomRoute(page: SettingPageRoute.page, path: RouterPath.settings, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ChangeMobilePageRoute.page, path: RouterPath.settingsChangeMobile, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ChangeMobilePageRoute.page, path: RouterPath.settingsChangeMobile, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ResetPasswordPageRoute.page, path: RouterPath.settingsResetPassword, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ResetPasswordPageRoute.page, path: RouterPath.settingsResetPassword, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: MyEstatePageRoute.page, path: RouterPath.profileEstate, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: MyHouseholdPageRoute.page, path: RouterPath.profileHousehold, transitionsBuilder: applySlideTransition),
   ];
   ];
 }
 }

+ 40 - 0
packages/cpt_profile/lib/router/page/profile_page_router.gr.dart

@@ -21,6 +21,18 @@ abstract class _$ProfilePageRouter extends RootStackRouter {
         child: const ChangeMobilePage(),
         child: const ChangeMobilePage(),
       );
       );
     },
     },
+    MyEstatePageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const MyEstatePage(),
+      );
+    },
+    MyHouseholdPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const MyHouseholdPage(),
+      );
+    },
     ProfileEditPageRoute.name: (routeData) {
     ProfileEditPageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
       return AutoRoutePage<dynamic>(
         routeData: routeData,
         routeData: routeData,
@@ -57,6 +69,34 @@ class ChangeMobilePageRoute extends PageRouteInfo<void> {
 }
 }
 
 
 /// generated route for
 /// generated route for
+/// [MyEstatePage]
+class MyEstatePageRoute extends PageRouteInfo<void> {
+  const MyEstatePageRoute({List<PageRouteInfo>? children})
+      : super(
+          MyEstatePageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'MyEstatePageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
+/// [MyHouseholdPage]
+class MyHouseholdPageRoute extends PageRouteInfo<void> {
+  const MyHouseholdPageRoute({List<PageRouteInfo>? children})
+      : super(
+          MyHouseholdPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'MyHouseholdPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
 /// [ProfileEditPage]
 /// [ProfileEditPage]
 class ProfileEditPageRoute extends PageRouteInfo<void> {
 class ProfileEditPageRoute extends PageRouteInfo<void> {
   const ProfileEditPageRoute({List<PageRouteInfo>? children})
   const ProfileEditPageRoute({List<PageRouteInfo>? children})

+ 2 - 1
packages/cs_plugin_platform/lib/platform_export.dart

@@ -1,3 +1,4 @@
 export 'package:dio/dio.dart';
 export 'package:dio/dio.dart';
 export 'package:permission_handler/permission_handler.dart';
 export 'package:permission_handler/permission_handler.dart';
-export 'engine/image/image_nine_grid.dart';
+export 'engine/image/image_nine_grid.dart';
+export 'engine/media/image_picker_utils.dart';

BIN
packages/cs_resources/assets/profile/edit_dialog_delete.webp


BIN
packages/cs_resources/assets/profile/edit_dialog_upload.webp


BIN
packages/cs_resources/assets/profile/edit_profile_add.webp


BIN
packages/cs_resources/assets/profile/edit_profile_avatar_bottom.webp


BIN
packages/cs_resources/assets/profile/edit_profile_avatar_default.webp


BIN
packages/cs_resources/assets/profile/edit_xu_line.webp


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

@@ -99,6 +99,12 @@ class Assets {
   static const String noticeBoardAnnouncementIcon = 'assets/notice_board/announcement_icon.png';
   static const String noticeBoardAnnouncementIcon = 'assets/notice_board/announcement_icon.png';
   static const String noticeBoardDocumentsIcon = 'assets/notice_board/documents_icon.png';
   static const String noticeBoardDocumentsIcon = 'assets/notice_board/documents_icon.png';
   static const String noticeBoardEventIcon = 'assets/notice_board/event_icon.png';
   static const String noticeBoardEventIcon = 'assets/notice_board/event_icon.png';
+  static const String profileEditDialogDelete = 'assets/profile/edit_dialog_delete.webp';
+  static const String profileEditDialogUpload = 'assets/profile/edit_dialog_upload.webp';
+  static const String profileEditProfileAdd = 'assets/profile/edit_profile_add.webp';
+  static const String profileEditProfileAvatarBottom = 'assets/profile/edit_profile_avatar_bottom.webp';
+  static const String profileEditProfileAvatarDefault = 'assets/profile/edit_profile_avatar_default.webp';
+  static const String profileEditXuLine = 'assets/profile/edit_xu_line.webp';
   static const String propertyAdvicePic = 'assets/property/advice_pic.webp';
   static const String propertyAdvicePic = 'assets/property/advice_pic.webp';
   static const String propertyApproval = 'assets/property/approval.webp';
   static const String propertyApproval = 'assets/property/approval.webp';
   static const String propertyCollection = 'assets/property/collection.webp';
   static const String propertyCollection = 'assets/property/collection.webp';

+ 7 - 0
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -31,6 +31,8 @@ class MessageLookup extends MessageLookupByLibrary {
             "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."),
             "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":
         "account_deactivation":
             MessageLookupByLibrary.simpleMessage("Account Deactivation"),
             MessageLookupByLibrary.simpleMessage("Account Deactivation"),
+        "active": MessageLookupByLibrary.simpleMessage("ACTIVE"),
+        "add": MessageLookupByLibrary.simpleMessage("Add"),
         "administrator_reply":
         "administrator_reply":
             MessageLookupByLibrary.simpleMessage("Administrator Reply"),
             MessageLookupByLibrary.simpleMessage("Administrator Reply"),
         "agree_to": MessageLookupByLibrary.simpleMessage("Agree to"),
         "agree_to": MessageLookupByLibrary.simpleMessage("Agree to"),
@@ -63,6 +65,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Describe Your FeedBack"),
             MessageLookupByLibrary.simpleMessage("Describe Your FeedBack"),
         "did_not_receive":
         "did_not_receive":
             MessageLookupByLibrary.simpleMessage("Did Not Receive?"),
             MessageLookupByLibrary.simpleMessage("Did Not Receive?"),
+        "edit_profile": MessageLookupByLibrary.simpleMessage("Edit Profile"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
         "enable_notification":
         "enable_notification":
             MessageLookupByLibrary.simpleMessage("Enable Notification"),
             MessageLookupByLibrary.simpleMessage("Enable Notification"),
@@ -124,6 +127,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "nric_fin": MessageLookupByLibrary.simpleMessage("NRIC/FIN"),
         "nric_fin": MessageLookupByLibrary.simpleMessage("NRIC/FIN"),
         "old_mobile_phone":
         "old_mobile_phone":
             MessageLookupByLibrary.simpleMessage("Old Mobile Phone"),
             MessageLookupByLibrary.simpleMessage("Old Mobile Phone"),
+        "or": MessageLookupByLibrary.simpleMessage("or"),
         "other": MessageLookupByLibrary.simpleMessage("Other"),
         "other": MessageLookupByLibrary.simpleMessage("Other"),
         "owner": MessageLookupByLibrary.simpleMessage("Owner"),
         "owner": MessageLookupByLibrary.simpleMessage("Owner"),
         "owner_or_tenant":
         "owner_or_tenant":
@@ -155,6 +159,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "published_successfully":
         "published_successfully":
             MessageLookupByLibrary.simpleMessage("Published Successfully"),
             MessageLookupByLibrary.simpleMessage("Published Successfully"),
         "rate_us": MessageLookupByLibrary.simpleMessage("Rate Us"),
         "rate_us": MessageLookupByLibrary.simpleMessage("Rate Us"),
+        "remove": MessageLookupByLibrary.simpleMessage("Remove"),
         "resend_code": MessageLookupByLibrary.simpleMessage("Resend Code"),
         "resend_code": MessageLookupByLibrary.simpleMessage("Resend Code"),
         "reset_password":
         "reset_password":
             MessageLookupByLibrary.simpleMessage("Reset Password"),
             MessageLookupByLibrary.simpleMessage("Reset Password"),
@@ -194,6 +199,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "up_to_max_images": MessageLookupByLibrary.simpleMessage(
         "up_to_max_images": MessageLookupByLibrary.simpleMessage(
             "(Up to 10 images can be uploaded)"),
             "(Up to 10 images can be uploaded)"),
         "upload": MessageLookupByLibrary.simpleMessage("Upload"),
         "upload": MessageLookupByLibrary.simpleMessage("Upload"),
+        "upload_a_photo":
+            MessageLookupByLibrary.simpleMessage("Upload a Photo"),
         "upload_doc_desc": MessageLookupByLibrary.simpleMessage(
         "upload_doc_desc": MessageLookupByLibrary.simpleMessage(
             "The Management requires that you upload the following documents to verify your tenancy. You may redact sensitive financia information"),
             "The Management requires that you upload the following documents to verify your tenancy. You may redact sensitive financia information"),
         "upload_doc_desc1": MessageLookupByLibrary.simpleMessage(
         "upload_doc_desc1": MessageLookupByLibrary.simpleMessage(

+ 6 - 0
packages/cs_resources/lib/generated/intl/messages_zh_CN.dart

@@ -30,6 +30,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
         "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
             "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。"),
             "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。"),
         "account_deactivation": MessageLookupByLibrary.simpleMessage("删除账号"),
         "account_deactivation": MessageLookupByLibrary.simpleMessage("删除账号"),
+        "active": MessageLookupByLibrary.simpleMessage("可用"),
+        "add": MessageLookupByLibrary.simpleMessage("添加"),
         "administrator_reply": MessageLookupByLibrary.simpleMessage("管理员回复"),
         "administrator_reply": MessageLookupByLibrary.simpleMessage("管理员回复"),
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
         "alert": MessageLookupByLibrary.simpleMessage("提示"),
         "alert": MessageLookupByLibrary.simpleMessage("提示"),
@@ -54,6 +56,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "describe_your_feedback":
         "describe_your_feedback":
             MessageLookupByLibrary.simpleMessage("描述您的反馈"),
             MessageLookupByLibrary.simpleMessage("描述您的反馈"),
         "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
         "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
+        "edit_profile": MessageLookupByLibrary.simpleMessage("编辑个人信息"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "enable_notification": MessageLookupByLibrary.simpleMessage("允许通知"),
         "enable_notification": MessageLookupByLibrary.simpleMessage("允许通知"),
         "estate": MessageLookupByLibrary.simpleMessage("房产"),
         "estate": MessageLookupByLibrary.simpleMessage("房产"),
@@ -104,6 +107,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "notification": MessageLookupByLibrary.simpleMessage("通知"),
         "notification": MessageLookupByLibrary.simpleMessage("通知"),
         "nric_fin": MessageLookupByLibrary.simpleMessage("身份证/签证"),
         "nric_fin": MessageLookupByLibrary.simpleMessage("身份证/签证"),
         "old_mobile_phone": MessageLookupByLibrary.simpleMessage("旧的手机号码"),
         "old_mobile_phone": MessageLookupByLibrary.simpleMessage("旧的手机号码"),
+        "or": MessageLookupByLibrary.simpleMessage("或者"),
         "other": MessageLookupByLibrary.simpleMessage("其他"),
         "other": MessageLookupByLibrary.simpleMessage("其他"),
         "owner": MessageLookupByLibrary.simpleMessage("业主"),
         "owner": MessageLookupByLibrary.simpleMessage("业主"),
         "owner_or_tenant": MessageLookupByLibrary.simpleMessage("您是业主还是租户?"),
         "owner_or_tenant": MessageLookupByLibrary.simpleMessage("您是业主还是租户?"),
@@ -126,6 +130,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
+        "remove": MessageLookupByLibrary.simpleMessage("移除"),
         "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "rewards": MessageLookupByLibrary.simpleMessage("奖励"),
         "rewards": MessageLookupByLibrary.simpleMessage("奖励"),
@@ -158,6 +163,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "up_to_max_images":
         "up_to_max_images":
             MessageLookupByLibrary.simpleMessage("(您最多可以上传10张图片)"),
             MessageLookupByLibrary.simpleMessage("(您最多可以上传10张图片)"),
         "upload": MessageLookupByLibrary.simpleMessage("上传"),
         "upload": MessageLookupByLibrary.simpleMessage("上传"),
+        "upload_a_photo": MessageLookupByLibrary.simpleMessage("上传照片"),
         "upload_doc_desc": MessageLookupByLibrary.simpleMessage(
         "upload_doc_desc": MessageLookupByLibrary.simpleMessage(
             "管理员要求您上传以下文件以验证您的租约。您可以编辑敏感的财务信息"),
             "管理员要求您上传以下文件以验证您的租约。您可以编辑敏感的财务信息"),
         "upload_doc_desc1": MessageLookupByLibrary.simpleMessage(
         "upload_doc_desc1": MessageLookupByLibrary.simpleMessage(

+ 6 - 0
packages/cs_resources/lib/generated/intl/messages_zh_HK.dart

@@ -30,6 +30,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
         "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
             "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。"),
             "您确定要停用您的帐户吗?一旦您继续执行请求,您将无法登录应用程序。"),
         "account_deactivation": MessageLookupByLibrary.simpleMessage("删除账号"),
         "account_deactivation": MessageLookupByLibrary.simpleMessage("删除账号"),
+        "active": MessageLookupByLibrary.simpleMessage("可用"),
+        "add": MessageLookupByLibrary.simpleMessage("添加"),
         "administrator_reply": MessageLookupByLibrary.simpleMessage("管理员回复"),
         "administrator_reply": MessageLookupByLibrary.simpleMessage("管理员回复"),
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
         "agree_to": MessageLookupByLibrary.simpleMessage("同意"),
         "alert": MessageLookupByLibrary.simpleMessage("提示"),
         "alert": MessageLookupByLibrary.simpleMessage("提示"),
@@ -54,6 +56,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "describe_your_feedback":
         "describe_your_feedback":
             MessageLookupByLibrary.simpleMessage("描述您的反馈"),
             MessageLookupByLibrary.simpleMessage("描述您的反馈"),
         "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
         "did_not_receive": MessageLookupByLibrary.simpleMessage("没有收到验证码?"),
+        "edit_profile": MessageLookupByLibrary.simpleMessage("编辑个人信息"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "enable_notification": MessageLookupByLibrary.simpleMessage("允许通知"),
         "enable_notification": MessageLookupByLibrary.simpleMessage("允许通知"),
         "estate": MessageLookupByLibrary.simpleMessage("房产"),
         "estate": MessageLookupByLibrary.simpleMessage("房产"),
@@ -104,6 +107,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "notification": MessageLookupByLibrary.simpleMessage("通知"),
         "notification": MessageLookupByLibrary.simpleMessage("通知"),
         "nric_fin": MessageLookupByLibrary.simpleMessage("身份证/签证"),
         "nric_fin": MessageLookupByLibrary.simpleMessage("身份证/签证"),
         "old_mobile_phone": MessageLookupByLibrary.simpleMessage("旧的手机号码"),
         "old_mobile_phone": MessageLookupByLibrary.simpleMessage("旧的手机号码"),
+        "or": MessageLookupByLibrary.simpleMessage("或者"),
         "other": MessageLookupByLibrary.simpleMessage("其他"),
         "other": MessageLookupByLibrary.simpleMessage("其他"),
         "password": MessageLookupByLibrary.simpleMessage("密码"),
         "password": MessageLookupByLibrary.simpleMessage("密码"),
         "password_format": MessageLookupByLibrary.simpleMessage("8位数字或字母"),
         "password_format": MessageLookupByLibrary.simpleMessage("8位数字或字母"),
@@ -118,6 +122,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
             MessageLookupByLibrary.simpleMessage("您的反馈已发送成功,我们会尽快回复您的反馈,谢谢!"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
         "published_successfully": MessageLookupByLibrary.simpleMessage("发布成功"),
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
         "rate_us": MessageLookupByLibrary.simpleMessage("评价我们"),
+        "remove": MessageLookupByLibrary.simpleMessage("移除"),
         "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "resend_code": MessageLookupByLibrary.simpleMessage("重新发送"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "reset_password": MessageLookupByLibrary.simpleMessage("重置密码"),
         "rewards": MessageLookupByLibrary.simpleMessage("獎勵"),
         "rewards": MessageLookupByLibrary.simpleMessage("獎勵"),
@@ -145,6 +150,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "up_to_max_images":
         "up_to_max_images":
             MessageLookupByLibrary.simpleMessage("(您最多可以上传10张图片)"),
             MessageLookupByLibrary.simpleMessage("(您最多可以上传10张图片)"),
         "upload": MessageLookupByLibrary.simpleMessage("上传"),
         "upload": MessageLookupByLibrary.simpleMessage("上传"),
+        "upload_a_photo": MessageLookupByLibrary.simpleMessage("上传照片"),
         "upload_doc_desc": MessageLookupByLibrary.simpleMessage(
         "upload_doc_desc": MessageLookupByLibrary.simpleMessage(
             "管理员要求您上传以下文件以验证您的租约。您可以编辑敏感的财务信息"),
             "管理员要求您上传以下文件以验证您的租约。您可以编辑敏感的财务信息"),
         "upload_doc_desc1": MessageLookupByLibrary.simpleMessage(
         "upload_doc_desc1": MessageLookupByLibrary.simpleMessage(

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

@@ -1390,6 +1390,66 @@ class S {
     );
     );
   }
   }
 
 
+  /// `Upload a Photo`
+  String get upload_a_photo {
+    return Intl.message(
+      'Upload a Photo',
+      name: 'upload_a_photo',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `or`
+  String get or {
+    return Intl.message(
+      'or',
+      name: 'or',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Edit Profile`
+  String get edit_profile {
+    return Intl.message(
+      'Edit Profile',
+      name: 'edit_profile',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `ACTIVE`
+  String get active {
+    return Intl.message(
+      'ACTIVE',
+      name: 'active',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Remove`
+  String get remove {
+    return Intl.message(
+      'Remove',
+      name: 'remove',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Add`
+  String get add {
+    return Intl.message(
+      'Add',
+      name: 'add',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   /// `Other`
   String get other {
   String get other {
     return Intl.message(
     return Intl.message(

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

@@ -133,5 +133,11 @@
   "waiting_for_the_administrator": "Waiting for the administrator",
   "waiting_for_the_administrator": "Waiting for the administrator",
   "administrator_reply": "Administrator Reply",
   "administrator_reply": "Administrator Reply",
   "feedback_details": "FeedBack Details",
   "feedback_details": "FeedBack Details",
+  "upload_a_photo": "Upload a Photo",
+  "or": "or",
+  "edit_profile": "Edit Profile",
+  "active": "ACTIVE",
+  "remove": "Remove",
+  "add": "Add",
   "other": "Other"
   "other": "Other"
 }
 }

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

@@ -133,5 +133,11 @@
   "waiting_for_the_administrator": "等待管理员回复",
   "waiting_for_the_administrator": "等待管理员回复",
   "administrator_reply": "管理员回复",
   "administrator_reply": "管理员回复",
   "feedback_details": "反馈详情",
   "feedback_details": "反馈详情",
+  "upload_a_photo": "上传照片",
+  "or": "或者",
+  "edit_profile": "编辑个人信息",
+  "active": "可用",
+  "remove": "移除",
+  "add": "添加",
   "other": "其他"
   "other": "其他"
 }
 }

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

@@ -119,5 +119,11 @@
   "waiting_for_the_administrator": "等待管理员回复",
   "waiting_for_the_administrator": "等待管理员回复",
   "administrator_reply": "管理员回复",
   "administrator_reply": "管理员回复",
   "feedback_details": "反馈详情",
   "feedback_details": "反馈详情",
+  "upload_a_photo": "上传照片",
+  "or": "或者",
+  "edit_profile": "编辑个人信息",
+  "active": "可用",
+  "remove": "移除",
+  "add": "添加",
   "other": "其他"
   "other": "其他"
 }
 }

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

@@ -29,6 +29,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _colorDFF0FF = Color(0xFFDFF0FF);
   static const _colorDFF0FF = Color(0xFFDFF0FF);
   static const _color1B61CA = Color(0X4D1B61CA);
   static const _color1B61CA = Color(0X4D1B61CA);
   static const _color8B96BA = Color(0xFF8B96BA);
   static const _color8B96BA = Color(0xFF8B96BA);
+  static const _colorB4C5FF = Color(0xFFB4C5FF);
 
 
   //暗色主题的一些自定义颜色值
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -66,6 +67,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color tabTextUnSelectedDefault; //Tab文本,未选中 亮色为黑色,黑暗模式为灰色
   final Color tabTextUnSelectedDefault; //Tab文本,未选中 亮色为黑色,黑暗模式为灰色
   final Color tabLightBlueShadow; //Tab的淡蓝色阴影
   final Color tabLightBlueShadow; //Tab的淡蓝色阴影
   final Color textLightPurple; //文本淡紫色
   final Color textLightPurple; //文本淡紫色
+  final Color avatarBg; //头像框的淡蓝色
 
 
   // 私有的构造函数
   // 私有的构造函数
   const AppColorsTheme._internal({
   const AppColorsTheme._internal({
@@ -96,6 +98,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.tabTextSelectedDefault,
     required this.tabTextSelectedDefault,
     required this.tabTextUnSelectedDefault,
     required this.tabTextUnSelectedDefault,
     required this.textLightPurple,
     required this.textLightPurple,
+    required this.avatarBg,
   });
   });
 
 
   // 浅色主题工厂方法
   // 浅色主题工厂方法
@@ -128,6 +131,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextSelectedDefault: _colorPrimary,
       tabTextSelectedDefault: _colorPrimary,
       tabTextUnSelectedDefault: Colors.black,
       tabTextUnSelectedDefault: Colors.black,
       textLightPurple: _color8B96BA,
       textLightPurple: _color8B96BA,
+      avatarBg: _colorB4C5FF,
     );
     );
   }
   }
 
 
@@ -161,6 +165,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextSelectedDefault: Colors.white,
       tabTextSelectedDefault: Colors.white,
       tabTextUnSelectedDefault: _darkBlackItemLightMost,
       tabTextUnSelectedDefault: _darkBlackItemLightMost,
       textLightPurple: Colors.white,
       textLightPurple: Colors.white,
+      avatarBg: _darkBlackItemLight,
     );
     );
   }
   }
 
 
@@ -203,6 +208,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabLightBlueShadow: Color.lerp(tabLightBlueShadow, other.tabLightBlueShadow, t)!,
       tabLightBlueShadow: Color.lerp(tabLightBlueShadow, other.tabLightBlueShadow, t)!,
       tabTextUnSelectedDefault: Color.lerp(tabTextUnSelectedDefault, other.tabTextUnSelectedDefault, t)!,
       tabTextUnSelectedDefault: Color.lerp(tabTextUnSelectedDefault, other.tabTextUnSelectedDefault, t)!,
       textLightPurple: Color.lerp(textLightPurple, other.textLightPurple, t)!,
       textLightPurple: Color.lerp(textLightPurple, other.textLightPurple, t)!,
+      avatarBg: Color.lerp(avatarBg, other.avatarBg, t)!,
     );
     );
   }
   }
 }
 }

+ 1 - 0
packages/cs_resources/pubspec.yaml

@@ -31,6 +31,7 @@ flutter:
     - assets/auth/
     - assets/auth/
     - assets/community/
     - assets/community/
     - assets/main/
     - assets/main/
+    - assets/profile/
 
 
 
 
 flutter_intl:
 flutter_intl:

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

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