소스 검색

整理模块

liukai 8 달 전
부모
커밋
11af4d8374
81개의 변경된 파일399개의 추가작업 그리고 1847개의 파일을 삭제
  1. 23 13
      app/lib/main.dart
  2. 3 9
      app/lib/modules/main/main_page.dart
  3. 10 2
      app/pubspec.yaml
  4. 4 12
      melos.yaml
  5. 0 0
      packages/cpt_auth/.gitignore
  6. 20 0
      packages/cpt_auth/lib/router/auth_service_impl.dart
  7. 12 0
      packages/cpt_auth/lib/router/page_router.dart
  8. 1 1
      packages/cpt_profile/pubspec.yaml
  9. 31 0
      packages/cpt_job/.gitignore
  10. 20 0
      packages/cpt_job/lib/router/job_service_impl.dart
  11. 12 0
      packages/cpt_job/lib/router/page_router.dart
  12. 40 0
      packages/cpt_job/pubspec.yaml
  13. 31 0
      packages/cpt_labour/.gitignore
  14. 2 2
      packages/cpt_profile/lib/router/profile_service_impl.dart
  15. 12 0
      packages/cpt_labour/lib/router/page_router.dart
  16. 40 0
      packages/cpt_labour/pubspec.yaml
  17. 0 204
      packages/cpt_profile/lib/modules/me/change_mobile/change_mobile_controller.dart
  18. 0 179
      packages/cpt_profile/lib/modules/me/change_mobile/change_mobile_page.dart
  19. 0 22
      packages/cpt_profile/lib/modules/me/change_mobile/change_mobile_state.dart
  20. 0 170
      packages/cpt_profile/lib/modules/me/dark_model/dark_model_page.dart
  21. 0 40
      packages/cpt_profile/lib/modules/me/form_filed/check_box_form_field.dart
  22. 0 18
      packages/cpt_profile/lib/modules/me/form_filed/form_filed_controller.dart
  23. 0 271
      packages/cpt_profile/lib/modules/me/form_filed/form_filed_page.dart
  24. 0 32
      packages/cpt_profile/lib/modules/me/form_filed/form_filed_state.dart
  25. 0 40
      packages/cpt_profile/lib/modules/me/notification_enable/notification_enable_controller.dart
  26. 0 89
      packages/cpt_profile/lib/modules/me/notification_enable/notification_enable_page.dart
  27. 0 164
      packages/cpt_profile/lib/modules/me/reset_password/reset_password_controller.dart
  28. 0 183
      packages/cpt_profile/lib/modules/me/reset_password/reset_password_page.dart
  29. 0 29
      packages/cpt_profile/lib/modules/me/reset_password/reset_password_state.dart
  30. 0 73
      packages/cpt_profile/lib/modules/me/setting/setting_controller.dart
  31. 0 161
      packages/cpt_profile/lib/modules/me/setting/setting_page.dart
  32. 0 20
      packages/cpt_profile/lib/modules/me/setting/setting_state.dart
  33. 0 54
      packages/cpt_profile/lib/router/page_router.dart
  34. 31 0
      packages/cpt_report/.gitignore
  35. 12 0
      packages/cpt_report/lib/router/page_router.dart
  36. 20 0
      packages/cpt_report/lib/router/report_service_impl.dart
  37. 40 0
      packages/cpt_report/pubspec.yaml
  38. BIN
      packages/cs_resources/assets/base_service/page_load_error.png
  39. BIN
      packages/cs_resources/assets/base_service/page_load_error.webp
  40. BIN
      packages/cs_resources/assets/base_service/page_no_data.png
  41. BIN
      packages/cs_resources/assets/base_service/page_no_data.webp
  42. BIN
      packages/cs_resources/assets/cpt_auth/checkbox_choose.webp
  43. BIN
      packages/cs_resources/assets/cpt_auth/checkbox_unchoose.webp
  44. BIN
      packages/cs_resources/assets/cpt_auth/down_arraw_icon.webp
  45. BIN
      packages/cs_resources/assets/cpt_auth/login_apple_icon.webp
  46. BIN
      packages/cs_resources/assets/cpt_auth/login_line_bg.webp
  47. BIN
      packages/cs_resources/assets/cpt_auth/login_logo_icon.webp
  48. BIN
      packages/cs_resources/assets/cpt_auth/login_password_icon.webp
  49. BIN
      packages/cs_resources/assets/cpt_auth/login_password_invis_icon.webp
  50. BIN
      packages/cs_resources/assets/cpt_auth/login_password_vis_icon.webp
  51. BIN
      packages/cs_resources/assets/cpt_auth/login_phone_icon.webp
  52. BIN
      packages/cs_resources/assets/cpt_auth/login_qq_icon.webp
  53. BIN
      packages/cs_resources/assets/cpt_auth/login_top_bg.webp
  54. BIN
      packages/cs_resources/assets/cpt_auth/login_top_bg_dark.webp
  55. BIN
      packages/cs_resources/assets/cpt_auth/login_verify_icon.webp
  56. BIN
      packages/cs_resources/assets/cpt_auth/login_wx_icon.webp
  57. BIN
      packages/cs_resources/assets/cpt_auth/signup_invite_icon.webp
  58. BIN
      packages/cs_resources/assets/cpt_profile/close_account.png
  59. BIN
      packages/cs_resources/assets/cpt_profile/home_close_account.png
  60. BIN
      packages/cs_resources/assets/cpt_profile/home_help_center.png
  61. BIN
      packages/cs_resources/assets/cpt_profile/home_invite_friends.png
  62. BIN
      packages/cs_resources/assets/cpt_profile/home_me_top_bg.webp
  63. BIN
      packages/cs_resources/assets/cpt_profile/home_next.png
  64. BIN
      packages/cs_resources/assets/cpt_profile/home_personal_info.png
  65. BIN
      packages/cs_resources/assets/cpt_profile/home_settings.png
  66. BIN
      packages/cs_resources/assets/cpt_profile/home_work_training.png
  67. BIN
      packages/cs_resources/assets/cpt_profile/idcard_back.png
  68. BIN
      packages/cs_resources/assets/cpt_profile/idcard_front.png
  69. BIN
      packages/cs_resources/assets/cpt_profile/real_auth.png
  70. BIN
      packages/cs_resources/assets/cpt_profile/real_auth_success.png
  71. BIN
      packages/cs_resources/assets/cpt_profile/reset_confirm_password.png
  72. BIN
      packages/cs_resources/assets/cpt_profile/reset_password_lock.png
  73. 2 33
      packages/cs_resources/lib/generated/assets.dart
  74. 0 2
      packages/cs_resources/pubspec.yaml
  75. 2 2
      packages/cs_router/lib/componentRouter/auth_service.dart
  76. 12 9
      packages/cs_router/lib/componentRouter/component_router_service.dart
  77. 6 0
      packages/cs_router/lib/componentRouter/job_service.dart
  78. 7 0
      packages/cs_router/lib/componentRouter/labour_service.dart
  79. 0 6
      packages/cs_router/lib/componentRouter/mall_service.dart
  80. 0 7
      packages/cs_router/lib/componentRouter/profile_service.dart
  81. 6 0
      packages/cs_router/lib/componentRouter/report_service.dart

+ 23 - 13
app/lib/main.dart

@@ -1,5 +1,9 @@
-import 'package:cpt_profile/router/page_router.dart';
-import 'package:cpt_profile/router/profile_service_impl.dart';
+import 'package:cpt_auth/router/auth_service_impl.dart';
+import 'package:cpt_auth/router/page_router.dart';
+import 'package:cpt_job/router/job_service_impl.dart';
+import 'package:cpt_labour/router/labour_service_impl.dart';
+import 'package:cpt_labour/router/page_router.dart';
+import 'package:cpt_report/router/report_service_impl.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 import 'package:flutter_bugly/flutter_bugly.dart';
@@ -8,8 +12,9 @@ import 'package:initializer/global_services_injection.dart';
 import 'package:initializer/app_initializer.dart';
 import 'package:plugin_basic/basic_export.dart';
 import 'package:router/componentRouter/auth_service.dart';
-import 'package:router/componentRouter/mall_service.dart';
-import 'package:router/componentRouter/profile_service.dart';
+import 'package:router/componentRouter/job_service.dart';
+import 'package:router/componentRouter/labour_service.dart';
+import 'package:router/componentRouter/report_service.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:plugin_platform/engine/sp/sp_util.dart';
 import 'package:plugin_basic/constants/app_constant.dart';
@@ -24,8 +29,6 @@ import 'package:widgets/dialog/custom_failure_widget.dart';
 import 'package:widgets/dialog/custom_success_widget.dart';
 import 'package:widgets/dialog/custom_loading_widget.dart';
 import 'package:widgets/widget_export.dart';
-
-import 'app_binding.dart';
 import 'router/page_router.dart';
 
 void main() {
@@ -36,7 +39,10 @@ void main() {
 
     //全局自定义单例服务的注入
     GlobalServicesInjection.init(additionalDependencies: () {
-      Get.lazyPut<ProfileService>(() => ProfileServiceImpl());
+      Get.lazyPut<AuthService>(() => AuthServiceImpl());
+      Get.lazyPut<LabourService>(() => LabourServiceImpl());
+      Get.lazyPut<JobService>(() => JobServiceImpl());
+      Get.lazyPut<ReportService>(() => ReportServiceImpl());
     });
 
     runApp(MyApp());
@@ -46,7 +52,8 @@ void main() {
 class MyApp extends StatelessWidget {
   MyApp({Key? key}) : super(key: key) {
     /// 全局设置 EasyRefresh 的样式
-    EasyRefresh.defaultHeaderBuilder = () => ClassicHeader(
+    EasyRefresh.defaultHeaderBuilder = () =>
+        ClassicHeader(
           dragText: '下拉刷新'.tr,
           armedText: '释放刷新'.tr,
           readyText: '刷新中...'.tr,
@@ -56,7 +63,8 @@ class MyApp extends StatelessWidget {
           failedText: '失败'.tr,
           messageText: '最近更新于 %T'.tr,
         );
-    EasyRefresh.defaultFooterBuilder = () => ClassicFooter(
+    EasyRefresh.defaultFooterBuilder = () =>
+        ClassicFooter(
           dragText: '上拉加载更多'.tr,
           armedText: '释放刷新'.tr,
           readyText: '加载中...'.tr,
@@ -104,7 +112,9 @@ class MyApp extends StatelessWidget {
           SystemChrome.setSystemUIOverlayStyle(ThemeConfig.systemUiOverlayStyleDarkTheme);
           break;
         default:
-          Brightness currentBrightness = MediaQuery.of(context).platformBrightness;
+          Brightness currentBrightness = MediaQuery
+              .of(context)
+              .platformBrightness;
           if (currentBrightness == Brightness.dark) {
             Log.d("main.dart - 跟随系统模式-暗色模式");
             SystemChrome.setSystemUIOverlayStyle(ThemeConfig.systemUiOverlayStyleDarkTheme);
@@ -127,7 +137,7 @@ class MyApp extends StatelessWidget {
           enableLog: true,
           //默认路由与路由表的加载
           initialRoute: RouterPath.SPLASH,
-          getPages: PageRouter.routes + BasicPageRouter.routes +  ProfilePageRouter.routes,
+          getPages: PageRouter.routes + BasicPageRouter.routes /*+ LabourPageRouter.routes + AuthPageRouter.routes +*/,
           //对原生导航的兼容;SmartDialog路由配置生命周期处理
           navigatorObservers: [GetXRouterObserver(), FlutterSmartDialog.observer, routeObserver],
           //默认页面动画
@@ -141,8 +151,8 @@ class MyApp extends StatelessWidget {
           themeMode: darkModel == 1
               ? ThemeMode.light
               : darkModel == 2
-                  ? ThemeMode.dark
-                  : ThemeMode.system,
+              ? ThemeMode.dark
+              : ThemeMode.system,
           //本地化相关
           locale: TranslationService.locale,
           fallbackLocale: TranslationService.fallbackLocale,

+ 3 - 9
app/lib/modules/main/main_page.dart

@@ -1,6 +1,3 @@
-import 'package:cpt_profile/modules/me/form_filed/form_filed_page.dart';
-import 'package:cpt_profile/modules/me/setting/setting_page.dart';
-
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@@ -141,7 +138,7 @@ class _MainPageState extends BaseState<MainPage, MainController> with StateLifec
                   ).center().marginOnly(top: 10),
                   MyButton(
                     onPressed: () {
-                      SettingPage.startInstance();
+
                     },
                     text: "去设置页面",
                     minWidth: 150,
@@ -152,7 +149,7 @@ class _MainPageState extends BaseState<MainPage, MainController> with StateLifec
                   ).center().marginOnly(top: 10),
                   MyButton(
                     onPressed: () {
-                      FormFiledPage.startInstance();
+
                     },
                     text: "Form表单页面",
                     minWidth: 150,
@@ -163,10 +160,7 @@ class _MainPageState extends BaseState<MainPage, MainController> with StateLifec
                   ).center().marginOnly(top: 10),
                   MyButton(
                     onPressed: () async {
-                      bool isLogin = await ComponentRouterServices.profileService.isUserLogin();
-                      String count = await ComponentRouterServices.mallService.getMallCount();
-                      ComponentRouterServices.authService.gotoLoginPage();
-                      Log.d("isLogin:$isLogin count:$count");
+
                     },
                     text: "路由获取",
                     minWidth: 150,

+ 10 - 2
app/pubspec.yaml

@@ -37,9 +37,17 @@ dependencies:
     path: ../packages/cs_widgets
 
   #业务子组件的依赖
-  cpt_profile:
-    path: ../packages/cpt_profile
+  cpt_auth:
+    path: ../packages/cpt_auth
 
+  cpt_job:
+    path: ../packages/cpt_job
+
+  cpt_labour:
+    path: ../packages/cpt_labour
+
+  cpt_report:
+    path: ../packages/cpt_report
 
   initializer:
     path: ../packages/cs_initializer

+ 4 - 12
melos.yaml

@@ -10,10 +10,10 @@ packages:
   - "packages/cs_shared/**"
   - "packages/cs_widgets/**"
   - "packages/cpt_auth/"
-  - "packages/cpt_mall/"
-  - "packages/cpt_profile/"
-  - "packages/cpt_mall/runalone/**"
-  - "packages/cpt_auth/runalone/**"
+  - "packages/cpt_job/"
+  - "packages/cpt_labour/"
+  - "packages/cpt_report/"
+
 
 
 command:
@@ -41,11 +41,3 @@ scripts:
   test:
     run: melos exec --dir-exists=test -- "flutter test"
     description: Run `flutter test` in all packages
-
-  runalone_auth:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_auth/runalone" && flutter run
-    description: runalone auth module.
-
-  runalone_mall:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_mall/runalone" && flutter run
-    description: runalone mall module.

packages/cpt_profile/.gitignore → packages/cpt_auth/.gitignore


+ 20 - 0
packages/cpt_auth/lib/router/auth_service_impl.dart

@@ -0,0 +1,20 @@
+import 'package:plugin_basic/basic_export.dart';
+import 'package:router/componentRouter/auth_service.dart';
+import 'package:shared/utils/log_utils.dart';
+
+class AuthServiceImpl extends GetxService implements AuthService {
+
+  @override
+  void onInit() {
+    super.onInit();
+    //初始化资源
+    Log.d("ProfileServiceImpl 初始化资源");
+  }
+
+  @override
+  void onClose() {
+    super.onClose();
+    //销毁资源
+    Log.d("ProfileServiceImpl 销毁资源");
+  }
+}

+ 12 - 0
packages/cpt_auth/lib/router/page_router.dart

@@ -0,0 +1,12 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:router/path/router_path.dart';
+
+class AuthPageRouter {
+
+  static final routes = [
+
+
+  ];
+}

+ 1 - 1
packages/cpt_profile/pubspec.yaml

@@ -1,4 +1,4 @@
-name: cpt_profile
+name: cpt_auth
 description: ProfileComponent Profile-Me组件
 
 version: 1.0.0

+ 31 - 0
packages/cpt_job/.gitignore

@@ -0,0 +1,31 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+*.lock
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Visual Studio Code related
+.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+proguardMapping.txt

+ 20 - 0
packages/cpt_job/lib/router/job_service_impl.dart

@@ -0,0 +1,20 @@
+import 'package:plugin_basic/basic_export.dart';
+import 'package:router/componentRouter/job_service.dart';
+import 'package:shared/utils/log_utils.dart';
+
+class JobServiceImpl extends GetxService implements JobService {
+
+  @override
+  void onInit() {
+    super.onInit();
+    //初始化资源
+    Log.d("ProfileServiceImpl 初始化资源");
+  }
+
+  @override
+  void onClose() {
+    super.onClose();
+    //销毁资源
+    Log.d("ProfileServiceImpl 销毁资源");
+  }
+}

+ 12 - 0
packages/cpt_job/lib/router/page_router.dart

@@ -0,0 +1,12 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:router/path/router_path.dart';
+
+class JobPageRouter {
+
+  static final routes = [
+
+
+  ];
+}

+ 40 - 0
packages/cpt_job/pubspec.yaml

@@ -0,0 +1,40 @@
+name: cpt_job
+description: ProfileComponent Profile-Me组件
+
+version: 1.0.0
+
+environment:
+  sdk: '>=3.0.2 <4.0.0'
+
+dependencies:
+
+  flutter_localizations:
+    sdk: flutter
+
+  flutter:
+    sdk: flutter
+
+  #基础组件的依赖
+  domain:
+    path: ../cs_domain
+
+  plugin_basic:
+    path: ../cs_plugin_basic
+
+  plugin_platform:
+    path: ../cs_plugin_platform
+
+  shared:
+    path: ../cs_shared
+
+  cs_resources:
+    path: ../cs_resources
+
+  router:
+    path: ../cs_router
+
+  widgets:
+    path: ../cs_widgets
+
+flutter:
+  uses-material-design: true

+ 31 - 0
packages/cpt_labour/.gitignore

@@ -0,0 +1,31 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+*.lock
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Visual Studio Code related
+.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+proguardMapping.txt

+ 2 - 2
packages/cpt_profile/lib/router/profile_service_impl.dart

@@ -1,8 +1,8 @@
 import 'package:plugin_basic/basic_export.dart';
-import 'package:router/componentRouter/profile_service.dart';
+import 'package:router/componentRouter/labour_service.dart';
 import 'package:shared/utils/log_utils.dart';
 
-class ProfileServiceImpl extends GetxService implements ProfileService {
+class LabourServiceImpl extends GetxService implements LabourService {
 
   @override
   Future<bool> isUserLogin() async{

+ 12 - 0
packages/cpt_labour/lib/router/page_router.dart

@@ -0,0 +1,12 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:router/path/router_path.dart';
+
+class LabourPageRouter {
+
+  static final routes = [
+
+
+  ];
+}

+ 40 - 0
packages/cpt_labour/pubspec.yaml

@@ -0,0 +1,40 @@
+name: cpt_labour
+description: ProfileComponent Profile-Me组件
+
+version: 1.0.0
+
+environment:
+  sdk: '>=3.0.2 <4.0.0'
+
+dependencies:
+
+  flutter_localizations:
+    sdk: flutter
+
+  flutter:
+    sdk: flutter
+
+  #基础组件的依赖
+  domain:
+    path: ../cs_domain
+
+  plugin_basic:
+    path: ../cs_plugin_basic
+
+  plugin_platform:
+    path: ../cs_plugin_platform
+
+  shared:
+    path: ../cs_shared
+
+  cs_resources:
+    path: ../cs_resources
+
+  router:
+    path: ../cs_router
+
+  widgets:
+    path: ../cs_widgets
+
+flutter:
+  uses-material-design: true

+ 0 - 204
packages/cpt_profile/lib/modules/me/change_mobile/change_mobile_controller.dart

@@ -1,204 +0,0 @@
-import 'dart:async';
-
-import 'package:domain/repository/auth_repository.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
-import 'package:get/get.dart';
-import 'package:plugin_platform/http/http_result.dart';
-import 'package:shared/utils/ext_dart.dart';
-import 'package:shared/utils/log_utils.dart';
-import 'package:shared/utils/util.dart';
-
-
-
-import 'change_mobile_state.dart';
-
-class ChangeMobileController extends GetxController {
-  final ChangeMobileState state = ChangeMobileState();
-  final AuthRepository authRepository = Get.find();
-
-  String? mobilePhoneErrorText; //表单的错误信息展示
-  String? codeErrorText;
-
-  String? phone;
-  String? code;
-
-
-  /// 执行手机号码的绑定
-  void doChangePhone() {
-    mobilePhoneErrorText = null;
-    codeErrorText = null;
-    update();
-
-    var phoneController = state.formData['phone']!['controller'];
-    var codeController = state.formData['code']!['controller'];
-
-    phone = phoneController.text;
-    code = codeController.text;
-
-    Log.d('phone:$phone code:$code');
-
-    if (Utils.isEmpty(phone)) {
-      mobilePhoneErrorText = "电话号码不能为空";
-      update();
-    } else if (Utils.isEmpty(code)) {
-      codeErrorText = "验证码不能为空";
-      update();
-    }  else {
-      _requestForgetPsd();
-    }
-  }
-
-  /// 请求接口,普通的密码注册
-  void _requestForgetPsd() async {
-    // //获取到数据
-    // SmartDialog.showLoading();
-    // var result = await authRepository.updateMobilePhone(phone, code);
-    // SmartDialog.dismiss(status: SmartStatus.loading);
-    //
-    // //处理数据
-    // if (result.isSuccess) {
-    //   SmartDialog.showNotify(msg:'修改手机号码成功',notifyType: NotifyType.success);
-    //
-    //   //发送通知刷新用户详情信息
-    //   bus.emit(AppConstant.eventProfile2Refresh, true);
-    //
-    //   //成功了返回
-    //   Get.back();
-    // } else {
-    //   _handleErrorMessage(result);
-    // }
-  }
-
-  /// 处理网络请求注册的表单错误
-  void _handleErrorMessage(HttpResult<dynamic> result) {
-    String? errorMessage = result.errorMsg;
-    SmartDialog.showToast(errorMessage ?? '未知错误'.tr);
-
-    Map<String, dynamic>? json = result.getErrorJson();
-    handleFormError(json, 'phone', (str) {
-      mobilePhoneErrorText = str;
-    });
-    handleFormError(json, 'sms_verification_code', (str) {
-      codeErrorText = str;
-    });
-  }
-
-  /// 默认的App Dialog
-  void showVerifyCodedDialog() {
-    //隐藏全部的软键盘与焦点
-    _phoneFocusNode?.unfocus();
-    _codeFocusNode?.unfocus();
-
-    //校验手机号码不能为空
-    phone = state.formData['phone']!['controller'].text;
-    if (Utils.isEmpty(phone)) {
-      mobilePhoneErrorText = "电话号码不能为空";
-      update();
-    } else {
-      // SmartDialog.show(
-      //   usePenetrate: false,
-      //   debounce: true,
-      //   clickMaskDismiss: false,
-      //   onDismiss: () {
-      //     //每次取消弹窗都要手动删除弹窗的Controller,不然无法每次弹出都请求接口
-      //     Get.delete<VerifyCodeDialogController>();
-      //   },
-      //   builder: (context) => VerifyCodeDialog(
-      //     confirmAction: (key, code) {
-      //       //发送验证码
-      //       _requestSendSMS(key, code);
-      //     },
-      //   ),
-      // );
-    }
-  }
-
-  /// 请求接口,发送验证码
-  void _requestSendSMS(String? key, String? code) async {
-    // //获取到数据
-    // SmartDialog.showLoading();
-    // var result = await authRepository.sendPhoneSMS('update_phone', phone, key, code);
-    // SmartDialog.dismiss(status: SmartStatus.loading);
-    //
-    // //处理数据
-    // if (result.isSuccess) {
-    //   //成功之后开始倒计时
-    //   _startCountDown();
-    // } else {
-    //   String? errorMessage = result.errorMsg;
-    //   SmartDialog.showToast(errorMessage ?? '未知错误'.tr);
-    // }
-  }
-
-  // =========================== 倒计时控制 ===========================
-
-  final int _initialTime = 60; // 初始倒计时时间(秒)
-  int countdownTime = 0; // 当前倒计时剩余时间(秒)
-  Timer? countdownTimer;
-  bool isCounting = false;
-
-  /// 开启倒计时
-  void _startCountDown() {
-    countdownTime = _initialTime;
-    isCounting = true;
-    update();
-
-    //每秒的倒计时
-    countdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
-      if (countdownTime > 0) {
-        countdownTime--;
-      } else {
-        isCounting = false;
-        countdownTimer?.cancel(); // 取消计时器
-      }
-      update();
-    });
-  }
-
-  // =========================== 焦点控制 ===========================
-
-  FocusNode? _phoneFocusNode;
-  FocusNode? _codeFocusNode;
-
-  void _onPhoneFocusChange() {
-    if (_phoneFocusNode?.hasFocus == true) {
-      mobilePhoneErrorText = null;
-      update();
-    }
-  }
-
-  void _onCodeFocusChange() {
-    if (_codeFocusNode?.hasFocus == true) {
-      codeErrorText = null;
-      update();
-    }
-  }
-
-
-  @override
-  void onInit() {
-    super.onInit();
-    _phoneFocusNode = state.formData['phone']!['focusNode'];
-    _codeFocusNode = state.formData['code']!['focusNode'];
-  }
-
-  @override
-  void onReady() {
-    super.onReady();
-    _phoneFocusNode?.addListener(_onPhoneFocusChange);
-    _codeFocusNode?.addListener(_onCodeFocusChange);
-  }
-
-  @override
-  void onClose() {
-    super.onClose();
-    _phoneFocusNode?.removeListener(_onPhoneFocusChange);
-    _codeFocusNode?.removeListener(_onCodeFocusChange);
-    _phoneFocusNode = null;
-    _codeFocusNode = null;
-
-    countdownTimer?.cancel(); // 取消计时器
-  }
-
-}

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

@@ -1,179 +0,0 @@
-import 'dart:ffi';
-
-import 'package:flutter/material.dart';
-import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
-import 'package:get/get.dart';
-import 'package:plugin_basic/base/base_stateless_page.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:cs_resources/generated/assets.dart';
-import 'package:router/path/router_path.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/utils/dark_theme_util.dart';
-import 'change_mobile_controller.dart';
-import 'change_mobile_state.dart';
-
-class ChangeMobilePage extends BaseStatelessPage<ChangeMobileController> {
-  ChangeMobilePage({super.key});
-
-  late ChangeMobileState state;
-
-  @override
-  ChangeMobileController createRawController() {
-    return ChangeMobileController();
-  }
-
-  //启动当前页面
-  static void startInstance() {
-    return Get.start(RouterPath.CHANGEMOBILE);
-  }
-
-  @override
-  void initState() {
-    state = controller.state;
-  }
-
-  @override
-  Widget buildWidget(BuildContext context) {
-    return Scaffold(
-        appBar: MyAppBar.appBar(context, "修改手机号"),
-        body: SafeArea(
-          bottom: true,
-          top: false,
-          child: SizedBox(
-            width: double.infinity,
-            child: SingleChildScrollView(
-              scrollDirection: Axis.vertical,
-              physics: const BouncingScrollPhysics(),
-              child: autoCtlGetBuilder(builder: (controller) {
-                return Column(
-                  mainAxisSize: MainAxisSize.max,
-                  crossAxisAlignment: CrossAxisAlignment.center,
-                  children: [
-                    //电话号码
-                    _buildInputLayout(
-                      "phone",
-                      Assets.cptAuthLoginPhoneIcon,
-                      leftIconWidth: 13.5,
-                      leftIconHeight: 16,
-                      marginTop: 20,
-                      textInputType: TextInputType.phone,
-                      textInputAction: TextInputAction.next,
-                      errorText: controller.mobilePhoneErrorText,
-                      onSubmit: (formKey, value) {
-                        state.formData[formKey]!['focusNode'].unfocus();
-                        FocusScope.of(context).requestFocus(state.formData['code']!['focusNode']);
-                      },
-                    ),
-
-                    //验证码
-                    _buildInputLayout(
-                      "code",
-                      Assets.cptAuthLoginVerifyIcon,
-                      leftIconWidth: 13.5,
-                      leftIconHeight: 15,
-                      marginTop: 10,
-                      paddingRight: 15,
-                      textInputAction: TextInputAction.next,
-                      errorText: controller.codeErrorText,
-                      showRightIcon: true,
-                      rightWidget: MyTextView(
-                        controller.isCounting ? controller.countdownTime.toString() + " s" : '获取验证码'.tr,
-                        textAlign: TextAlign.center,
-                        textColor: controller.isCounting ? ColorConstants.gray99 : ColorConstants.appBlue,
-                        fontSize: 14,
-                        paddingRight: 3,
-                        isFontMedium: true,
-                        onClick: controller.isCounting ? null : () => controller.showVerifyCodedDialog(),
-                      ).paddingOnly(top: 15, bottom: 15),
-                      onSubmit: (formKey, value) {
-                        state.formData[formKey]!['focusNode'].unfocus();
-                        controller.doChangePhone();
-                      },
-                    ),
-
-                    //登录按钮
-                    MyButton(
-                      text: "提交".tr,
-                      textColor: ColorConstants.whitefe,
-                      fontSize: 16,
-                      fontWeight: FontWeight.w700,
-                      backgroundColor: ColorConstants.appBlue,
-                      minHeight: 50,
-                      radius: 5,
-                      onPressed: () => controller.doChangePhone(),
-                    ).marginOnly(left: 20, right: 20, top: 28, bottom: 43),
-                  ],
-                );
-              }),
-            ),
-          ),
-        ));
-  }
-
-  /// 手机号码与验证码的输入框
-  _buildInputLayout(
-    String key,
-    String leftIconRes, {
-    double leftIconWidth = 0,
-    double leftIconHeight = 0,
-    double marginTop = 23,
-    double paddingRight = 18,
-    bool? showRightIcon = false, //是否展示右侧的布局
-    Widget? rightWidget, //右侧的布局
-    TextInputType textInputType = TextInputType.text,
-    String? errorText,
-    TextInputAction textInputAction = TextInputAction.done,
-    Function? onSubmit,
-  }) {
-    return IgnoreKeyboardDismiss(
-      child: MyTextField(
-        key,
-        state.formData[key]!['value'],
-        hintText: state.formData[key]!['hintText'],
-        hintStyle: const TextStyle(
-          fontSize: 14.0,
-          fontWeight: FontWeight.w500,
-        ),
-        controller: state.formData[key]!['controller'],
-        focusNode: state.formData[key]!['focusNode'],
-        margin: EdgeInsets.only(left: 20, right: 20, top: marginTop),
-        showDivider: false,
-        fillBackgroundColor: DarkThemeUtil.multiColors(ColorConstants.white, darkColor: ColorConstants.darkBlackItem),
-        fillCornerRadius: 5,
-        padding: EdgeInsets.only(left: 16, right: paddingRight, top: 2.5, bottom: 2.5),
-        height: 50,
-        style: TextStyle(
-          color: DarkThemeUtil.multiColors(ColorConstants.tabTextBlack, darkColor: ColorConstants.white),
-          fontSize: 14.0,
-          fontWeight: FontWeight.w500,
-        ),
-        inputType: textInputType,
-        textInputAction: textInputAction,
-        onSubmit: onSubmit,
-        cursorColor: ColorConstants.tabTextBlack,
-        obscureText: state.formData[key]!['obsecure'],
-        errorText: errorText,
-        showLeftIcon: true,
-        showRightIcon: showRightIcon,
-        rightWidget: rightWidget,
-        leftWidget: Row(
-          children: [
-            MyAssetImage(leftIconRes, width: leftIconWidth, height: leftIconHeight),
-            const Spacer(),
-            Container(
-              color: ColorConstants.graye5,
-              width: 1,
-              height: 15,
-            )
-          ],
-        ).constrained(width: 30),
-      ),
-    );
-  }
-}

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

@@ -1,22 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-
-class ChangeMobileState {
-//表单的校验与数据
-  Map<String, Map<String, dynamic>> formData = {
-    'phone': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': '请输入手机号码'.tr,
-      'obsecure': false,
-    },
-    'code': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': '请输入验证码'.tr,
-      'obsecure': false,
-    },
-  };
-}

+ 0 - 170
packages/cpt_profile/lib/modules/me/dark_model/dark_model_page.dart

@@ -1,170 +0,0 @@
-import 'dart:ui';
-
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:plugin_basic/base/base_stateful_page.dart';
-import 'package:plugin_basic/constants/app_constant.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:plugin_platform/engine/sp/sp_util.dart';
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:cs_resources/local/theme/theme_config.dart';
-import 'package:router/path/router_path.dart';
-import 'package:widgets/my_appbar.dart';
-import 'package:widgets/my_button.dart';
-import 'package:widgets/my_text_view.dart';
-import 'package:widgets/utils/dark_theme_util.dart';
-
-class DarkModelPage extends BaseStatefulPage {
-  DarkModelPage({super.key});
-
-  //启动当前页面
-  static void startInstance() {
-    return Get.start(RouterPath.DARK_MODEL);
-  }
-
-  @override
-  State<DarkModelPage> createState() => _DarkModelPageState();
-
-  @override
-  GetxController createRawController() {
-    throw UnimplementedError();
-  }
-}
-
-class _DarkModelPageState extends State<DarkModelPage> {
-  int selectedMode = 0; // 0-跟随系统,1-亮色模式,2-暗色模式
-
-  @override
-  void initState() {
-    super.initState();
-    int? model = SPUtil.getInt(AppConstant.storagedarkmodel, defValue: 0);
-    setState(() {
-      selectedMode = model ?? 0;
-    });
-  }
-
-  @override
-  void dispose() {
-    super.dispose();
-  }
-
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-        backgroundColor: DarkThemeUtil.multiColors(ColorConstants.pageBg, darkColor: ColorConstants.darkBlackBg),
-        appBar: MyAppBar.appBar(context, "深色模式".tr),
-        body: SafeArea(
-          bottom: true,
-          top: false,
-          //真正的 Content 布局
-          child: Scrollbar(
-            child: SingleChildScrollView(
-              child: Column(
-                mainAxisSize: MainAxisSize.max,
-                crossAxisAlignment: CrossAxisAlignment.start,
-                children: [
-                  ListTile(
-                    title: MyTextView(
-                      '跟随系统',
-                      textColor: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white),
-                      fontSize: 16,
-                      isFontMedium: true,
-                    ),
-                    trailing: CupertinoSwitch(
-                      value: selectedMode == 0,
-                      onChanged: (value) {
-                        setState(() {
-                          selectedMode = value ? 0 : 1;
-                        });
-                      },
-                    ),
-                  ),
-                  Divider(
-                    color: DarkThemeUtil.multiColors(ColorConstants.dividerD9, darkColor: ColorConstants.darkBlackItemDivider),
-                    height: 0.5,
-                  ),
-                  if (selectedMode != 0) ...[
-                    MyTextView(
-                      '手动选择:',
-                      textColor: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white),
-                      fontSize: 16,
-                      marginTop: 10,
-                      marginBottom: 10,
-                      marginLeft: 15,
-                      isFontMedium: true,
-                    ),
-                    ListTile(
-                      title: MyTextView(
-                        '亮色模式',
-                        textColor: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white),
-                        fontSize: 16,
-                        isFontMedium: true,
-                      ),
-                      trailing: CupertinoSwitch(
-                        value: selectedMode == 1,
-                        onChanged: (value) {
-                          setState(() {
-                            selectedMode = 1;
-                          });
-                        },
-                      ),
-                    ),
-                    Divider(
-                      color: DarkThemeUtil.multiColors(ColorConstants.dividerD9, darkColor: ColorConstants.darkBlackItemDivider),
-                      height: 0.5,
-                    ),
-                    ListTile(
-                      title: MyTextView(
-                        '深色模式',
-                        textColor: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white),
-                        fontSize: 16,
-                        isFontMedium: true,
-                      ),
-                      trailing: CupertinoSwitch(
-                        value: selectedMode == 2,
-                        onChanged: (value) {
-                          setState(() {
-                            selectedMode = 2;
-                          });
-                        },
-                      ),
-                    ),
-                  ],
-                  MyButton(
-                    text: "应 用".tr,
-                    textColor: ColorConstants.white,
-                    fontSize: 17,
-                    fontWeight: FontWeight.w700,
-                    backgroundColor: ColorConstants.appBlue,
-                    minHeight: 45,
-                    radius: 5,
-                    onPressed: () {
-                      switch (selectedMode) {
-                        case 1:
-                          SPUtil.putInt(AppConstant.storagedarkmodel, 1);
-                          ThemeConfig.changeThemeLight();
-                          break;
-                        case 2:
-                          SPUtil.putInt(AppConstant.storagedarkmodel, 2);
-                          ThemeConfig.changeThemeDark();
-                          break;
-                        default:
-                          SPUtil.putInt(AppConstant.storagedarkmodel, 0);
-                          Brightness currentBrightness = MediaQuery.of(context).platformBrightness;
-                          if (currentBrightness == Brightness.dark) {
-                            ThemeConfig.changeThemeDark();
-                          } else {
-                            ThemeConfig.changeThemeLight();
-                          }
-                          break;
-                      }
-                    },
-                  ).marginOnly(left: 28.5, right: 28.5, top: 48),
-                ],
-              ),
-            ),
-          ),
-        ));
-  }
-}

+ 0 - 40
packages/cpt_profile/lib/modules/me/form_filed/check_box_form_field.dart

@@ -1,40 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-
-class CheckBoxFormField extends FormField<bool> {
-  CheckBoxFormField({
-    FormFieldSetter<bool>? onSaved,
-    FormFieldValidator<bool>? validator,
-    bool? initialValue = false,
-    bool? autovalidate = false,
-    required Widget title,
-  }) : super(
-          onSaved: onSaved,
-          validator: validator,
-          initialValue: initialValue ?? false,
-          autovalidateMode: autovalidate! ? AutovalidateMode.always : AutovalidateMode.disabled,
-          builder: (FormFieldState<bool> field) {
-            return Column(
-              crossAxisAlignment: CrossAxisAlignment.start,
-              children: [
-                Row(
-                  mainAxisAlignment: MainAxisAlignment.start,
-                  crossAxisAlignment: CrossAxisAlignment.center,
-                  children: [
-                    Checkbox(
-                      value: field.value,
-                      onChanged: field.didChange,
-                    ),
-                    title,
-                  ],
-                ),
-                if (field.hasError)  //自定义错误信息
-                  Text(
-                    field.errorText!,
-                    style: const TextStyle(color: Colors.red, fontSize: 14),
-                  ).marginOnly(left: 15),
-              ],
-            );
-          },
-        );
-}

+ 0 - 18
packages/cpt_profile/lib/modules/me/form_filed/form_filed_controller.dart

@@ -1,18 +0,0 @@
-import 'package:get/get.dart';
-
-import 'form_filed_state.dart';
-
-class FormFiledController extends GetxController {
-  final FormFiledState state = FormFiledState();
-
-  @override
-  void onReady() {
-    super.onReady();
-  }
-
-  @override
-  void onClose() {
-    super.onClose();
-  }
-
-}

+ 0 - 271
packages/cpt_profile/lib/modules/me/form_filed/form_filed_page.dart

@@ -1,271 +0,0 @@
-
-import 'package:flutter/material.dart';
-import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
-import 'package:get/get.dart';
-import 'package:plugin_basic/base/base_state.dart';
-import 'package:plugin_basic/base/base_stateful_page.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:cs_resources/generated/assets.dart';
-import 'package:router/path/router_path.dart';
-import 'package:shared/utils/log_utils.dart';
-import 'package:widgets/ext/ex_widget.dart';
-import 'package:widgets/my_appbar.dart';
-import 'package:widgets/my_load_image.dart';
-import 'package:widgets/my_text_form_field.dart';
-import 'package:widgets/utils/dark_theme_util.dart';
-
-import 'check_box_form_field.dart';
-import 'form_filed_controller.dart';
-import 'form_filed_state.dart';
-
-class FormFiledPage extends BaseStatefulPage<FormFiledController> {
-  FormFiledPage({super.key});
-
-  //启动当前页面
-  static void startInstance() {
-    return Get.start(RouterPath.FORMFILED);
-  }
-
-  @override
-  FormFiledController createRawController() {
-    return FormFiledController();
-  }
-
-  @override
-  State<StatefulWidget> createState() => _FormFiledPageState();
-}
-
-class _FormFiledPageState extends BaseState<FormFiledPage, FormFiledController> {
-  // 创建一个 GlobalKey 用于获取 FormState 对象
-  final _formKey = GlobalKey<FormState>();
-  late FormFiledState state;
-
-  // 保存表单字段的值
-  String? _selectedOption;
-
-  List<String> resource = [
-    '谷歌',
-    '脸书',
-    '抖音',
-    '其他',
-  ];
-
-  @override
-  void initState() {
-    super.initState();
-    state = controller.state;
-  }
-
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-      appBar: MyAppBar.appBar(context, "Form表单提交"),
-      body: Padding(
-        padding: EdgeInsets.all(16.0),
-        child: autoCtlGetBuilder(builder: (controller) {
-          return Form(
-            key: _formKey, // 关联 GlobalKey
-            child: Column(
-              children: [
-
-                _buildInputLayout(
-                  "name",
-                  Assets.cptAuthLoginPhoneIcon,
-                  leftIconWidth: 13.5,
-                  leftIconHeight: 16,
-                  marginTop: 20,
-                  textInputType: TextInputType.phone,
-                  textInputAction: TextInputAction.next,
-                  onSaved: (value) {
-                    state.formData['name']!['value'] = value;
-                  },
-                ),
-
-                _buildInputLayout(
-                  "email",
-                  Assets.cptAuthLoginPasswordIcon,
-                  leftIconWidth: 13.5,
-                  leftIconHeight: 16,
-                  marginTop: 20,
-                  textInputType: TextInputType.phone,
-                  textInputAction: TextInputAction.next,
-                  onSaved: (value) {
-                    state.formData['email']!['value'] = value;
-                  },
-                ),
-
-                Container(
-                  margin: const EdgeInsets.only(left: 20, right: 20, top: 23),
-                  decoration: BoxDecoration(
-                    color: DarkThemeUtil.multiColors(ColorConstants.white, darkColor: ColorConstants.darkBlackItem),
-                    borderRadius: const BorderRadius.all(Radius.circular(5)),
-                    border: Border.all(color: ColorConstants.secondaryAppColor, width: 0.5),
-                  ),
-                  padding: const EdgeInsets.only(left: 16, right: 18, top: 2.5, bottom: 2.5),
-                  child: DropdownButtonFormField<String>(
-                    decoration: const InputDecoration(
-                      hintText: "请选择来源",
-                      hintStyle: TextStyle(
-                        fontSize: 14.0,
-                        fontWeight: FontWeight.w500,
-                      ),
-                      //左侧图片
-                      icon: null,
-                      border: InputBorder.none,
-                      //右图片
-                      suffixIcon: null,
-                      //框内,文本上面的提示文本
-                      labelText: null,
-                      errorText: null,
-                      //错误信息
-                      errorStyle: TextStyle(color: Colors.red, fontSize: 14),
-                    ),
-                    value: _selectedOption,
-                    style: TextStyle(
-                      color: DarkThemeUtil.multiColors(ColorConstants.tabTextBlack, darkColor: ColorConstants.white),
-                      fontSize: 15.0,
-                      fontWeight: FontWeight.w500,
-                    ),
-                    items: resource.map((String option) {
-                      return DropdownMenuItem<String>(
-                        value: option,
-                        child: Text(option), //如果想要图片加文本,在这里修改布局即可
-                      );
-                    }).toList(),
-                    onChanged: (value) {},
-                    onSaved: (value) {
-                      setState(() {
-                        _selectedOption = value;
-                      });
-                    },
-                    validator: (value) {
-                      if (value == null) {
-                        return 'Please select an option';
-                      }
-                      return null;
-                    },
-                  ),
-                ),
-
-                SizedBox(height: 16.0),
-
-                CheckBoxFormField(
-                  title: const Text('是否同意协议',style: TextStyle(color: Colors.black,fontSize: 14),),
-                  onSaved: (value) {
-                    // 处理保存逻辑
-                  },
-                  validator: (value) {
-                    // 处理校验逻辑
-                    if (value == false) {
-                      return '请勾选此选项';
-                    }
-                    return null;
-                  },
-                ),
-
-                SizedBox(height: 16.0),
-
-                ElevatedButton(
-                  onPressed: () {
-                    // 验证表单字段
-                    if (_formKey.currentState?.validate() == true) {
-                      //可以手动的设置错误文本
-                      state.formData['name']!['errorText'] = null;
-                      state.formData['email']!['errorText'] = null;
-                      controller.update();
-
-                      _formKey.currentState?.save(); //调用保存
-                      // 表单验证通过,可以提交表单
-                      _submitForm();
-                    } else {
-                      Log.e("校验不通过");
-                    }
-                  },
-                  child: const Text('提交'),
-                ),
-
-                ElevatedButton(
-                  onPressed: () {
-                    setState(() {
-                      _selectedOption = null;
-                    });
-                    _formKey.currentState?.reset(); //重置
-                  },
-                  child: const Text('重置'),
-                ),
-              ],
-            ),
-          );
-        }),
-      ),
-    );
-  }
-
-  void _submitForm() {
-    // 在这里执行表单提交的逻辑,例如发送网络请求等
-    print("当前的表单数据为:name:${state.formData['name']!['value']}  email:${state.formData['email']!['value']}");
-  }
-
-  Widget _buildInputLayout(
-    String key,
-    String leftIconRes, {
-    double leftIconWidth = 0,
-    double leftIconHeight = 0,
-    double marginTop = 23,
-    double paddingRight = 18,
-    bool? showRightIcon = false, //是否展示右侧的布局
-    Widget? rightWidget, //右侧的布局
-    TextInputType textInputType = TextInputType.text,
-    String? errorText,
-    TextInputAction textInputAction = TextInputAction.done,
-    String? Function(String? value)? validator, //自定义Form验证
-    String? Function(String? value)? onSaved, //Form的保存
-    Function? onSubmit,
-  }) {
-    return IgnoreKeyboardDismiss(
-      child: MyTextFormField(
-        key,
-        state.formData[key]!['value'],
-        hintText: state.formData[key]!['hintText'],
-        hintStyle: const TextStyle(
-          fontSize: 14.0,
-          fontWeight: FontWeight.w500,
-        ),
-        margin: EdgeInsets.only(left: 20, right: 20, top: marginTop),
-        showDivider: false,
-        fillBackgroundColor: DarkThemeUtil.multiColors(ColorConstants.white, darkColor: ColorConstants.darkBlackItem),
-        fillCornerRadius: 5,
-        padding: EdgeInsets.only(left: 16, right: paddingRight, top: 2.5, bottom: 2.5),
-        height: 50,
-        style: TextStyle(
-          color: DarkThemeUtil.multiColors(ColorConstants.tabTextBlack, darkColor: ColorConstants.white),
-          fontSize: 14.0,
-          fontWeight: FontWeight.w500,
-        ),
-        inputType: textInputType,
-        textInputAction: textInputAction,
-        onSubmit: onSubmit,
-        validator: validator ?? state.formData[key]!['validator'],
-        onSaved: onSaved,
-        cursorColor: ColorConstants.tabTextBlack,
-        obscureText: state.formData[key]!['obsecure'],
-        errorText: errorText ?? state.formData[key]!['errorText'],
-        showLeftIcon: true,
-        showRightIcon: showRightIcon,
-        rightWidget: rightWidget,
-        leftWidget: Row(
-          children: [
-            MyAssetImage(leftIconRes, width: leftIconWidth, height: leftIconHeight),
-            const Spacer(),
-            Container(
-              color: ColorConstants.graye5,
-              width: 1,
-              height: 15,
-            )
-          ],
-        ).constrained(width: 30),
-      ),
-    );
-  }
-}

+ 0 - 32
packages/cpt_profile/lib/modules/me/form_filed/form_filed_state.dart

@@ -1,32 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-
-class FormFiledState {
-//表单的校验与数据
-  Map<String, Map<String, dynamic>> formData = {
-    'name': {
-      'value': '',
-      'hintText': '请输入姓名',
-      'errorText': null,
-      'obsecure': false,
-      'validator': (value) {
-        if (value.isEmpty) {
-          return '请输入姓名';
-        }
-        return null;
-      },
-    },
-    'email': {
-      'value': '',
-      'hintText': '请输入邮箱',
-      'errorText': null,
-      'obsecure': false,
-      'validator': (value) {
-        if (value.isEmpty) {
-          return '请输入邮箱';
-        }
-        return null;
-      },
-    },
-  };
-}

+ 0 - 40
packages/cpt_profile/lib/modules/me/notification_enable/notification_enable_controller.dart

@@ -1,40 +0,0 @@
-
-import 'package:get/get.dart';
-import 'package:plugin_basic/constants/app_constant.dart';
-import 'package:plugin_basic/service/user_service.dart';
-import 'package:plugin_platform/engine/sp/sp_util.dart';
-
-class NotificationEnableController extends GetxController {
-
-  bool isSelected = true;
-
-  @override
-  void onReady() {
-    super.onReady();
-    isSelected = SPUtil.getBool(AppConstant.storageNotificationEnable, defValue: true) ?? true;
-    update();
-  }
-
-  void changed(bool checked) {
-    isSelected = checked;
-    SPUtil.putBool(AppConstant.storageNotificationEnable, checked);
-    update();
-
-    _resetRegistrationIdId(checked ? UserService.to.getRegistrationId : "null");
-  }
-
-  /// 调用接口重新设置 registrationId
-  void _resetRegistrationIdId(String registrationId) async {
-    // if (UserService.to.isLogin) {
-    //   //获取到数据
-    //   HttpResult result = await mainRepository.resetRegistrationId(registrationId);
-    //
-    //   //处理数据
-    //   if (result.isSuccess) {
-    //     Log.d("MainController 重置 registrationId 成功");
-    //   } else {
-    //     Log.d("MainController 重置 registrationId 失败:${result.errorMsg}");
-    //   }
-    // }
-  }
-}

+ 0 - 89
packages/cpt_profile/lib/modules/me/notification_enable/notification_enable_page.dart

@@ -1,89 +0,0 @@
-
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:permission_handler/permission_handler.dart';
-import 'package:plugin_basic/base/base_stateless_page.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:router/path/router_path.dart';
-import 'package:widgets/ext/ex_widget.dart';
-import 'package:widgets/my_appbar.dart';
-import 'package:widgets/my_text_view.dart';
-import 'package:widgets/utils/dark_theme_util.dart';
-
-import 'notification_enable_controller.dart';
-
-/*
-  是否接收消息推送
- */
-class NotificationEnablePage extends BaseStatelessPage<NotificationEnableController>{
-  NotificationEnablePage({super.key});
-
-  //启动当前页面
-  static void startInstance() {
-    return Get.start(RouterPath.NOTIFICATION_ENABLE);
-  }
-
-  @override
-  NotificationEnableController createRawController() {
-    return NotificationEnableController();
-  }
-
-  @override
-  void initState() {}
-
-  @override
-  Widget buildWidget(BuildContext context) {
-
-    return Scaffold(
-        backgroundColor: DarkThemeUtil.multiColors(ColorConstants.pageBg, darkColor: ColorConstants.darkBlackBg),
-        appBar: MyAppBar.appBar(context, "消息推送设置".tr),
-        body: SafeArea(
-          bottom: true,
-          top: false,
-          //真正的 Content 布局
-          child: Scrollbar(
-            child: SingleChildScrollView(
-              child: autoCtlGetBuilder(builder: (controller) {
-                return Column(
-                  mainAxisSize: MainAxisSize.max,
-                  crossAxisAlignment: CrossAxisAlignment.start,
-                  children: [
-                    ListTile(
-                      title: MyTextView(
-                        '系统推送设置',
-                        textColor: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white),
-                        fontSize: 16,
-                        isFontMedium: true,
-                      ).onTap(() {
-                        //打开应用设置
-                        openAppSettings();
-                      }),
-                    ),
-                    Divider(
-                      color: DarkThemeUtil.multiColors(ColorConstants.dividerD9, darkColor: ColorConstants.darkBlackItemDivider),
-                      height: 0.5,
-                    ),
-                    ListTile(
-                      title: MyTextView(
-                        '允许消息推送',
-                        textColor: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white),
-                        fontSize: 16,
-                        isFontMedium: true,
-                      ),
-                      trailing: CupertinoSwitch(
-                        value: controller.isSelected,
-                        onChanged: (value) {
-                          controller.changed(value);
-                        },
-                      ),
-                    ),
-                  ],
-                );
-              }),
-            ),
-          ),
-        ));
-  }
-}

+ 0 - 164
packages/cpt_profile/lib/modules/me/reset_password/reset_password_controller.dart

@@ -1,164 +0,0 @@
-import 'package:domain/repository/auth_repository.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
-import 'package:get/get.dart';
-import 'package:plugin_platform/http/http_result.dart';
-import 'package:shared/utils/ext_dart.dart';
-import 'package:shared/utils/log_utils.dart';
-import 'package:shared/utils/util.dart';
-import 'reset_password_state.dart';
-
-class ResetPasswordController extends GetxController {
-  final ResetPasswordState state = ResetPasswordState();
-  final AuthRepository authRepository = Get.find();
-
-  bool isChangedType = false;
-  String? oldPasswordErrorText; //表单的错误信息展示
-  String? passwordErrorText;
-  String? confirmPasswordErrorText;
-
-  String? oldPsd;
-  String? password;
-  String? confirmPsd;
-
-  /// 执行手机号码的绑定
-  void doResetPassword() {
-    oldPasswordErrorText = null;
-    passwordErrorText = null;
-    confirmPasswordErrorText = null;
-    update();
-
-    var oldPsdController = state.formData['old_password']!['controller'];
-    var passwordController = state.formData['password']!['controller'];
-    var confirmPsdController = state.formData['confirm_password']!['controller'];
-
-    oldPsd = oldPsdController.text;
-    password = passwordController.text;
-    confirmPsd = confirmPsdController.text;
-
-    Log.d('oldPsd:$oldPsd password:$password confirmPsd:$confirmPsd');
-
-    if (Utils.isEmpty(oldPsd) && isChangedType) {
-      oldPasswordErrorText = "旧密码不能为空";
-      update();
-    } else if (Utils.isEmpty(password)) {
-      passwordErrorText = "新密码不能为空";
-      update();
-    } else if (Utils.isEmpty(confirmPsd)) {
-      confirmPasswordErrorText = "确认新密码不能为空";
-      update();
-    } else if (password != confirmPsd) {
-      confirmPasswordErrorText = "确认密码不一致,请检查密码";
-      update();
-    } else {
-      _requestForgetPsd();
-    }
-  }
-
-  /// 请求接口,普通的密码注册
-  void _requestForgetPsd() async {
-    // //获取到数据
-    // SmartDialog.showLoading();
-    //
-    // HttpResult result;
-    // if (isChangedType) {
-    //   result = await authRepository.changePassword(oldPsd, password, confirmPsd);
-    // } else {
-    //   result = await authRepository.setPassword(password, confirmPsd);
-    // }
-    //
-    // SmartDialog.dismiss(status: SmartStatus.loading);
-    //
-    // //处理数据
-    // if (result.isSuccess) {
-    //   SmartDialog.showNotify(msg: isChangedType ? '修改密码成功'.tr : '设置密码成功'.tr, notifyType: NotifyType.success);
-    //
-    //   //发送通知刷新用户详情信息
-    //   bus.emit(AppConstant.eventProfile2Refresh, true);
-    //
-    //   //成功了返回
-    //   Get.back();
-    // } else {
-    //   _handleErrorMessage(result);
-    // }
-  }
-
-  /// 处理网络请求注册的表单错误
-  void _handleErrorMessage(HttpResult<dynamic> result) {
-    String? errorMessage = result.errorMsg;
-    SmartDialog.showToast(errorMessage ?? '修改出错误了');
-
-    Map<String, dynamic>? json = result.getErrorJson();
-    handleFormError(json, 'old_password', (str) {
-      oldPasswordErrorText = str;
-    });
-    handleFormError(json, 'password', (str) {
-      passwordErrorText = str;
-    });
-    handleFormError(json, 'password_confirmation', (str) {
-      confirmPasswordErrorText = str;
-    });
-  }
-
-  // =========================== 焦点控制 ===========================
-
-  FocusNode? _oldPsdFocusNode;
-  FocusNode? _passwordFocusNode;
-  FocusNode? _confirmPsdFocusNode;
-
-  void _onPhoneFocusChange() {
-    if (_oldPsdFocusNode?.hasFocus == true) {
-      oldPasswordErrorText = null;
-      update();
-    }
-  }
-
-  void _onPasswordFocusChange() {
-    if (_passwordFocusNode?.hasFocus == true) {
-      passwordErrorText = null;
-      update();
-    }
-  }
-
-  void _onNewPasswordFocusChange() {
-    if (_confirmPsdFocusNode?.hasFocus == true) {
-      confirmPasswordErrorText = null;
-      update();
-    }
-  }
-
-  @override
-  void onInit() {
-    super.onInit();
-    _oldPsdFocusNode = state.formData['old_password']!['focusNode'];
-    _passwordFocusNode = state.formData['password']!['focusNode'];
-    _confirmPsdFocusNode = state.formData['confirm_password']!['focusNode'];
-
-    isChangedType = Get.arguments['type'] == 'change';
-    update();
-  }
-
-  @override
-  void onReady() {
-    super.onReady();
-    _oldPsdFocusNode?.addListener(_onPhoneFocusChange);
-    _passwordFocusNode?.addListener(_onPasswordFocusChange);
-    _confirmPsdFocusNode?.addListener(_onNewPasswordFocusChange);
-  }
-
-  @override
-  void onClose() {
-    super.onClose();
-    _oldPsdFocusNode?.removeListener(_onPhoneFocusChange);
-    _passwordFocusNode?.removeListener(_onPasswordFocusChange);
-    _confirmPsdFocusNode?.removeListener(_onNewPasswordFocusChange);
-    _oldPsdFocusNode = null;
-    _passwordFocusNode = null;
-    _confirmPsdFocusNode = null;
-  }
-
-  bool valid(String text) {
-    final isValid = RegExp(r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$').hasMatch(text);
-    return isValid;
-  }
-}

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

@@ -1,183 +0,0 @@
-
-import 'package:flutter/material.dart';
-import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
-import 'package:get/get.dart';
-import 'package:plugin_basic/base/base_stateless_page.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:cs_resources/generated/assets.dart';
-import 'package:router/path/router_path.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/utils/dark_theme_util.dart';
-import 'reset_password_controller.dart';
-import 'reset_password_state.dart';
-
-/// 分为设置密码 与 修改密码 两种模式
-class ResetPasswordPage extends BaseStatelessPage<ResetPasswordController> {
-  ResetPasswordPage({Key? key}) : super(key: key);
-
-  //启动当前页面
-  static void startInstance(String? type) {
-    return Get.start(RouterPath.RESETPASSWORD, arguments: {'type': type});
-  }
-
-  late ResetPasswordState state;
-
-  @override
-  ResetPasswordController createRawController() {
-    return ResetPasswordController();
-  }
-
-  @override
-  void initState() {
-    state = controller.state;
-  }
-
-  @override
-  Widget buildWidget(BuildContext context) {
-    return autoCtlGetBuilder(builder: (controller) {
-      return Scaffold(
-          appBar: MyAppBar.appBar(context, controller.isChangedType ? "修改密码".tr : "设置密码".tr),
-          body: SafeArea(
-            bottom: true,
-            top: false,
-            child: SizedBox(
-              width: double.infinity,
-              child: SingleChildScrollView(
-                scrollDirection: Axis.vertical,
-                physics: const BouncingScrollPhysics(),
-                child: Column(
-                  mainAxisSize: MainAxisSize.max,
-                  crossAxisAlignment: CrossAxisAlignment.center,
-                  children: [
-                    //旧密码
-                    Visibility(
-                      visible: controller.isChangedType, // 设置为 false 表示隐藏控件
-                      child: _buildInputLayout(
-                        "old_password",
-                        Assets.cptAuthLoginPasswordIcon,
-                        leftIconWidth: 13.5,
-                        leftIconHeight: 16,
-                        marginTop: 20,
-                        textInputAction: TextInputAction.next,
-                        errorText: controller.oldPasswordErrorText,
-                        onSubmit: (formKey, value) {
-                          state.formData[formKey]!['focusNode'].unfocus();
-                          FocusScope.of(context).requestFocus(state.formData['old_password']!['focusNode']);
-                        },
-                      ),
-                    ),
-
-                    //新密码
-                    _buildInputLayout(
-                      "password",
-                      Assets.cptAuthLoginPasswordIcon,
-                      leftIconWidth: 13.5,
-                      leftIconHeight: 16,
-                      marginTop: 10,
-                      textInputAction: TextInputAction.next,
-                      errorText: controller.passwordErrorText,
-                      onSubmit: (formKey, value) {
-                        state.formData[formKey]!['focusNode'].unfocus();
-                        FocusScope.of(context).requestFocus(state.formData['confirm_password']!['focusNode']);
-                      },
-                    ),
-
-                    //再次新密码
-                    _buildInputLayout(
-                      "confirm_password",
-                      Assets.cptAuthLoginPasswordIcon,
-                      leftIconWidth: 13.5,
-                      leftIconHeight: 16,
-                      marginTop: 10,
-                      errorText: controller.confirmPasswordErrorText,
-                      onSubmit: (formKey, value) {
-                        state.formData[formKey]!['focusNode'].unfocus();
-                        controller.doResetPassword();
-                      },
-                    ),
-
-                    //登录按钮
-                    MyButton(
-                      text: "提交".tr,
-                      textColor: ColorConstants.whitefe,
-                      fontSize: 16,
-                      fontWeight: FontWeight.w700,
-                      backgroundColor: ColorConstants.appBlue,
-                      minHeight: 50,
-                      radius: 5,
-                      onPressed: () => controller.doResetPassword(),
-                    ).marginOnly(left: 20, right: 20, top: 28, bottom: 43),
-                  ],
-                ),
-              ),
-            ),
-          ));
-    });
-  }
-
-  /// 手机号码与验证码的输入框
-  _buildInputLayout(
-    String key,
-    String leftIconRes, {
-    double leftIconWidth = 0,
-    double leftIconHeight = 0,
-    double marginTop = 23,
-    double paddingRight = 18,
-    bool? showRightIcon = false, //是否展示右侧的布局
-    Widget? rightWidget, //右侧的布局
-    TextInputType textInputType = TextInputType.text,
-    String? errorText,
-    TextInputAction textInputAction = TextInputAction.done,
-    Function? onSubmit,
-  }) {
-    return IgnoreKeyboardDismiss(
-      child: MyTextField(
-        key,
-        state.formData[key]!['value'],
-        hintText: state.formData[key]!['hintText'],
-        hintStyle: const TextStyle(
-          fontSize: 14.0,
-          fontWeight: FontWeight.w500,
-        ),
-        controller: state.formData[key]!['controller'],
-        focusNode: state.formData[key]!['focusNode'],
-        margin: EdgeInsets.only(left: 20, right: 20, top: marginTop),
-        showDivider: false,
-        fillBackgroundColor: DarkThemeUtil.multiColors(ColorConstants.white, darkColor: ColorConstants.darkBlackItem),
-        fillCornerRadius: 5,
-        padding: EdgeInsets.only(left: 16, right: paddingRight, top: 2.5, bottom: 2.5),
-        height: 50,
-        style: TextStyle(
-          color: DarkThemeUtil.multiColors(ColorConstants.tabTextBlack, darkColor: ColorConstants.white),
-          fontSize: 14.0,
-          fontWeight: FontWeight.w500,
-        ),
-        inputType: textInputType,
-        textInputAction: textInputAction,
-        onSubmit: onSubmit,
-        cursorColor: ColorConstants.tabTextBlack,
-        obscureText: state.formData[key]!['obsecure'],
-        errorText: errorText,
-        showLeftIcon: true,
-        showRightIcon: showRightIcon,
-        rightWidget: rightWidget,
-        leftWidget: Row(
-          children: [
-            MyAssetImage(leftIconRes, width: leftIconWidth, height: leftIconHeight),
-            const Spacer(),
-            Container(
-              color: ColorConstants.graye5,
-              width: 1,
-              height: 15,
-            )
-          ],
-        ).constrained(width: 30),
-      ),
-    );
-  }
-}

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

@@ -1,29 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-
-class ResetPasswordState {
-//表单的校验与数据
-  Map<String, Map<String, dynamic>> formData = {
-    'old_password': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': '请输入旧密码'.tr,
-      'obsecure': true,
-    },
-    'password': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': '请输入新密码'.tr,
-      'obsecure': true,
-    },
-    'confirm_password': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': '请再次输入新密码'.tr,
-      'obsecure': true,
-    },
-  };
-}

+ 0 - 73
packages/cpt_profile/lib/modules/me/setting/setting_controller.dart

@@ -1,73 +0,0 @@
-
-import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
-import 'package:get/get.dart';
-import 'package:plugin_platform/engine/directory/directory_util.dart';
-import 'package:shared/utils/util.dart';
-import 'package:widgets/dialog/app_default_dialog.dart';
-
-import 'setting_state.dart';
-
-class SettingController extends GetxController {
-
-  final SettingState state = SettingState();
-
-  /// 退出登录的弹窗
-  Future<void> showLogoutDialog() async {
-    SmartDialog.show(
-      usePenetrate: false,
-      keepSingle :true,
-      builder: (context) =>
-          AppDefaultDialog(
-            "你确定你要退出登录吗?".tr,
-            confirmAction: () {
-              // 调用接口退出登录
-              _userLogout();
-            },
-          ),
-    );
-  }
-
-  /// 调用接口退出登录
-  void _userLogout() async {
-    // SmartDialog.showLoading();
-    // HttpResult result = await mainRepository.userLogout();
-    // SmartDialog.dismiss(status: SmartStatus.loading);
-    //
-    // //处理数据
-    // if (result.isSuccess) {
-    //   Log.d("退出登录 => 成功");
-    //   UserService.to.handleLogoutParams();
-    //   Get.offAllNamed(RouterPath.AUTH_LOGIN); //关闭全部页面进入登录页面,不能改
-    // } else {
-    //   Log.d("退出登录 => 失败:${result.errorMsg}");
-    // }
-  }
-
-  @override
-  void onReady() {
-    super.onReady();
-    calculateCacheSize();
-  }
-
-  //计算当前 App 的 Cache 缓存
-  void calculateCacheSize() async {
-    final size = await DirectoryUtil.getAppCacheSize();
-    state.appSize = DirectoryUtil.formatBytes(size);
-    update();
-  }
-
-  //清除缓存
-  void clearCache() async {
-    SmartDialog.show(
-      usePenetrate: false,
-      builder: (context) => AppDefaultDialog(
-        "你确定你要清除应用缓存吗?".tr,
-        confirmAction: () async {
-          await DirectoryUtil.clearAppCache();
-          state.appSize = '0 B';
-          update();
-        },
-      ),
-    );
-  }
-}

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

@@ -1,161 +0,0 @@
-import 'package:cpt_profile/modules/me/setting/setting_state.dart';
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:plugin_basic/base/base_state.dart';
-import 'package:plugin_basic/base/base_stateful_page.dart';
-import 'package:plugin_basic/service/app_config_service.dart';
-import 'package:plugin_basic/service/user_service.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:router/path/router_path.dart';
-import 'package:shared/utils/log_utils.dart';
-import 'package:widgets/ext/ex_widget.dart';
-import 'package:widgets/my_appbar.dart';
-import 'package:widgets/utils/dark_theme_util.dart';
-import '../dark_model/dark_model_page.dart';
-import '../notification_enable/notification_enable_page.dart';
-import '../reset_password/reset_password_page.dart';
-import 'setting_controller.dart';
-
-class SettingPage extends BaseStatefulPage<SettingController> {
-  SettingPage({super.key});
-
-  //启动当前页面
-  static void startInstance() {
-    return Get.start(RouterPath.SETTING);
-  }
-
-  @override
-  State<SettingPage> createState() => _SettingPageState();
-
-  @override
-  SettingController createRawController() {
-    return SettingController();
-  }
-}
-
-class _SettingPageState extends BaseState<SettingPage, SettingController> {
-  late SettingState state;
-
-  @override
-  void initState() {
-    super.initState();
-    state = controller.state;
-  }
-
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-        appBar: MyAppBar.appBar(context, "设置".tr),
-        body: SafeArea(
-          bottom: true,
-          top: false,
-          //真正的 Content 布局
-          child: Scrollbar(
-            child: SingleChildScrollView(
-              child: Container(
-                margin: const EdgeInsets.symmetric(horizontal: 15, vertical: 10),
-                decoration: BoxDecoration(
-                  color: DarkThemeUtil.multiColors(ColorConstants.white, darkColor: ColorConstants.darkBlackItem),
-                  borderRadius: BorderRadius.circular(10),
-                  boxShadow: [
-                    BoxShadow(color: hexToColor('#000000', opacity: 0.1), blurRadius: 7),
-                  ],
-                ),
-                child: Column(
-                  mainAxisSize: MainAxisSize.min,
-                  children: [
-                    Obx(() {
-                      return _buildItem(
-                        '实名认证'.tr,
-                        state.getVerifyStatusText(UserService.to.getUserProfile.name),
-                        () async {
-                          Log.d("进入实名认证页面");
-                        },
-                      );
-                    }),
-                    Obx(() {
-                      return _buildItem(UserService.to.passwordType.value == 'change' ? '修改密码'.tr : '设置密码'.tr, '', () {
-                        ResetPasswordPage.startInstance(UserService.to.passwordType.value);
-                      });
-                    }),
-                    _buildItem('修改手机号'.tr, '', () {
-                      Get.toNamed(RouterPath.CHANGEMOBILE);
-                    }),
-                    _buildItem('深色模式'.tr, '', () {
-                      DarkModelPage.startInstance();
-                    }),
-                    _buildItem('消息推送'.tr, '', () {
-                      NotificationEnablePage.startInstance();
-                    }),
-                    autoCtlGetBuilder(builder: (controller) {
-                      return _buildItem('清除缓存'.tr, state.appSize, () {
-                        controller.clearCache();
-                      }, isShowNextIcon: false);
-                    }),
-                    _buildItem('版本号'.tr, 'v ${ConfigService.to.version}', () {}, isShowNextIcon: false),
-                    Container(
-                      height: 40,
-                      width: double.infinity,
-                      margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 25),
-                      color: hexToColor('#0689FB'),
-                      child: Center(
-                        child: Text("退出".tr, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: Colors.white)),
-                      ),
-                    ).onTap(() {
-                      controller.showLogoutDialog();
-                    })
-                  ],
-                ),
-              ),
-            ),
-          ),
-        ));
-  }
-
-  Widget _buildItem(String title, String des, VoidCallback action, {bool isShowNextIcon = true}) {
-    return GestureDetector(
-      behavior: HitTestBehavior.opaque,
-      onTap: () {
-        action();
-      },
-      child: Container(
-        padding: const EdgeInsets.symmetric(horizontal: 20),
-        child: Column(
-          children: [
-            Container(
-              padding: const EdgeInsets.symmetric(vertical: 15),
-              child: Row(
-                children: [
-                  Text(
-                    title.tr,
-                    style: TextStyle(
-                        fontSize: 14,
-                        fontWeight: FontWeight.w500,
-                        color: DarkThemeUtil.multiColors(ColorConstants.black, darkColor: ColorConstants.white)),
-                  ),
-                  const Spacer(),
-                  Visibility(
-                    visible: des.isNotEmpty,
-                    child: Text(
-                      des.tr,
-                      style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: hexToColor('#0689FB')),
-                    ),
-                  ),
-                  Visibility(
-                    visible: isShowNextIcon,
-                    child: Icon(Icons.navigate_next_sharp, size: 20, color: hexToColor('#CCCCCC')),
-                  ),
-                ],
-              ),
-            ),
-            Divider(
-              color: DarkThemeUtil.multiColors(hexToColor('#EDEDED'), darkColor: ColorConstants.darkBlackItemDivider),
-              height: 0.5,
-            )
-          ],
-        ),
-      ),
-    );
-  }
-}

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

@@ -1,20 +0,0 @@
-class SettingState {
-  String appSize = "0 B";
-
-  /// 获取认证状态文字
-  String getVerifyStatusText(String? realNameStatus) {
-    if (realNameStatus == null) {
-      return "去认证";
-    } else if (realNameStatus.toString() == "0") {
-      return "等待审核";
-    } else if (realNameStatus.toString() == "1") {
-      return "已认证";
-    } else if (realNameStatus.toString() == "2") {
-      return "认证失败";
-    } else if (realNameStatus.toString() == "3") {
-      return "实名信息已过期,请重新认证";
-    } else {
-      return "";
-    }
-  }
-}

+ 0 - 54
packages/cpt_profile/lib/router/page_router.dart

@@ -1,54 +0,0 @@
-
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:router/path/router_path.dart';
-
-import '../modules/me/change_mobile/change_mobile_page.dart';
-import '../modules/me/dark_model/dark_model_page.dart';
-import '../modules/me/form_filed/form_filed_page.dart';
-import '../modules/me/notification_enable/notification_enable_page.dart';
-import '../modules/me/reset_password/reset_password_page.dart';
-import '../modules/me/setting/setting_page.dart';
-
-class ProfilePageRouter {
-
-  static final routes = [
-
-    //设置页面
-    GetPage(
-      name: RouterPath.SETTING,
-      page: () => SettingPage(),
-    ),
-
-    //忘记密码
-    GetPage(
-      name: RouterPath.RESETPASSWORD,
-      page: () => ResetPasswordPage(),
-    ),
-
-    //暗黑模式页面
-    GetPage(
-      name: RouterPath.DARK_MODEL,
-      page: () => DarkModelPage(),
-    ),
-
-    //修改手机号码
-    GetPage(
-      name: RouterPath.CHANGEMOBILE,
-      page: () => ChangeMobilePage(),
-    ),
-
-    //表单提交页面
-    GetPage(
-      name: RouterPath.FORMFILED,
-      page: () => FormFiledPage(),
-    ),
-
-    //通知页面
-    GetPage(
-      name: RouterPath.NOTIFICATION_ENABLE,
-      page: () => NotificationEnablePage(),
-    ),
-
-  ];
-}

+ 31 - 0
packages/cpt_report/.gitignore

@@ -0,0 +1,31 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+*.lock
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Visual Studio Code related
+.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+proguardMapping.txt

+ 12 - 0
packages/cpt_report/lib/router/page_router.dart

@@ -0,0 +1,12 @@
+
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:router/path/router_path.dart';
+
+class LabourPageRouter {
+
+  static final routes = [
+
+
+  ];
+}

+ 20 - 0
packages/cpt_report/lib/router/report_service_impl.dart

@@ -0,0 +1,20 @@
+import 'package:plugin_basic/basic_export.dart';
+import 'package:router/componentRouter/report_service.dart';
+import 'package:shared/utils/log_utils.dart';
+
+class ReportServiceImpl extends GetxService implements ReportService {
+
+  @override
+  void onInit() {
+    super.onInit();
+    //初始化资源
+    Log.d("ProfileServiceImpl 初始化资源");
+  }
+
+  @override
+  void onClose() {
+    super.onClose();
+    //销毁资源
+    Log.d("ProfileServiceImpl 销毁资源");
+  }
+}

+ 40 - 0
packages/cpt_report/pubspec.yaml

@@ -0,0 +1,40 @@
+name: cpt_report
+description: ProfileComponent Profile-Me组件
+
+version: 1.0.0
+
+environment:
+  sdk: '>=3.0.2 <4.0.0'
+
+dependencies:
+
+  flutter_localizations:
+    sdk: flutter
+
+  flutter:
+    sdk: flutter
+
+  #基础组件的依赖
+  domain:
+    path: ../cs_domain
+
+  plugin_basic:
+    path: ../cs_plugin_basic
+
+  plugin_platform:
+    path: ../cs_plugin_platform
+
+  shared:
+    path: ../cs_shared
+
+  cs_resources:
+    path: ../cs_resources
+
+  router:
+    path: ../cs_router
+
+  widgets:
+    path: ../cs_widgets
+
+flutter:
+  uses-material-design: true

BIN
packages/cs_resources/assets/base_service/page_load_error.png


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


BIN
packages/cs_resources/assets/base_service/page_no_data.png


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


BIN
packages/cs_resources/assets/cpt_auth/checkbox_choose.webp


BIN
packages/cs_resources/assets/cpt_auth/checkbox_unchoose.webp


BIN
packages/cs_resources/assets/cpt_auth/down_arraw_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_apple_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_line_bg.webp


BIN
packages/cs_resources/assets/cpt_auth/login_logo_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_password_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_password_invis_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_password_vis_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_phone_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_qq_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_top_bg.webp


BIN
packages/cs_resources/assets/cpt_auth/login_top_bg_dark.webp


BIN
packages/cs_resources/assets/cpt_auth/login_verify_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/login_wx_icon.webp


BIN
packages/cs_resources/assets/cpt_auth/signup_invite_icon.webp


BIN
packages/cs_resources/assets/cpt_profile/close_account.png


BIN
packages/cs_resources/assets/cpt_profile/home_close_account.png


BIN
packages/cs_resources/assets/cpt_profile/home_help_center.png


BIN
packages/cs_resources/assets/cpt_profile/home_invite_friends.png


BIN
packages/cs_resources/assets/cpt_profile/home_me_top_bg.webp


BIN
packages/cs_resources/assets/cpt_profile/home_next.png


BIN
packages/cs_resources/assets/cpt_profile/home_personal_info.png


BIN
packages/cs_resources/assets/cpt_profile/home_settings.png


BIN
packages/cs_resources/assets/cpt_profile/home_work_training.png


BIN
packages/cs_resources/assets/cpt_profile/idcard_back.png


BIN
packages/cs_resources/assets/cpt_profile/idcard_front.png


BIN
packages/cs_resources/assets/cpt_profile/real_auth.png


BIN
packages/cs_resources/assets/cpt_profile/real_auth_success.png


BIN
packages/cs_resources/assets/cpt_profile/reset_confirm_password.png


BIN
packages/cs_resources/assets/cpt_profile/reset_password_lock.png


+ 2 - 33
packages/cs_resources/lib/generated/assets.dart

@@ -8,38 +8,7 @@ class Assets {
   static const String baseLibDialogDeleteIcon = 'assets/base_lib/dialog_delete_icon.webp';
   static const String baseLibImgDefaultPlaceholder = 'assets/base_lib/img_default_placeholder.webp';
   static const String baseLibWhiteBack = 'assets/base_lib/white_back.webp';
-  static const String baseServicePageLoadError = 'assets/base_service/page_load_error.png';
-  static const String baseServicePageNoData = 'assets/base_service/page_no_data.png';
-  static const String cptAuthCheckboxChoose = 'assets/cpt_auth/checkbox_choose.webp';
-  static const String cptAuthCheckboxUnchoose = 'assets/cpt_auth/checkbox_unchoose.webp';
-  static const String cptAuthDownArrawIcon = 'assets/cpt_auth/down_arraw_icon.webp';
-  static const String cptAuthLoginAppleIcon = 'assets/cpt_auth/login_apple_icon.webp';
-  static const String cptAuthLoginLineBg = 'assets/cpt_auth/login_line_bg.webp';
-  static const String cptAuthLoginLogoIcon = 'assets/cpt_auth/login_logo_icon.webp';
-  static const String cptAuthLoginPasswordIcon = 'assets/cpt_auth/login_password_icon.webp';
-  static const String cptAuthLoginPasswordInvisIcon = 'assets/cpt_auth/login_password_invis_icon.webp';
-  static const String cptAuthLoginPasswordVisIcon = 'assets/cpt_auth/login_password_vis_icon.webp';
-  static const String cptAuthLoginPhoneIcon = 'assets/cpt_auth/login_phone_icon.webp';
-  static const String cptAuthLoginQqIcon = 'assets/cpt_auth/login_qq_icon.webp';
-  static const String cptAuthLoginTopBg = 'assets/cpt_auth/login_top_bg.webp';
-  static const String cptAuthLoginTopBgDark = 'assets/cpt_auth/login_top_bg_dark.webp';
-  static const String cptAuthLoginVerifyIcon = 'assets/cpt_auth/login_verify_icon.webp';
-  static const String cptAuthLoginWxIcon = 'assets/cpt_auth/login_wx_icon.webp';
-  static const String cptAuthSignupInviteIcon = 'assets/cpt_auth/signup_invite_icon.webp';
-  static const String cptProfileCloseAccount = 'assets/cpt_profile/close_account.png';
-  static const String cptProfileHomeCloseAccount = 'assets/cpt_profile/home_close_account.png';
-  static const String cptProfileHomeHelpCenter = 'assets/cpt_profile/home_help_center.png';
-  static const String cptProfileHomeInviteFriends = 'assets/cpt_profile/home_invite_friends.png';
-  static const String cptProfileHomeMeTopBg = 'assets/cpt_profile/home_me_top_bg.webp';
-  static const String cptProfileHomeNext = 'assets/cpt_profile/home_next.png';
-  static const String cptProfileHomePersonalInfo = 'assets/cpt_profile/home_personal_info.png';
-  static const String cptProfileHomeSettings = 'assets/cpt_profile/home_settings.png';
-  static const String cptProfileHomeWorkTraining = 'assets/cpt_profile/home_work_training.png';
-  static const String cptProfileIdcardBack = 'assets/cpt_profile/idcard_back.png';
-  static const String cptProfileIdcardFront = 'assets/cpt_profile/idcard_front.png';
-  static const String cptProfileRealAuth = 'assets/cpt_profile/real_auth.png';
-  static const String cptProfileRealAuthSuccess = 'assets/cpt_profile/real_auth_success.png';
-  static const String cptProfileResetConfirmPassword = 'assets/cpt_profile/reset_confirm_password.png';
-  static const String cptProfileResetPasswordLock = 'assets/cpt_profile/reset_password_lock.png';
+  static const String baseServicePageLoadError = 'assets/base_service/page_load_error.webp';
+  static const String baseServicePageNoData = 'assets/base_service/page_no_data.webp';
 
 }

+ 0 - 2
packages/cs_resources/pubspec.yaml

@@ -24,5 +24,3 @@ flutter:
     - assets/
     - assets/base_lib/
     - assets/base_service/
-    - assets/cpt_auth/
-    - assets/cpt_profile/

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

@@ -1,6 +1,6 @@
 /**
- * Auth组件对应的路由抽象接口
+ * Auth 组件对应的路由抽象接口
  */
 abstract class AuthService {
-  Future gotoLoginPage();
+
 }

+ 12 - 9
packages/cs_router/lib/componentRouter/component_router_service.dart

@@ -1,8 +1,9 @@
 import 'package:get/get.dart';
-import 'package:router/componentRouter/profile_service.dart';
+import 'package:router/componentRouter/auth_service.dart';
+import 'package:router/componentRouter/labour_service.dart';
 
-import 'auth_service.dart';
-import 'mall_service.dart';
+import 'job_service.dart';
+import 'report_service.dart';
 
 /**
  * 全局的组件路由服务,记得在 main.dart 中注入
@@ -17,14 +18,16 @@ class ComponentRouterServices{
 
   ComponentRouterServices._internal();
 
-  //获取 Profile 组件的服务
-  static ProfileService get profileService => Get.find();
+  //获取 Labour 组件的服务
+  static LabourService get labourService => Get.find();
 
-  //获取 Auth 组件的服务
-  static AuthService get authService => Get.find();
+  //获取 Job 组件的服务
+  static JobService get jobService => Get.find();
 
-  //获取 Mall 组件的服务
-  static MallService get mallService => Get.find();
+  //获取 Report 组件的服务
+  static ReportService get reportService => Get.find();
 
+  //获取 Auth 组件服务
+  static AuthService get authService => Get.find();
 
 }

+ 6 - 0
packages/cs_router/lib/componentRouter/job_service.dart

@@ -0,0 +1,6 @@
+/**
+ * Job组件对应的路由抽象接口
+ */
+abstract class JobService {
+
+}

+ 7 - 0
packages/cs_router/lib/componentRouter/labour_service.dart

@@ -0,0 +1,7 @@
+
+/**
+ * Labour组件对应的路由抽象接口
+ */
+abstract class LabourService {
+  Future<bool> isUserLogin();
+}

+ 0 - 6
packages/cs_router/lib/componentRouter/mall_service.dart

@@ -1,6 +0,0 @@
-/**
- * Mall组件对应的路由抽象接口
- */
-abstract class MallService {
-  Future<String> getMallCount();
-}

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

@@ -1,7 +0,0 @@
-
-/**
- * Profile组件对应的路由抽象接口
- */
-abstract class ProfileService {
-  Future<bool> isUserLogin();
-}

+ 6 - 0
packages/cs_router/lib/componentRouter/report_service.dart

@@ -0,0 +1,6 @@
+/**
+ * Report组件对应的路由抽象接口
+ */
+abstract class ReportService {
+
+}