Browse Source

Merge branch 'dev' of http://git.wmzhubo.com/guadoutech/YYHome into dev

jiangwei 1 week ago
parent
commit
d23bcdf824
100 changed files with 1404 additions and 647 deletions
  1. 9 1
      app/android/app/build.gradle
  2. 29 0
      app/android/app/google-services.json
  3. 3 0
      app/android/settings.gradle
  4. 58 0
      app/lib/firebase_options.dart
  5. 5 0
      app/lib/main.dart
  6. 3 3
      melos.yaml
  7. 1 1
      packages/cpt_community/lib/components/garage_card.dart
  8. 1 1
      packages/cpt_community/lib/components/newfeed_card_header.dart
  9. 10 8
      packages/cpt_community/lib/modules/community/community_page.dart
  10. 2 1
      packages/cpt_community/lib/modules/community/following/following_page.dart
  11. 2 1
      packages/cpt_community/lib/modules/community/foryou/foryou_page.dart
  12. 5 3
      packages/cpt_community/lib/modules/community/news/news_page.dart
  13. 7 6
      packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_page.dart
  14. 7 5
      packages/cpt_community/lib/modules/community/newsfeed_post/newsfeed_post_page.dart
  15. 4 2
      packages/cpt_community/lib/modules/community/newsfeed_tabs.dart
  16. 3 2
      packages/cpt_community/lib/modules/garage/for_rent/for_rent_page.dart
  17. 3 2
      packages/cpt_community/lib/modules/garage/for_sale/for_sale_page.dart
  18. 4 3
      packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_page.dart
  19. 8 4
      packages/cpt_community/lib/modules/my_following/components/item_following.dart
  20. 34 4
      packages/cpt_community/lib/modules/my_following/components/item_following_vm.dart
  21. 8 6
      packages/cpt_community/lib/modules/my_following/my_follow/my_follow_page.dart
  22. 1 1
      packages/cpt_community/lib/modules/my_following/my_follow/my_follow_vm.dart
  23. 4 4
      packages/cpt_community/lib/modules/my_following/my_follower/my_follower_page.dart
  24. 2 1
      packages/cpt_community/lib/modules/my_following/my_following_page.dart
  25. 5 2
      packages/cpt_community/lib/modules/my_following/my_following_tabs.dart
  26. 2 1
      packages/cpt_community/lib/modules/my_posts/components/my_posts_sale_rent_item.dart
  27. 2 1
      packages/cpt_community/lib/modules/my_posts/my_posts_forrent/my_posts_forrent_page.dart
  28. 2 1
      packages/cpt_community/lib/modules/my_posts/my_posts_forsale/my_posts_forsale_page.dart
  29. 2 1
      packages/cpt_community/lib/modules/my_posts/my_posts_newsfeed/my_posts_newsfeed_page.dart
  30. 3 1
      packages/cpt_community/lib/modules/my_posts/my_posts_page.dart
  31. 10 0
      packages/cpt_facility/lib/modules/booking/facility_booking_view_model.dart
  32. 6 0
      packages/cpt_facility/lib/router/component/facility_component_service.dart
  33. 52 15
      packages/cpt_form/lib/modules/apply/form_terms_page.dart
  34. 14 3
      packages/cpt_form/lib/modules/apply/vm/apply_view_model.dart
  35. 1 1
      packages/cpt_form/lib/modules/apply/vm/apply_view_model.g.dart
  36. 6 12
      packages/cpt_form/lib/modules/detail/detail_approved_fragment.dart
  37. 10 17
      packages/cpt_form/lib/modules/detail/detail_not_approved_fragment.dart
  38. 4 5
      packages/cpt_form/lib/modules/detail/detail_processing_fragment.dart
  39. 1 1
      packages/cpt_form/lib/modules/detail/form_detail_view_model.g.dart
  40. 3 2
      packages/cpt_form/lib/modules/form/apply/form_apply_screen.dart
  41. 1 1
      packages/cpt_form/lib/modules/form/approve/form_approve_view_model.g.dart
  42. 1 1
      packages/cpt_form/lib/modules/form/submit/form_submit_view_model.g.dart
  43. 6 0
      packages/cpt_form/lib/router/component/form_component_service.dart
  44. 16 10
      packages/cpt_form/lib/router/page/form_page_router.gr.dart
  45. 1 0
      packages/cpt_main/lib/modules/home/home_page.dart
  46. 1 0
      packages/cpt_main/lib/modules/home/latest_news/property/latest_news_property_view_model.dart
  47. 26 0
      packages/cpt_main/lib/modules/main/main_view_model.dart
  48. 5 5
      packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_page.dart
  49. 3 3
      packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart
  50. 3 1
      packages/cpt_payment/lib/modules/payment/history/history_list_screen.dart
  51. 3 2
      packages/cpt_payment/lib/modules/payment/history/history_list_state.dart
  52. 80 71
      packages/cpt_payment/lib/modules/payment/history/history_list_view_model.dart
  53. 1 1
      packages/cpt_payment/lib/modules/payment/history/history_list_view_model.g.dart
  54. 46 87
      packages/cpt_payment/lib/modules/payment/history/item_history_list.dart
  55. 55 16
      packages/cpt_payment/lib/modules/payment/payment/item_payment_list.dart
  56. 4 1
      packages/cpt_payment/lib/modules/payment/payment/payment_list_screen.dart
  57. 0 25
      packages/cpt_payment/lib/modules/payment/payment/payment_list_types.dart
  58. 57 2
      packages/cpt_payment/lib/modules/payment/payment/payment_list_view_model.dart
  59. 1 1
      packages/cpt_payment/lib/modules/payment/payment/payment_list_view_model.g.dart
  60. 164 77
      packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_page.dart
  61. 16 7
      packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_view_model.dart
  62. 1 1
      packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_view_model.g.dart
  63. 1 1
      packages/cpt_payment/lib/modules/payment_info/payment_info_view_model.dart
  64. 1 1
      packages/cpt_payment/lib/modules/payment_info/payment_info_view_model.g.dart
  65. 44 26
      packages/cpt_payment/lib/modules/payment_success/payment_success_page.dart
  66. 16 2
      packages/cpt_payment/lib/modules/payment_success/payment_success_state.dart
  67. 18 0
      packages/cpt_payment/lib/modules/payment_success/payment_success_view_model.dart
  68. 1 1
      packages/cpt_payment/lib/modules/payment_success/payment_success_view_model.g.dart
  69. 103 10
      packages/cpt_payment/lib/router/page/payment_page_router.gr.dart
  70. 28 12
      packages/cpt_profile/lib/modules/setting/setting_view_model.dart
  71. 14 13
      packages/cpt_property/lib/modules/ioan/property_ioan_page.dart
  72. 2 3
      packages/cpt_property/lib/modules/news/page/property_news_page.dart
  73. 1 0
      packages/cpt_property/lib/modules/property/page/property_page.dart
  74. 4 3
      packages/cpt_property/lib/modules/rent/page/property_rent_page.dart
  75. 4 3
      packages/cpt_property/lib/modules/sale/page/property_sale_page.dart
  76. 288 104
      packages/cpt_rewards/lib/modules/rewards/rewards_page.dart
  77. 5 1
      packages/cpt_rewards/lib/modules/rewards/rewards_vm.dart
  78. 1 1
      packages/cpt_services/lib/components/chooseAirConditionContent_vm.g.dart
  79. 5 3
      packages/cpt_services/lib/components/chooseHouseCleanContent.dart
  80. 1 1
      packages/cpt_services/lib/components/chooseHouseCleanContent_vm.g.dart
  81. 5 4
      packages/cpt_services/lib/components/chooseVisitTimeBottomFooter.dart
  82. 5 2
      packages/cpt_services/lib/components/chooseVisitTimeContent.dart
  83. 3 1
      packages/cpt_services/lib/components/chooseVisitTimeTitle.dart
  84. 2 1
      packages/cpt_services/lib/modules/services/clean_order_cancel_success/clean_order_cancel_success_page.dart
  85. 2 1
      packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_page.dart
  86. 1 1
      packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_vm.g.dart
  87. 3 2
      packages/cpt_services/lib/modules/services/history/history_page.dart
  88. 1 1
      packages/cpt_services/lib/modules/services/history/history_vm.g.dart
  89. 4 2
      packages/cpt_services/lib/modules/services/homeService/home_service_page.dart
  90. 0 1
      packages/cpt_services/lib/modules/services/homeService/home_service_vm.dart
  91. 1 1
      packages/cpt_services/lib/modules/services/homeService/home_service_vm.g.dart
  92. 1 1
      packages/cpt_services/lib/modules/services/homeService/service_card_item.dart
  93. 3 2
      packages/cpt_services/lib/modules/services/inProgress/in_progress_page.dart
  94. 1 1
      packages/cpt_services/lib/modules/services/inProgress/in_progress_vm.g.dart
  95. 3 2
      packages/cpt_services/lib/modules/services/repair_history/history_page.dart
  96. 1 1
      packages/cpt_services/lib/modules/services/repair_history/history_vm.g.dart
  97. 3 2
      packages/cpt_services/lib/modules/services/repair_homeService/home_service_page.dart
  98. 0 1
      packages/cpt_services/lib/modules/services/repair_homeService/home_service_vm.dart
  99. 1 1
      packages/cpt_services/lib/modules/services/repair_homeService/home_service_vm.g.dart
  100. 0 0
      packages/cpt_services/lib/modules/services/repair_homeService/service_card_item.dart

+ 9 - 1
app/android/app/build.gradle

@@ -3,6 +3,7 @@ plugins {
     id "kotlin-android"
     id "kotlin-kapt"
     id "dev.flutter.flutter-gradle-plugin"
+    id 'com.google.gms.google-services'
 }
 
 def keystoreProperties = new Properties()
@@ -29,6 +30,9 @@ android {
     compileSdk 35
 
     compileOptions {
+        // 启用核心库脱糖(Core Library Desugaring)
+        coreLibraryDesugaringEnabled true
+
         sourceCompatibility JavaVersion.VERSION_17
         targetCompatibility JavaVersion.VERSION_17
     }
@@ -123,10 +127,14 @@ dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0"
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0"
 
+    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
+
     implementation 'com.github.bumptech.glide:glide:4.11.0'
     kapt 'com.github.bumptech.glide:compiler:4.11.0'
 
     implementation 'androidx.appcompat:appcompat:1.6.1'  //加入AndroidX依赖
     implementation 'com.android.support:multidex:1.0.3'
 //    implementation 'androidx.core:core-splashscreen:1.0.0' //启动12兼容
-}
+}
+
+apply plugin: 'com.google.gms.google-services'

+ 29 - 0
app/android/app/google-services.json

@@ -0,0 +1,29 @@
+{
+  "project_info": {
+    "project_number": "826534850691",
+    "project_id": "ifm-21739",
+    "storage_bucket": "ifm-21739.firebasestorage.app"
+  },
+  "client": [
+    {
+      "client_info": {
+        "mobilesdk_app_id": "1:826534850691:android:d7780551ab203907262bb6",
+        "android_client_info": {
+          "package_name": "com.hongyegroup.app24ifm"
+        }
+      },
+      "oauth_client": [],
+      "api_key": [
+        {
+          "current_key": "AIzaSyB7dHuJPzIfte7SHkKeeflzijLd33iRvt0"
+        }
+      ],
+      "services": {
+        "appinvite_service": {
+          "other_platform_oauth_client": []
+        }
+      }
+    }
+  ],
+  "configuration_version": "1"
+}

+ 3 - 0
app/android/settings.gradle

@@ -25,6 +25,9 @@ plugins {
     id "dev.flutter.flutter-plugin-loader" version "1.0.0"
     id "com.android.application" version "8.7.3" apply false
     id "org.jetbrains.kotlin.android" version "1.9.0" apply false
+
+    // 添加 Google Services 插件
+    id "com.google.gms.google-services" version "4.4.0" apply false
 }
 
 include ":app"

+ 58 - 0
app/lib/firebase_options.dart

@@ -0,0 +1,58 @@
+// Copyright 2022, the Chromium project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// File generated by FlutterFire CLI.
+// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
+import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
+import 'package:flutter/foundation.dart'
+    show defaultTargetPlatform, kIsWeb, TargetPlatform;
+
+/// Default [FirebaseOptions] for use with your Firebase apps.
+///
+/// Example:
+/// ```dart
+/// import 'firebase_options.dart';
+/// // ...
+/// await Firebase.initializeApp(
+///   options: DefaultFirebaseOptions.currentPlatform,
+/// );
+/// ```
+class MyFirebaseOptions {
+  static FirebaseOptions get currentPlatform {
+    switch (defaultTargetPlatform) {
+      case TargetPlatform.android:
+        return android;
+      case TargetPlatform.iOS:
+        return ios;
+      default:
+        throw UnsupportedError(
+          'MyFirebaseOptions are not supported for this platform.',
+        );
+    }
+  }
+
+  static const FirebaseOptions android = FirebaseOptions(
+    apiKey: 'AIzaSyB7dHuJPzIfte7SHkKeeflzijLd33iRvt0',
+    appId: '1:826534850691:android:d7780551ab203907262bb6',
+    messagingSenderId: '826534850691',
+    projectId: 'ifm-21739',
+    storageBucket: 'ifm-21739.firebasestorage.app'
+  );
+
+  static const FirebaseOptions ios = FirebaseOptions(
+    apiKey: 'AIzaSyDooSUGSf63Ghq02_iIhtnmwMDs4HlWS6c',
+    appId: '1:406099696497:ios:acd9c8e17b5e620e3574d0',
+    messagingSenderId: '406099696497',
+    projectId: 'flutterfire-e2e-tests',
+    databaseURL:
+        'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app',
+    storageBucket: 'flutterfire-e2e-tests.appspot.com',
+    androidClientId:
+        '406099696497-tvtvuiqogct1gs1s6lh114jeps7hpjm5.apps.googleusercontent.com',
+    iosClientId:
+        '406099696497-taeapvle10rf355ljcvq5dt134mkghmp.apps.googleusercontent.com',
+    iosBundleId: 'io.flutter.plugins.firebase.tests',
+  );
+
+}

+ 5 - 0
app/lib/main.dart

@@ -25,6 +25,7 @@ import 'package:widgets/dialog/custom_success_widget.dart';
 import 'package:widgets/dialog/custom_loading_widget.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/theme/theme_config.dart';
+import 'firebase_options.dart';
 import 'router/page/app_page_router.dart';
 import 'router/component/app_service_provider.dart';
 import 'package:cpt_auth/router/component/auth_component_service.dart';
@@ -36,11 +37,15 @@ import 'package:cpt_payment/router/component/payment_component_service.dart';
 import 'package:cpt_property/router/component/property_component_service.dart';
 import 'package:cpt_rewards/router/component/rewards_component_service.dart';
 import 'package:cpt_services/router/component/services_component_service.dart';
+import 'package:firebase_core/firebase_core.dart';
 
 void main() async {
   //交给初始化构造器去统一初始化
   await AppInitializer.initializeRunalone();
 
+  //初始化FCM
+  Firebase.initializeApp(name: '24IFM', options: MyFirebaseOptions.currentPlatform);
+
   //组件路由的注入
   ComponentServiceManager()
     ..addServiceProvider(mainServiceProvider)

+ 3 - 3
melos.yaml

@@ -37,7 +37,7 @@ scripts:
     description: 在每个子组件中运行 flutter pub get,用来获取和安装这些包的所有依赖
 
   build_runner_all:
-    run: dart pub global run melos exec -- "dart run build_runner build"
+    run: dart pub global run melos exec -- "dart pub run build_runner build"
     description: 如果模块包含 build_runner,执行 build_runner build 命令
     filters:
       dependsOn:
@@ -80,11 +80,11 @@ scripts:
     description: Run `dart run build_runner build` in profile module
 
   build_runner_property:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_property" && flutter pub run build_runner build --delete-conflicting-outputs --verbose
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_property" && dart run build_runner build --delete-conflicting-outputs --verbose
     description: Run `dart run build_runner build` in property module
 
   watch_runner_property:
-    run: cd "$MELOS_ROOT_PATH/packages/cpt_property" && flutter pub run build_runner watch --delete-conflicting-outputs --verbose
+    run: cd "$MELOS_ROOT_PATH/packages/cpt_property" && dart run build_runner watch --delete-conflicting-outputs --verbose
     description: Run `dart run build_runner build` in property module
 
   build_runner_rewards:

+ 1 - 1
packages/cpt_community/lib/components/garage_card.dart

@@ -217,7 +217,7 @@ class CollectionWidget extends HookConsumerWidget {
         height: 30,
         alignment: Alignment.center,
         // decoration: BoxDecoration(
-        //   color: ColorUtils.string2Color('#E5E5E5'),
+        //   color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
         //   borderRadius: BorderRadius.circular(15),
         // ),
         child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [

+ 1 - 1
packages/cpt_community/lib/components/newfeed_card_header.dart

@@ -51,7 +51,7 @@ class NewsFeedCardHeader extends StatelessWidget {
           }),
           Expanded(
             child: Container(
-              padding: const EdgeInsets.only(left:15, right: 0),
+              padding: const EdgeInsets.only(left:10, right: 0),
               child: Column(
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.start,

+ 10 - 8
packages/cpt_community/lib/modules/community/community_page.dart

@@ -15,6 +15,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../router/page/community_page_router.dart';
@@ -249,7 +250,7 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
                     MyTextView(
                       item['title'],
                       fontSize: 15,
-                      textColor: index == curTagIdx ? context.appColors.textPrimary: context.appColors.textBlack,
+                      textColor: DarkThemeUtil.multiColors(context, index == curTagIdx ? context.appColors.textPrimary: context.appColors.textBlack, darkColor: index == curTagIdx? AppColorsTheme.colorPrimary: Colors.white),
                       textAlign: TextAlign.center,
                       isFontMedium: true,
                     ),
@@ -274,7 +275,7 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
        }
        return Container(
         width: double.infinity,
-        color: ColorUtils.string2Color('#F2F3F6'),
+        color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.white60),
         child: Center(
           child: NewsfeedTabs(
             key: UniqueKey(),
@@ -312,7 +313,7 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
           height: 65.5,
           width: double.infinity,
           padding: const EdgeInsets.only(left: 20, right: 20),
-          color: Colors.white,
+          color: DarkThemeUtil.multiColors(context, context.appColors.whiteBG, darkColor: Colors.black),
           child: Row(
             children: [
               // const MyAssetImage(Assets.communityNewsFeed, width: 45,height: 45,),
@@ -326,12 +327,12 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
               Expanded(
                 child: MyTextView(
                   S.current.what_on_your_mind,
-                  textColor: context.appColors.textBlack,
+                  textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
                   fontSize: 15,
                   marginLeft: 15,
                   alignment: Alignment.centerLeft,
                   textAlign: TextAlign.left,
-                  backgroundColor: ColorUtils.string2Color('#ffffff'),
+                  backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.black),
                   maxLines: 1,
                   isFontMedium: true,
                 ),
@@ -354,7 +355,7 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
           height: 65.5,
           width: double.infinity,
           padding: const EdgeInsets.only(left: 20, right: 20),
-          color: Colors.white,
+          color: DarkThemeUtil.multiColors(context, context.appColors.whiteBG, darkColor: Colors.black),
           child: Row(
             children: [
               MyLoadImage(
@@ -367,12 +368,13 @@ class CommunityPage extends HookConsumerWidget with WidgetsBindingObserver {
               Expanded(
                 child: MyTextView(
                   S.current.sell_item,
-                  textColor: context.appColors.textBlack,
+                  // S.current.rent_item,
+                  textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
                   fontSize: 15,
                   marginLeft: 15,
                   alignment: Alignment.centerLeft,
                   textAlign: TextAlign.left,
-                  backgroundColor: ColorUtils.string2Color('#ffffff'),
+                  backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.black),
                   maxLines: 1,
                   isFontMedium: true,
                 ),

+ 2 - 1
packages/cpt_community/lib/modules/community/following/following_page.dart

@@ -17,6 +17,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/newfeed_card_header.dart';
@@ -58,7 +59,7 @@ class FollowingPage extends HookConsumerWidget {
       //   "following",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      // backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+        backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
         body: Column(
           mainAxisSize: MainAxisSize.max,
           children: [

+ 2 - 1
packages/cpt_community/lib/modules/community/foryou/foryou_page.dart

@@ -17,6 +17,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/newfeed_card_header.dart';
@@ -59,7 +60,7 @@ class ForyouPage extends HookConsumerWidget {
       //   "foryou",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      // backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
         body: Column(
           mainAxisSize: MainAxisSize.max,
           children: [

+ 5 - 3
packages/cpt_community/lib/modules/community/news/news_page.dart

@@ -19,6 +19,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:easy_refresh/easy_refresh.dart';
 
@@ -62,7 +63,7 @@ class NewsPage extends HookConsumerWidget {
       //   "news",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
         mainAxisSize: MainAxisSize.max,
         children: [
@@ -130,6 +131,7 @@ class NewsPage extends HookConsumerWidget {
           borderRadius: BorderRadius.circular(10),
           boxShadow: [
             BoxShadow(
+              // color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#E4E7EB").withOpacity(0.5), darkColor: Colors.transparent)??Colors.transparent,
               color: ColorUtils.string2Color("#E4E7EB").withOpacity(0.5),
               spreadRadius: 0,
               blurRadius: 4,
@@ -204,9 +206,9 @@ class NewsPage extends HookConsumerWidget {
                     // ),
                     child: MyButton(
                       text: card_followed ? S.current.followed:S.current.to_follow,
-                      textColor: card_followed ?  context.appColors.disEnableGray: context.appColors.textWhite,
+                      textColor: DarkThemeUtil.multiColors(context, card_followed ? context.appColors.disEnableGray: context.appColors.textWhite, darkColor: card_followed ? context.appColors.textWhite: context.appColors.textWhite),
                       disabledTextColor: context.appColors.disEnableGray,
-                      backgroundColor: card_followed ? Colors.transparent : context.appColors.textPrimary,
+                      backgroundColor: DarkThemeUtil.multiColors(context, card_followed ? Colors.transparent : context.appColors.textPrimary, darkColor: card_followed ? Colors.white38 : AppColorsTheme.colorPrimary),
                       side: BorderSide(color: !card_followed ? Colors.transparent : context.appColors.disEnableGray, width: 0.5),
                       radius: 8,
                       minHeight: 27.5,

+ 7 - 6
packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_page.dart

@@ -21,6 +21,7 @@ import 'package:widgets/my_button.dart';
 import 'package:widgets/my_like_button.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:widgets/my_button.dart';
 
@@ -72,7 +73,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
         S.current.news_feed_detail,
         backgroundColor: context.appColors.backgroundWhite,
       ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
           mainAxisSize: MainAxisSize.max,
           children:[
@@ -197,9 +198,9 @@ class NewsfeedDetailPage extends HookConsumerWidget {
                       final isFollowedState = useState<bool>(card_followed);
                       return MyButton(
                         text: isFollowedState.value ?  S.current.followed:S.current.to_follow,
-                        textColor: isFollowedState.value ?  context.appColors.disEnableGray: context.appColors.textWhite,
+                        textColor: DarkThemeUtil.multiColors(context, isFollowedState.value ? context.appColors.disEnableGray: context.appColors.textWhite, darkColor: isFollowedState.value ? context.appColors.textWhite: context.appColors.textWhite),
                         disabledTextColor: context.appColors.disEnableGray,
-                        backgroundColor: isFollowedState.value ? Colors.transparent : context.appColors.textPrimary,
+                        backgroundColor: DarkThemeUtil.multiColors(context, isFollowedState.value ? Colors.transparent : context.appColors.textPrimary, darkColor: isFollowedState.value ? Colors.white38 : AppColorsTheme.colorPrimary),
                         side: BorderSide(color: !isFollowedState.value ? Colors.transparent : context.appColors.disEnableGray, width: 0.5),
                         radius: 8,
                         minHeight: 27.5,
@@ -442,7 +443,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
         child: Container(
             height: 60,
             width: MediaQuery.of(context).size.width,
-            color: context.appColors.textPrimary,
+            color: DarkThemeUtil.multiColors(context, context.appColors.textPrimary, darkColor: Colors.black),
             child: Row(
                 mainAxisAlignment: MainAxisAlignment.spaceBetween,
                 crossAxisAlignment: CrossAxisAlignment.center,
@@ -476,7 +477,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
 
                               MyTextView(
                                 S.current.like,
-                                textColor: context.appColors.whiteBG,
+                                textColor: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.white),
                                 fontSize: 14,
                                 isFontRegular: true,
                               )
@@ -515,7 +516,7 @@ class NewsfeedDetailPage extends HookConsumerWidget {
                               const SizedBox(width: 10,),
                               MyTextView(
                                 S.current.comment,
-                                textColor: context.appColors.whiteBG,
+                                textColor: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.white),
                                 fontSize: 14,
                                 isFontRegular: true,
                               ),

+ 7 - 5
packages/cpt_community/lib/modules/community/newsfeed_post/newsfeed_post_page.dart

@@ -12,6 +12,7 @@ import 'package:shared/utils/color_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_text_field.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:widgets/my_button.dart';
 
@@ -42,7 +43,7 @@ class NewsfeedPostPage extends HookConsumerWidget {
         S.current.create_post,
         backgroundColor: context.appColors.backgroundWhite,
       ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
           children: [
             Expanded(
@@ -59,7 +60,7 @@ class NewsfeedPostPage extends HookConsumerWidget {
                             height: 200,
                             padding: const EdgeInsets.all(15),
                             decoration: BoxDecoration(
-                                color: Colors.white,
+                                color: context.appColors.whiteBG,
                                 borderRadius: BorderRadius.circular(5),
                                 boxShadow: [
                                   BoxShadow(
@@ -78,7 +79,7 @@ class NewsfeedPostPage extends HookConsumerWidget {
                             margin: const EdgeInsets.only(left:15, right:15, top: 20, bottom: 20),
                             padding: const EdgeInsets.all(15),
                             decoration: BoxDecoration(
-                                color: Colors.white,
+                                color: context.appColors.whiteBG,
                                 borderRadius: BorderRadius.circular(5),
                                 boxShadow: [
                                   BoxShadow(
@@ -105,8 +106,9 @@ class NewsfeedPostPage extends HookConsumerWidget {
                         text: S.current.submit,
                         radius: 0,
                         minHeight: 50,
-                        backgroundColor: context.appColors.textPrimary,
-                        textColor: Colors.white,
+                        // backgroundColor: context.appColors.textPrimary,
+                        backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.textPrimary,darkColor: AppColorsTheme.color666666),
+                        textColor: context.appColors.textWhite,
                         fontWeight: FontWeight.w500,
                         fontSize: 16,
                         onPressed: () {

+ 4 - 2
packages/cpt_community/lib/modules/community/newsfeed_tabs.dart

@@ -10,6 +10,7 @@ import 'package:widgets/my_load_image.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import 'community_page.dart';
 import 'community_vm.dart';
@@ -96,7 +97,8 @@ class NewsfeedTabs extends HookConsumerWidget {
       height: 43,
       margin: margin,
       decoration: index==curTabIdx? BoxDecoration(
-        color: index==curTabIdx? context.appColors.btnBgDefault: ColorUtils.string2Color("#F2F3F6"),
+        // color: index==curTabIdx? context.appColors.btnBgDefault: ColorUtils.string2Color("#F2F3F6"),
+        color: DarkThemeUtil.multiColors(context, index==curTabIdx? context.appColors.btnBgDefault: ColorUtils.string2Color("#F2F3F6"), darkColor: index==curTabIdx? context.appColors.btnBgDefault: ColorUtils.string2Color("#F2F3F6")),
         borderRadius: BorderRadius.circular(20),
         boxShadow: [
           BoxShadow(
@@ -117,7 +119,7 @@ class NewsfeedTabs extends HookConsumerWidget {
                 fontSize: 16,
                 textAlign: TextAlign.center,
                 isFontMedium: true,
-                textColor: index == curTabIdx ? Colors.white :ColorUtils.string2Color("#000000"),
+                textColor: DarkThemeUtil.multiColors(context, index==curTabIdx? context.appColors.textWhite: ColorUtils.string2Color("#000000"), darkColor: index==curTabIdx? Colors.white: ColorUtils.string2Color("#000000")),
               ),
             ).onTap((){
               // Log.d("----currentCatgoryIdx----$currentCatgoryIdx-------");

+ 3 - 2
packages/cpt_community/lib/modules/garage/for_rent/for_rent_page.dart

@@ -17,6 +17,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/garage_card.dart';
@@ -58,7 +59,7 @@ class ForrentPage extends HookConsumerWidget {
       //   "Forrent",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-        backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+        backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,
@@ -116,7 +117,7 @@ class ForrentPage extends HookConsumerWidget {
           borderRadius: BorderRadius.circular(8),
           boxShadow: [
             BoxShadow(
-              color: ColorUtils.string2Color('#E5E5E5'),
+              color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
               offset: const Offset(0, 2),
               blurRadius: 8,
             ),

+ 3 - 2
packages/cpt_community/lib/modules/garage/for_sale/for_sale_page.dart

@@ -19,6 +19,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/garage_card.dart';
@@ -62,7 +63,7 @@ class ForsalePage extends HookConsumerWidget {
       //   "Forsale",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
         width: double.infinity,
         height: double.infinity,
@@ -120,7 +121,7 @@ class ForsalePage extends HookConsumerWidget {
           borderRadius: BorderRadius.circular(8),
           boxShadow: [
             BoxShadow(
-              color: ColorUtils.string2Color('#E5E5E5'),
+              color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
               offset: const Offset(0, 2),
               blurRadius: 8,
             ),

+ 4 - 3
packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_page.dart

@@ -12,6 +12,7 @@ import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_text_field.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:widgets/shatter/picker_container.dart';
 import 'package:widgets/shatter/form_require_text.dart';
@@ -58,7 +59,7 @@ class GaragesalePostPage extends HookConsumerWidget {
         (type==1 || type==2) ? S.current.post_new_item : S.current.edit,
         backgroundColor: context.appColors.backgroundWhite,
       ),
-      backgroundColor: Colors.white,
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
           children: [
             Expanded(
@@ -191,7 +192,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                           Container(
                             width: double.infinity,
                             height: 200,
-                            color: Colors.white,
+                            color: DarkThemeUtil.multiColors(context, Colors.white,darkColor: Colors.black),
                             margin: const EdgeInsets.only(left:15, right:15, top: 15, bottom: 20),
                             // 选择图片上传 控件
                             child: _buildImageSelectCmp(context, ref,vm),
@@ -209,7 +210,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                         text: S.current.submit,
                         radius: 0,
                         minHeight: 50,
-                        backgroundColor: context.appColors.textPrimary,
+                        backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.textPrimary,darkColor: AppColorsTheme.color666666),
                         textColor: Colors.white,
                         fontWeight: FontWeight.w500,
                         fontSize: 16,

+ 8 - 4
packages/cpt_community/lib/modules/my_following/components/item_following.dart

@@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:flutter_riverpod/flutter_riverpod.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
@@ -63,6 +64,7 @@ class MyFollowingListItem extends StatelessWidget {
               ),
               // _buildIsFollowButton(context),
               itemType == MyFollowingType['isFollowType'] ? HookConsumer(
+                key: ValueKey(itemObj['id']), // 唯一标识每个 item
                 builder: (context, ref, child) {
                   final isFollow = useState<bool>(true);
                   return  MyButton(
@@ -71,10 +73,12 @@ class MyFollowingListItem extends StatelessWidget {
                       final vm = ref.read(itemFollowingVmProvider.notifier);
                       // todo 调用接口 然后更新状态
                       int to_user_id = itemObj['id'];
-                      bool asyncResult = await vm.handlerFollow(context, to_user_id, isFollow.value, itemType!);
-                      if(asyncResult){
-                        isFollow.value = !isFollow.value;
-                      }
+                      vm.handlerFollow(context, to_user_id, isFollow.value, itemType!, (asyncResult){
+                        if(asyncResult){
+                          isFollow.value = !isFollow.value;
+                        }
+                      });
+
                     },
                     textColor: isFollow.value? context.appColors.textDarkGray : context.appColors.textWhite,
                     side: isFollow.value?  BorderSide(color: context.appColors.textDarkGray,width: 0.5) : BorderSide.none,

+ 34 - 4
packages/cpt_community/lib/modules/my_following/components/item_following_vm.dart

@@ -1,7 +1,10 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
+import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:shared/utils/log_utils.dart';
+import 'package:widgets/dialog/app_custom_dialog.dart';
 
 import '../../../respository/common_newsfeed.dart';
 import '../my_follow/my_follow_vm.dart';
@@ -29,12 +32,37 @@ class ItemFollowingVm extends _$ItemFollowingVm {
   }
 
   // 关注/取消关注
-  Future<bool> handlerFollow(BuildContext? context, int to_user_id, bool isFollow, String itemType) async{
+  handlerFollow(BuildContext? context, int to_user_id, bool isFollow, String itemType, Function(bool)? callback) async{
     Log.d("点击了 关注");
+    if(isFollow){
+      await DialogEngine.show(
+          tag: "cancelFollow",
+          position: DialogPosition.center,
+          widget: AppCustomDialog(
+            message: 'Are you sure you want to cancel follow',
+            dialogWidth: MediaQuery.of(context!).size.width * 0.8,
+            // contentBoxMaxHeight: 350,
+            // contentBoxMinHeight: 300,
+            isShowConfirmBtn:  true,
+            isShowCancelBtn: true,
+            confirmTxt: "Ok",
+            confirmAction: (){
+              // 点击了确定
+              Log.d("----点击了确定按钮");
+              excuteCancelFollow(context, to_user_id, isFollow, itemType!, callback);
+            },
+          )
+      );
+
+    }
+  }
+
+  Future<bool> excuteCancelFollow(BuildContext context, int to_user_id, bool isFollow, String itemType, Function(bool)? callback) async{
     try {
       final result = await commonNewsFeedRespositoryInstance.handlerFollowOrCancel({
         "to_user_id": to_user_id,
       });
+      bool flag = false;
       if(result.isSuccess){
         if(itemType == MyFollowingType['isFollowType']){
           // 删除 my_follow_list 中 id 为 to_user_id 的item
@@ -43,13 +71,15 @@ class ItemFollowingVm extends _$ItemFollowingVm {
         }else if(itemType == MyFollowingType['isFollowerType']){
           // final myFlowerVm = ref.read(myFollowerVmProvider.notifier);
         }
-
         // 同步用户信息
         UserConfigService.getInstance().refreshUserInfo();
-        return true;
+        flag = true;
       }else {
-        return false;
+        flag = false;
       }
+      callback?.call(flag);
+      return flag;
+
     }catch(error){
       Log.d("error: $error");
       return false;

+ 8 - 6
packages/cpt_community/lib/modules/my_following/my_follow/my_follow_page.dart

@@ -16,6 +16,7 @@ import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:widgets/search_app_bar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../router/page/community_page_router.dart';
@@ -41,7 +42,7 @@ class MyFollowPage extends HookConsumerWidget {
     final vm = ref.read(myFollowVmProvider.notifier);
     final state = ref.watch(myFollowVmProvider);
     final useSearchBar = useState(false);
-    // 用于存储前一次的滚动位置
+    // 存储前一次的滚动位置
     final previousOffset = useState(0.0);
 
     useEffect(() {
@@ -65,7 +66,7 @@ class MyFollowPage extends HookConsumerWidget {
         //   '${useSearchBar.value}',
         //   backgroundColor: context.appColors.whiteBG,
         // ),
-        backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+        backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
         body: Container(
           height: double.infinity,
           width: double.infinity,
@@ -79,7 +80,7 @@ class MyFollowPage extends HookConsumerWidget {
                 // Log.d("---最大滚动距离-----${metrics.maxScrollExtent}-------");
                 if (currentOffset > prevOffset) {
                   // 向上滚动
-                  // 日志输出当前滚动偏移量和前一次滚动偏移量
+                  // 当前滚动偏移量和前一次滚动偏移量
                   // Log.d('--向上滚动---当前currentOffset: $currentOffset, previousOffset: $prevOffset---------');
                   if(useSearchBar.value == false && metrics.maxScrollExtent >=0 && currentOffset >= 110){
                     // 滚动到110 时 将 titlebar 换成 searchbar
@@ -87,7 +88,7 @@ class MyFollowPage extends HookConsumerWidget {
                   }
                 } else if (currentOffset < prevOffset) {
                   // 向下滚动
-                  // 日志输出当前滚动偏移量和前一次滚动偏移量
+                  // 当前滚动偏移量和前一次滚动偏移量
                   // Log.d('--向下滚动---当前currentOffset: $currentOffset, previousOffset: $prevOffset---------');
                   if(useSearchBar.value == true && metrics.maxScrollExtent >=0 && currentOffset <= 110){
                     // 滚动到110 时 将 searchbar 换成 titlebar
@@ -97,8 +98,6 @@ class MyFollowPage extends HookConsumerWidget {
                 // 更新前一次的滚动位置
                 previousOffset.value = currentOffset;
               }
-
-              // 返回 true 表示通知被消耗
               return false;
             },
             child: EasyRefresh(
@@ -157,6 +156,9 @@ class MyFollowPage extends HookConsumerWidget {
 
   Widget _buildFollowItem(BuildContext context,WidgetRef ref, Map<String, dynamic> item, vm, index, totalIndex) {
     bool isLast = index == totalIndex - 1;
+    Log.d("----isLast----$isLast");
+    Log.d("----item----$item");
+    Log.d("-----item---- ${MyFollowingType['isFollowType']}");
     return MyFollowingListItem(
         itemObj: item,
         itemType: MyFollowingType['isFollowType'],

+ 1 - 1
packages/cpt_community/lib/modules/my_following/my_follow/my_follow_vm.dart

@@ -180,7 +180,7 @@ class MyFollowVm extends _$MyFollowVm {
   }
 
   softDeleteItem(int id){
-    state.list!.removeWhere((element) => element['id'] == id);
+    state.list!.removeWhere((element) => element['id'] as int == id);
     state = state.copyWith(list: state.list);
     // 更新 my_posts_tabs 里面的数字
     updateMyFollowingTabsNum(tabsNamesData['Follow'], state.list!.length, 0);

+ 4 - 4
packages/cpt_community/lib/modules/my_following/my_follower/my_follower_page.dart

@@ -16,6 +16,7 @@ import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:widgets/search_app_bar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../router/page/community_page_router.dart';
@@ -65,7 +66,7 @@ class MyFollowerPage extends HookConsumerWidget {
       //   "following",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-        backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+        backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
         body: Container(
           height: double.infinity,
           width: double.infinity,
@@ -79,7 +80,7 @@ class MyFollowerPage extends HookConsumerWidget {
                 // Log.d("---最大滚动距离-----${metrics.maxScrollExtent}-------");
                 if (currentOffset > prevOffset) {
                   // 向上滚动
-                  // 日志输出当前滚动偏移量和前一次滚动偏移量
+                  // 当前滚动偏移量和前一次滚动偏移量
                   // Log.d('--向上滚动---当前currentOffset: $currentOffset, previousOffset: $prevOffset---------');
                   if(useSearchBar.value == false && metrics.maxScrollExtent >=0 && currentOffset >= 110){
                     // 滚动到110 时 将 titlebar 换成 searchbar
@@ -87,7 +88,7 @@ class MyFollowerPage extends HookConsumerWidget {
                   }
                 } else if (currentOffset < prevOffset) {
                   // 向下滚动
-                  // 日志输出当前滚动偏移量和前一次滚动偏移量
+                  // 当前滚动偏移量和前一次滚动偏移量
                   // Log.d('--向下滚动---当前currentOffset: $currentOffset, previousOffset: $prevOffset---------');
                   if(useSearchBar.value == true && metrics.maxScrollExtent >=0 && currentOffset <= 110){
                     // 滚动到110 时 将 searchbar 换成 titlebar
@@ -98,7 +99,6 @@ class MyFollowerPage extends HookConsumerWidget {
                 previousOffset.value = currentOffset;
               }
 
-              // 返回 true 表示通知被消耗
               return false;
             },
             child: EasyRefresh(

+ 2 - 1
packages/cpt_community/lib/modules/my_following/my_following_page.dart

@@ -17,6 +17,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/search_app_bar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../components/newfeed_card_header.dart';
@@ -101,7 +102,7 @@ class MyFollowingPage extends HookConsumerWidget {
     return Scaffold(
       appBar: _buildPageAppBar(context, ref, state),
       // appBar: MyAppBar.searchAppBar(context),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
         children:[
           Expanded(

+ 5 - 2
packages/cpt_community/lib/modules/my_following/my_following_tabs.dart

@@ -10,6 +10,7 @@ import 'package:widgets/my_load_image.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import '../community/community_vm.dart';
 import 'my_following_vm.dart';
@@ -59,6 +60,7 @@ class MyFollowingTabs extends HookConsumerWidget {
           Expanded(
             child: Container(
               alignment: Alignment.center,
+              // color: Colors.red,
               child: Row(
                 mainAxisAlignment: MainAxisAlignment.center,
                 children: [
@@ -67,7 +69,7 @@ class MyFollowingTabs extends HookConsumerWidget {
                     fontSize: 16,
                     textAlign: TextAlign.center,
                     isFontMedium: true,
-                    textColor: index == activeTabIdx ? Colors.white :ColorUtils.string2Color("#000000"),
+                    textColor: DarkThemeUtil.multiColors(context, index == activeTabIdx ? Colors.white : Colors.black, darkColor: index == activeTabIdx ? AppColorsTheme.colorPrimary: Colors.white),
                   ),
                   MyTextView(
                     // '(${activeTabCounter.toString()})',
@@ -75,7 +77,8 @@ class MyFollowingTabs extends HookConsumerWidget {
                     fontSize: 16,
                     textAlign: TextAlign.center,
                     isFontMedium: true,
-                    textColor: index == activeTabIdx ? Colors.white :ColorUtils.string2Color("#000000"),
+                    textColor: DarkThemeUtil.multiColors(context, index == activeTabIdx ? Colors.white : Colors.black, darkColor: index == activeTabIdx ? AppColorsTheme.colorPrimary: Colors.white),
+
                   ),
                 ],
               ),

+ 2 - 1
packages/cpt_community/lib/modules/my_posts/components/my_posts_sale_rent_item.dart

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import '../../../components/garage_card.dart';
 import 'my_posts_sale_rent_item_vm.dart';
@@ -25,7 +26,7 @@ class MyPostsSaleRentItem extends HookConsumerWidget {
           borderRadius: BorderRadius.circular(8),
           boxShadow: [
             BoxShadow(
-              color: ColorUtils.string2Color('#E5E5E5'),
+              color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
               offset: const Offset(0, 2),
               blurRadius: 8,
             ),

+ 2 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_forrent/my_posts_forrent_page.dart

@@ -14,6 +14,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/garage_card.dart';
@@ -54,7 +55,7 @@ class MyPostsForRentPage extends HookConsumerWidget {
       //   "MyPostsForRent",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,

+ 2 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_forsale/my_posts_forsale_page.dart

@@ -14,6 +14,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/garage_card.dart';
@@ -55,7 +56,7 @@ class MyPostsForSalePage extends HookConsumerWidget {
       //   "MyPostsForSale",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,

+ 2 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_newsfeed/my_posts_newsfeed_page.dart

@@ -16,6 +16,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/newsfeed_card_content.dart';
@@ -53,7 +54,7 @@ class MyPostsNewsfeedPage extends HookConsumerWidget {
       //   backgroundColor: context.appColors.whiteBG,
       // ),
       // backgroundColor: context.appColors.backgroundDefault,
-      backgroundColor: ColorUtils.string2Color('#F2F3F6'),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
         width: double.infinity,
         height: double.infinity,

+ 3 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_page.dart

@@ -7,8 +7,10 @@ import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import '../my_posts/my_posts_forrent/my_posts_forrent_page.dart';
 import '../my_posts/my_posts_forsale/my_posts_forsale_page.dart';
 import '../my_posts/my_posts_newsfeed/my_posts_newsfeed_page.dart';
@@ -60,7 +62,7 @@ class MyPostsPage extends HookConsumerWidget {
         S.current.my_post,
         backgroundColor: context.appColors.backgroundWhite,
       ),
-      backgroundColor: context.appColors.backgroundDefault,
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: Column(
         children: [
           Expanded(

+ 10 - 0
packages/cpt_facility/lib/modules/booking/facility_booking_view_model.dart

@@ -5,8 +5,10 @@ import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:router/componentRouter/component_service_manager.dart';
+import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/load_state_layout.dart';
+import '../../router/page/facility_page_router.dart';
 import '../book_confirm/book_confirm_page.dart';
 import '../detail/facility_detail_page.dart';
 import 'facility_booking_state.dart';
@@ -167,6 +169,14 @@ class FacilityBookingViewModel extends _$FacilityBookingViewModel with DioCancel
       //如果成功,走下一步流程
       if (success) {
         FacilityDetailPage.startWithPop2Main(bookingId: bookingId);
+      }else{
+        //如果失败需要关闭到跟页面,并且跳转到详情的支付页面
+        appRouter.pushAndPopUntil(
+          FacilityDetailPageRoute(bookingId: bookingId),
+          predicate: (route) {
+            return route.settings.name == 'FacilityPageRoute';
+          },
+        );
       }
     } else {
       ToastEngine.show(result.errorMsg ?? "UnKnow Error");

+ 6 - 0
packages/cpt_facility/lib/router/component/facility_component_service.dart

@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 
+import '../../modules/detail/facility_detail_page.dart';
 import '../../modules/facility/facility_page.dart';
 
 part 'facility_component_service.g.dart';
@@ -21,4 +22,9 @@ class FacilityComponentService extends FacilityService {
   void startFacilityPage() {
     FacilityPage.startInstance();
   }
+
+  @override
+  void startFacilityDetailPage({required String id}) {
+    FacilityDetailPage.startInstance(bookingId: id);
+  }
 }

+ 52 - 15
packages/cpt_form/lib/modules/apply/form_terms_page.dart

@@ -1,5 +1,6 @@
 import 'package:cpt_form/modules/apply/vm/apply_view_model.dart';
 import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/form_content_entity.dart';
 import 'package:domain/entity/form_list_entity.dart';
 import 'package:flutter/material.dart';
@@ -8,27 +9,42 @@ import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:plugin_basic/widget/webview_page.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/widget_export.dart';
 import '../../router/page/form_page_router.dart';
+import '../form/form_types.dart';
 
 //协议页面,也是详情页面的第一个页面入口,内部可以请求详情数据和选项数据
 @RoutePage()
 class FormTermsPage extends HookConsumerWidget {
   final String type;
-  final String? estateFormId;
-  final FormListEntity? formItem;
+  final String estateFormId;
   final bool enableEdit;
+  final FormListEntity? formItem;
   final FormContentEntity? formContent;
+  final String? description;
 
-  const FormTermsPage({Key? key, required this.type, this.estateFormId, this.formItem, required this.enableEdit, this.formContent}) : super(key: key);
+  const FormTermsPage({
+    Key? key,
+    required this.type,
+    required this.estateFormId,
+    required this.enableEdit,
+    this.formItem,
+    this.formContent,
+    this.description,
+  }) : super(key: key);
 
   //启动当前页面
   static void startInstance({
     BuildContext? context,
     required String formType,
-    String? estateFormId,
-    FormListEntity? formItem,
+    required String estateFormId,
     required bool enableEdit,
+    FormListEntity? formItem,
     FormContentEntity? formContent,
+    String? description,
   }) {
     if (context != null) {
       context.router.push(FormTermsPageRoute(
@@ -37,6 +53,7 @@ class FormTermsPage extends HookConsumerWidget {
         enableEdit: enableEdit,
         formContent: formContent,
         estateFormId: estateFormId,
+        description: description,
       ));
     } else {
       appRouter.push(FormTermsPageRoute(
@@ -45,6 +62,7 @@ class FormTermsPage extends HookConsumerWidget {
         enableEdit: enableEdit,
         formContent: formContent,
         estateFormId: estateFormId,
+        description: description,
       ));
     }
   }
@@ -55,21 +73,40 @@ class FormTermsPage extends HookConsumerWidget {
     final state = ref.watch(applyViewModelProvider);
 
     useEffect(() {
-      // 组件挂载时执行 - 执行接口请求
+      // 组件挂载时执行 - 保存参数
       Future.microtask(() => viewModel.setFormType(type, estateFormId, formItem, enableEdit, formContent));
       return () {
         // 组件卸载时执行
       };
     }, []);
 
-    return state.detailPage != null
-        ? WebViewPage(
-            showAppbar: true,
-            initialUrl: state.detailPage?['term_url'],
-            arguments: {'title': state.detailPage?['title']},
-            bottomBtnTxt: S.current.next,
-            bottomBtnAction: viewModel.gotoNextPage,
-          )
-        : const SizedBox();
+    return Scaffold(
+        appBar: MyAppBar.appBar(context, FormTypes.iconMap[type]?['name']),
+        backgroundColor: context.appColors.backgroundWhite,
+        body: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            SingleChildScrollView(
+              scrollDirection: Axis.vertical,
+              physics: const BouncingScrollPhysics(),
+              child: Html(data: description ?? FormTypes.iconMap[type]?['name']),
+            ).expanded(),
+
+            //底部按钮
+            MyButton(
+              onPressed: () {
+                viewModel.gotoNextPage();
+              },
+              text: S.current.next,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 0,
+            ),
+          ],
+        ));
   }
 }

+ 14 - 3
packages/cpt_form/lib/modules/apply/vm/apply_view_model.dart

@@ -1,5 +1,6 @@
 import 'dart:ui';
 
+import 'package:cpt_form/router/page/form_page_router.dart';
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:domain/entity/form_content_entity.dart';
 import 'package:domain/entity/form_list_entity.dart';
@@ -13,6 +14,7 @@ import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:plugin_platform/platform_export.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:router/componentRouter/component_service_manager.dart';
+import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/picker/date_picker_util.dart';
 import '../../form/form_page.dart';
@@ -36,6 +38,7 @@ class ApplyViewModel extends _$ApplyViewModel with DioCancelableMixin {
 
   //设置具体的表单类型
   void setFormType(String formType, String? estateFormId, FormListEntity? formItem, bool enableEdit, FormContentEntity? formContent) {
+    //初始化 DetailPage 静态数据
     final detail = FormTypes.buildDetailPageMap(enableEdit)[formType];
     if (enableEdit) {
       state = state.copyWith(
@@ -155,7 +158,7 @@ class ApplyViewModel extends _$ApplyViewModel with DioCancelableMixin {
     state = state.copyWith(formContentDetail: updatedDetail);
   }
 
-  /// 提交Form表单
+  /// 提交Form表单 - 直接支付
   void submitForm() async {
     //支付流程 Loading 开始
     LoadingEngine.show();
@@ -178,9 +181,17 @@ class ApplyViewModel extends _$ApplyViewModel with DioCancelableMixin {
       //支付流程 Loading 结束
       LoadingEngine.dismiss();
 
-      //如果成功,走下一步流程
-      if (success){
+      //如果支付成功,走下一步流程
+      if (success) {
         gotoNextPage();
+      } else {
+        //如果失败需要关闭到跟页面,并且跳转到详情的支付页面
+        appRouter.pushAndPopUntil(
+          FormDetailPageRoute(estateFormId: state.estateFormId ?? "", taskId: result.data?.id ?? "", type: state.formType ?? ""),
+          predicate: (route) {
+            return route.settings.name == 'FormPageRoute';
+          },
+        );
       }
     } else {
       ToastEngine.show(result.errorMsg ?? "UnKnow Error");

+ 1 - 1
packages/cpt_form/lib/modules/apply/vm/apply_view_model.g.dart

@@ -6,7 +6,7 @@ part of 'apply_view_model.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$applyViewModelHash() => r'd79f7a3eb669265cc9d4c43850736b215051ef49';
+String _$applyViewModelHash() => r'ca6ef4d5be244334ab6d4e4e9764d67b97d1b7f0';
 
 /// See also [ApplyViewModel].
 @ProviderFor(ApplyViewModel)

+ 6 - 12
packages/cpt_form/lib/modules/detail/detail_approved_fragment.dart

@@ -57,7 +57,7 @@ class DetailApprovedFragment extends HookConsumerWidget {
                           text: S.current.send_on_sometime(' '),
                         ),
                         TextSpan(
-                          text: state.forDetail?.sentOn ?? "-",
+                          text: state.forDetail?.createdAt ?? "-",
                           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
                         ),
                       ],
@@ -73,7 +73,7 @@ class DetailApprovedFragment extends HookConsumerWidget {
                           text: S.current.approved_on_sometime(' '),
                         ),
                         TextSpan(
-                          text: state.forDetail?.approvedOn ?? "-",
+                          text: state.forDetail?.updateAt ?? "-",
                           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
                         ),
                       ],
@@ -141,9 +141,10 @@ class DetailApprovedFragment extends HookConsumerWidget {
                 onPressed: () {
                   FormTermsPage.startInstance(
                       formType: state.typeId ?? "",
-                      estateFormId: state.estateFormId,
+                      estateFormId: state.estateFormId?? "",
                       formItem: null,
                       enableEdit: false,
+                      description: state.forDetail?.description,
                       formContent: state.forDetail?.content,
                   );
                 },
@@ -156,15 +157,8 @@ class DetailApprovedFragment extends HookConsumerWidget {
               ).expanded(),
             ],
           ).marginOnly(left: 15, right: 15),
-          MyButton(
-            onPressed: () {},
-            text: S.current.remove,
-            textColor: Colors.white,
-            fontSize: 15,
-            fontWeight: FontWeight.w400,
-            radius: 7,
-            backgroundColor: context.appColors.orangeBG,
-          ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5),
+
+          const SizedBox(height: 17.5),
         ],
       ),
     );

+ 10 - 17
packages/cpt_form/lib/modules/detail/detail_not_approved_fragment.dart

@@ -57,7 +57,7 @@ class DetailNotApprovedFragment extends HookConsumerWidget {
                           text: S.current.send_on_sometime(' '),
                         ),
                         TextSpan(
-                          text: state.forDetail?.sentOn ?? "-",
+                          text: state.forDetail?.createdAt ?? "-",
                           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
                         ),
                       ],
@@ -70,10 +70,10 @@ class DetailNotApprovedFragment extends HookConsumerWidget {
                       style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
                       children: <TextSpan>[
                         TextSpan(
-                          text: S.current.approved_on_sometime(' '),
+                          text: S.current.not_approved_on_sometime(' '),
                         ),
                         TextSpan(
-                          text: state.forDetail?.rejectedOn ?? "-",
+                          text: state.forDetail?.updateAt ?? "-",
                           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
                         ),
                       ],
@@ -139,11 +139,12 @@ class DetailNotApprovedFragment extends HookConsumerWidget {
               MyButton(
                 onPressed: () {
                   FormTermsPage.startInstance(
-                      formType: state.typeId ?? "",
-                      estateFormId: state.estateFormId,
-                      formItem: null,
-                      enableEdit: false,
-                      formContent: state.forDetail?.content,
+                    formType: state.typeId ?? "",
+                    estateFormId: state.estateFormId ?? "",
+                    formItem: null,
+                    enableEdit: false,
+                    description: state.forDetail?.description,
+                    formContent: state.forDetail?.content,
                   );
                 },
                 text: S.current.view_application,
@@ -155,15 +156,7 @@ class DetailNotApprovedFragment extends HookConsumerWidget {
               ).expanded(),
             ],
           ).marginOnly(left: 15, right: 15),
-          MyButton(
-            onPressed: () {},
-            text: S.current.remove,
-            textColor: Colors.white,
-            fontSize: 15,
-            fontWeight: FontWeight.w400,
-            radius: 7,
-            backgroundColor: context.appColors.orangeBG,
-          ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5),
+          const SizedBox(height: 17.5),
         ],
       ),
     );

+ 4 - 5
packages/cpt_form/lib/modules/detail/detail_processing_fragment.dart

@@ -81,7 +81,7 @@ class DetailProcessingFragment extends HookConsumerWidget {
                           text: S.current.send_on_sometime(' '),
                         ),
                         TextSpan(
-                          text: state.forDetail?.sentOn ?? "-",
+                          text: state.forDetail?.createdAt ?? "-",
                           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
                         ),
                       ],
@@ -147,7 +147,6 @@ class DetailProcessingFragment extends HookConsumerWidget {
               ),
             ),
           ).expanded(),
-
           Row(
             children: [
               MyButton(
@@ -166,9 +165,10 @@ class DetailProcessingFragment extends HookConsumerWidget {
                 onPressed: () {
                   FormTermsPage.startInstance(
                     formType: state.typeId ?? "",
-                    estateFormId: state.estateFormId,
+                    estateFormId: state.estateFormId ?? "",
                     formItem: null,
                     enableEdit: false,
+                    description: state.forDetail?.description,
                     formContent: state.forDetail?.content,
                   );
                 },
@@ -181,12 +181,11 @@ class DetailProcessingFragment extends HookConsumerWidget {
               ).expanded(),
             ],
           ).marginOnly(left: 15, right: 15),
-
           Visibility(
             visible: state.forDetail?.order?.refundStatus != 0 || state.forDetail?.order?.paymentStatus != 1,
             child: MyButton(
               onPressed: () {
-                viewModel.doPaymentOrder(state.forDetail?.order?.id??"");
+                viewModel.doPaymentOrder(state.forDetail?.order?.id ?? "");
               },
               text: S.current.payment,
               textColor: Colors.white,

+ 1 - 1
packages/cpt_form/lib/modules/detail/form_detail_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'form_detail_view_model.dart';
 // **************************************************************************
 
 String _$formDetailViewModelHash() =>
-    r'cb3ec02850ae818982d6358f0935b09546515ba1';
+    r'37c7b4f7ba1ce1be7eb0685884724bb086969cbb';
 
 /// See also [FormDetailViewModel].
 @ProviderFor(FormDetailViewModel)

+ 3 - 2
packages/cpt_form/lib/modules/form/apply/form_apply_screen.dart

@@ -45,9 +45,10 @@ class FormApplyScreen extends HookConsumerWidget {
                   //进入申请的协议页面
                   FormTermsPage.startInstance(
                     formType: state.datas[index].typeId!,
-                    estateFormId: null,
-                    formItem: state.datas[index],
                     enableEdit: true,
+                    estateFormId: state.datas[index].id!,
+                    formItem: state.datas[index],
+                    description: state.datas[index].description,
                   );
                 });
               },

+ 1 - 1
packages/cpt_form/lib/modules/form/approve/form_approve_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'form_approve_view_model.dart';
 // **************************************************************************
 
 String _$formApproveViewModelHash() =>
-    r'88b513f846a7e885ee951878529e54a0f63d5e67';
+    r'2391b9a8ae2d4f314c65143c839163e1f8823d52';
 
 /// See also [FormApproveViewModel].
 @ProviderFor(FormApproveViewModel)

+ 1 - 1
packages/cpt_form/lib/modules/form/submit/form_submit_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'form_submit_view_model.dart';
 // **************************************************************************
 
 String _$formSubmitViewModelHash() =>
-    r'87ef17cca1f53c2e845733c2d08b3d5e97bc7845';
+    r'e4cf4c2d7dcde81db874fa84d3a1e556b05adb8a';
 
 /// See also [FormSubmitViewModel].
 @ProviderFor(FormSubmitViewModel)

+ 6 - 0
packages/cpt_form/lib/router/component/form_component_service.dart

@@ -1,6 +1,7 @@
 /*
  * Community 组件的组件路由
  */
+import 'package:cpt_form/modules/detail/form_detail_page.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:router/componentRouter/form_service.dart';
 import 'package:flutter/material.dart';
@@ -21,4 +22,9 @@ class FormComponentService extends FormService {
   void startFormPage() {
     FormPage.startInstance();
   }
+
+  @override
+  void startFormDetailPage(String estateFormId, String taskId, String typeId) {
+    FormDetailPage.startInstance(estateFormId: estateFormId, taskId: taskId, type: typeId);
+  }
 }

+ 16 - 10
packages/cpt_form/lib/router/page/form_page_router.gr.dart

@@ -83,9 +83,10 @@ abstract class _$FormPageRouter extends RootStackRouter {
           key: args.key,
           type: args.type,
           estateFormId: args.estateFormId,
-          formItem: args.formItem,
           enableEdit: args.enableEdit,
+          formItem: args.formItem,
           formContent: args.formContent,
+          description: args.description,
         ),
       );
     },
@@ -309,10 +310,11 @@ class FormTermsPageRoute extends PageRouteInfo<FormTermsPageRouteArgs> {
   FormTermsPageRoute({
     Key? key,
     required String type,
-    String? estateFormId,
-    FormListEntity? formItem,
+    required String estateFormId,
     required bool enableEdit,
+    FormListEntity? formItem,
     FormContentEntity? formContent,
+    String? description,
     List<PageRouteInfo>? children,
   }) : super(
           FormTermsPageRoute.name,
@@ -320,9 +322,10 @@ class FormTermsPageRoute extends PageRouteInfo<FormTermsPageRouteArgs> {
             key: key,
             type: type,
             estateFormId: estateFormId,
-            formItem: formItem,
             enableEdit: enableEdit,
+            formItem: formItem,
             formContent: formContent,
+            description: description,
           ),
           initialChildren: children,
         );
@@ -337,27 +340,30 @@ class FormTermsPageRouteArgs {
   const FormTermsPageRouteArgs({
     this.key,
     required this.type,
-    this.estateFormId,
-    this.formItem,
+    required this.estateFormId,
     required this.enableEdit,
+    this.formItem,
     this.formContent,
+    this.description,
   });
 
   final Key? key;
 
   final String type;
 
-  final String? estateFormId;
-
-  final FormListEntity? formItem;
+  final String estateFormId;
 
   final bool enableEdit;
 
+  final FormListEntity? formItem;
+
   final FormContentEntity? formContent;
 
+  final String? description;
+
   @override
   String toString() {
-    return 'FormTermsPageRouteArgs{key: $key, type: $type, estateFormId: $estateFormId, formItem: $formItem, enableEdit: $enableEdit, formContent: $formContent}';
+    return 'FormTermsPageRouteArgs{key: $key, type: $type, estateFormId: $estateFormId, enableEdit: $enableEdit, formItem: $formItem, formContent: $formContent, description: $description}';
   }
 }
 

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

@@ -133,6 +133,7 @@ class HomePage extends HookConsumerWidget {
                 right: 0,
                 bottom: 0,
                 child: EasyRefresh(
+                  header: const MaterialHeader(),
                   controller: viewModel.refreshController,
                   onRefresh: viewModel.onRefresh,
                   child: CustomScrollView(

+ 1 - 0
packages/cpt_main/lib/modules/home/latest_news/property/latest_news_property_view_model.dart

@@ -113,6 +113,7 @@ class LatestNewsPropertyViewModel extends _$LatestNewsPropertyViewModel with Dio
 
   /// 去详情页面
   void gotoLatestNewsDetail(BuildContext context, LatestNewsList data) async {
+    //先获取到详情
     final result = await _mainRepository.fetchLatestNewsDetail(id: data.id ?? "");
     if (result.isSuccess) {
       GlobalWebPage.startInstance(context: context, title: S.current.latest_news, url: result.data?.content ?? "");

+ 26 - 0
packages/cpt_main/lib/modules/main/main_view_model.dart

@@ -1,17 +1,23 @@
+import 'package:domain/repository/auth_repository.dart';
 import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:shared/utils/event_bus.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'main_state.dart';
+import 'package:plugin_basic/fcm/fcm_utils.dart';
 
 part 'main_view_model.g.dart';
 
 @riverpod
 class MainViewModel extends _$MainViewModel with DioCancelableMixin {
+  late final AuthRepository _authRepository;
+
   @override
   MainState build() {
+    _authRepository = ref.read(authRepositoryProvider);
     final state = MainState();
 
     registerEventBus();
@@ -19,6 +25,7 @@ class MainViewModel extends _$MainViewModel with DioCancelableMixin {
       unregisterEventBus();
     });
 
+    _registerFCM();
     return state;
   }
 
@@ -41,4 +48,23 @@ class MainViewModel extends _$MainViewModel with DioCancelableMixin {
     bus.off(AppConstant.eventProfileRefresh, subscribe);
   }
 
+  void _registerFCM() {
+    //获取token,并初始化监听
+    FcmUtils().initNotifications(onToken: (fcmToken) {
+      Log.d("准备注册FCM Token :$fcmToken");
+      _doRegisterFCM(fcmToken);
+    });
+  }
+
+  /// 调用接口注册FCM
+  void _doRegisterFCM(String fcmToken) async {
+    final result = await _authRepository.registerFCMToken(fcmToken: fcmToken, cancelToken: cancelToken);
+
+    //请求成功去首页
+    if (result.isSuccess) {
+      Log.d("注册 FMC Token 成功!");
+    } else {
+      ToastEngine.show(result.errorMsg ?? "UnKnow Error");
+    }
+  }
 }

+ 5 - 5
packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_page.dart

@@ -77,11 +77,11 @@ class AnnouncementDetailPage extends HookConsumerWidget {
             mainAxisAlignment: MainAxisAlignment.start,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
-              const MyAssetImage(
-                Assets.noticeBoardAnnouncementDetailDate,
-                width: 15,
-                height: 15,
-              ).marginOnly(right: 8),
+              // const MyAssetImage(
+              //   Assets.noticeBoardAnnouncementDetailDate,
+              //   width: 15,
+              //   height: 15,
+              // ).marginOnly(right: 8),
                Text(
                 'Date: ',
                 style: TextStyle(

+ 3 - 3
packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart

@@ -50,7 +50,7 @@ class NoticeBoardPage extends HookConsumerWidget {
                   width: MediaQuery.of(context).size.width / topSectionsData.length - 36,
                   height: 70,
                   padding: const EdgeInsets.only(
-                      top: 18, left: 15, right: 15, bottom: 15),
+                      top: 0, left: 0, right: 0, bottom: 0),
                   decoration: BoxDecoration(
                     color: context.appColors.lightBlueBg, // 设置圆形背景颜色
                     shape: BoxShape.circle, // 设置为圆形
@@ -67,8 +67,8 @@ class NoticeBoardPage extends HookConsumerWidget {
                   ),
                   child: MyAssetImage(
                     item['icon'],
-                    width: 39,
-                    height: 36,
+                    width: 140,
+                    height: 140,
                   ).onTap(
                     () {
                       tabsRouter.setActiveIndex(index);

+ 3 - 1
packages/cpt_payment/lib/modules/payment/history/history_list_screen.dart

@@ -41,7 +41,9 @@ class HistoryListScreen extends HookConsumerWidget {
             SliverList(
                 delegate: SliverChildBuilderDelegate(
               (context, index) {
-                return HistoryListItem(index: index, item: state.datas[index]).onTap(() {});
+                return HistoryListItem(index: index, item: state.datas[index]).onTap(() {
+                  viewModel.gotoPaymentDetailPageByType(state.datas[index]);
+                });
               },
               childCount: state.datas.length,
             ))

+ 3 - 2
packages/cpt_payment/lib/modules/payment/history/history_list_state.dart

@@ -1,3 +1,4 @@
+import 'package:domain/entity/payment_page_entity.dart';
 import 'package:widgets/load_state_layout.dart';
 
 class HistoryListState {
@@ -6,7 +7,7 @@ class HistoryListState {
   LoadState loadingState;
   String? errorMessage;
 
-  List<String> datas; //页面列表数据
+  List<PaymentPageList> datas; //页面列表数据
 
   // ===================================  Begin  ↓  ===================================
 
@@ -20,7 +21,7 @@ class HistoryListState {
     LoadState? loadingState,
     String? errorMessage,
     bool? needShowPlaceholder,
-    List<String>? datas,
+    List<PaymentPageList>? datas,
   }) {
     return HistoryListState(
       errorMessage: errorMessage ?? this.errorMessage,

+ 80 - 71
packages/cpt_payment/lib/modules/payment/history/history_list_view_model.dart

@@ -1,25 +1,36 @@
+import 'package:domain/entity/payment_page_entity.dart';
+import 'package:domain/repository/payment_repository.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
+import '../../payment_success/payment_success_page.dart';
 import 'history_list_state.dart';
+
 part 'history_list_view_model.g.dart';
 
 @riverpod
-class HistoryListViewModel extends _$HistoryListViewModel {
+class HistoryListViewModel extends _$HistoryListViewModel with DioCancelableMixin {
+  late final PaymentRepository _paymentRepository;
   var _curPage = 1; //请求参数当前的页面
   var _needShowPlaceholder = true; //是否展示LoadingView
 
   // Refresh 控制器
   final EasyRefreshController refreshController = EasyRefreshController(
-    controlFinishRefresh: true,  //允许刷新
-    controlFinishLoad: true,   //允许加载
+    controlFinishRefresh: true, //允许刷新
+    controlFinishLoad: true, //允许加载
   );
 
   @override
   HistoryListState build() {
-    return HistoryListState(datas: []);
+    _paymentRepository = ref.read(paymentRepositoryProvider);
+    final state = HistoryListState(datas: []);
+    registerCancellation();
+    return state;
   }
 
   //刷新页面状态
@@ -52,78 +63,76 @@ class HistoryListViewModel extends _$HistoryListViewModel {
       changeLoadingState(LoadState.State_Loading, null);
     }
 
-    // 获取 Applied 列表
-    // var listResult = await _jobRepository.fetchJobAppliedList(
-    //   state.jobId,
-    //   state.selectedStatusId,
-    //   state.keyword,
-    //   curPage: _curPage,
-    //   cancelToken: cancelToken,
-    // );
-    //
-    // // 处理数据
-    // if (listResult.isSuccess) {
-    //   handleList(listResult.data?.rows);
-    // } else {
-    //   errorMessage = listResult.errorMsg;
-    //   changeLoadingState(LoadState.State_Error);
-    // }
-
-
-    await Future.delayed(const Duration(milliseconds: 1500));
-
-    final List<String> list = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
-
-    if (_curPage == 1) {
-      //刷新的方式
-      state = state.copyWith(datas: list);
-      refreshController.finishRefresh();
-
-      //更新展示的状态
-      changeLoadingState(LoadState.State_Success, null);
-    } else {
-      //加载更多
-      final allList = state.datas;
-      allList.addAll(list);
-      state.datas.addAll(list);
-
-      refreshController.finishLoad();
+    // 获取列表
+    var listResult = await _paymentRepository.fetchPaymentList(
+      type: 'history',
+      curPage: _curPage,
+      cancelToken: cancelToken,
+    );
 
-      state = state.copyWith(datas: allList);
+    // 处理数据
+    if (listResult.isSuccess) {
+      handleList(listResult.data?.list);
+    } else {
+      changeLoadingState(LoadState.State_Error, listResult.errorMsg);
     }
 
     // 最后赋值
     _needShowPlaceholder = false;
   }
 
-// 处理数据与展示的逻辑
-// void handleList(List<JobAppliedListSGRows>? list) {
-//   if (list != null && list.isNotEmpty) {
-//     //有数据,判断是刷新还是加载更多的数据
-//     if (_curPage == 1) {
-//       //刷新的方式
-//       state.datas.clear();
-//       state.datas.addAll(list);
-//       refreshController.finishRefresh();
-//
-//       //更新展示的状态
-//       changeLoadingState(LoadState.State_Success);
-//     } else {
-//       //加载更多
-//       state.datas.addAll(list);
-//       refreshController.finishLoad();
-//       update();
-//     }
-//   } else {
-//     if (_curPage == 1) {
-//       //展示无数据的布局
-//       state.datas.clear();
-//       changeLoadingState(LoadState.State_Empty);
-//       refreshController.finishRefresh();
-//     } else {
-//       //展示加载完成,没有更多数据了
-//       refreshController.finishLoad(IndicatorResult.noMore);
-//     }
-//   }
-// }
+  // 处理数据与展示的逻辑
+  void handleList(List<PaymentPageList>? list) {
+    if (list != null && list.isNotEmpty) {
+      //有数据,判断是刷新还是加载更多的数据
+      if (_curPage == 1) {
+        //刷新的方式
+        state = state.copyWith(datas: list);
+        refreshController.finishRefresh();
+
+        //更新展示的状态
+        changeLoadingState(LoadState.State_Success, null);
+      } else {
+        //加载更多
+        state.datas.addAll(List<PaymentPageList>.from(state.datas)..addAll(list));
+        refreshController.finishLoad();
+      }
+    } else {
+      if (_curPage == 1) {
+        //展示无数据的布局
+        state = state.copyWith(datas: []);
+        changeLoadingState(LoadState.State_Empty, null);
+        refreshController.finishRefresh();
+      } else {
+        //展示加载完成,没有更多数据了
+        refreshController.finishLoad(IndicatorResult.noMore);
+      }
+    }
+  }
+
+  //根据类型跳转到详情页面
+  void gotoPaymentDetailPageByType(PaymentPageList data) {
+    switch (data.type) {
+      case 'facility_booking':
+        //设施预定订单
+        ComponentServiceManager().facilityService.startFacilityDetailPage(id: data.orderable?.id ?? "");
+        break;
+      case 'online_form_apply':
+        //在线表单订单
+        ComponentServiceManager().formService.startFormDetailPage(
+          data.orderable?.estateOnlineFormId ?? "",
+          data.orderable?.id ?? "",
+          data.orderable?.onlineFormTypeId ?? "",
+        );
+        break;
+      case 'paid_service_order':
+        //服务订单
+        ToastEngine.show("Service 的订单,自己写路由跳转到支付详情页面");
+        break;
+      default:
+        //默认周期订单的支付 (通用支付页面)
+        PaymentSuccessPage.startWithPop(orderId: data.id);
+        break;
+    }
+  }
 }

+ 1 - 1
packages/cpt_payment/lib/modules/payment/history/history_list_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'history_list_view_model.dart';
 // **************************************************************************
 
 String _$historyListViewModelHash() =>
-    r'87eda063f8265a39a0f0ec47b4b1c688ed09b8d1';
+    r'94a8d6dbdc4de5fc3a848ac3f8800575c4200427';
 
 /// See also [HistoryListViewModel].
 @ProviderFor(HistoryListViewModel)

+ 46 - 87
packages/cpt_payment/lib/modules/payment/history/item_history_list.dart

@@ -1,13 +1,14 @@
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:domain/entity/payment_page_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 
-///  Condo的History的Item
+/// Payment 的History的Item
 class HistoryListItem extends StatelessWidget {
   final int index;
-  final String item;
+  final PaymentPageList item;
 
   const HistoryListItem({
     required this.index,
@@ -32,67 +33,57 @@ class HistoryListItem extends StatelessWidget {
           ),
         ],
       ),
-      child: Row(
-        mainAxisSize: MainAxisSize.max,
+      child: Column(
         crossAxisAlignment: CrossAxisAlignment.start,
         children: [
-          Column(
-            crossAxisAlignment: CrossAxisAlignment.start,
-            children: [
-              //设施
-              MyTextView(
-                "Kids party room",
-                fontSize: 16,
-                maxLines: 3,
-                textColor: context.appColors.textBlack,
-                isFontMedium: true,
-              ),
+          //标题
+          MyTextView(
+            item.title ?? "",
+            fontSize: 16,
+            maxLines: 3,
+            textColor: context.appColors.textBlack,
+            isFontMedium: true,
+          ),
 
-              //预订
-              MyTextView(
-                S.current.booked_by_someone("Wu Bing Bing"),
-                fontSize: 14,
-                marginTop: 3,
-                textColor: context.appColors.textBlack,
-                isFontRegular: true,
-              ),
+          //付款人
+          MyTextView(
+            S.current.booked_by_someone(item.account?.name ?? ""),
+            fontSize: 14,
+            marginTop: 3,
+            textColor: context.appColors.textBlack,
+            isFontRegular: true,
+          ),
 
-              //日期
-              MyTextView(
-                "Tue,24 Oct 2023",
-                fontSize: 14,
-                marginTop: 16,
-                textColor: context.appColors.textBlack,
-                isFontRegular: true,
-              ),
+          //日期
+          MyTextView(
+            item.paidAt ?? "",
+            fontSize: 14,
+            marginTop: 16,
+            marginBottom: 8,
+            textColor: context.appColors.textBlack,
+            isFontRegular: true,
+          ),
 
-              //时间
+          //标签
+          Row(
+            children: [
               MyTextView(
-                "05:00 PM-10:00 PM",
-                fontSize: 14,
-                marginBottom: 7,
-                marginTop: 3,
-                textColor: context.appColors.textBlack,
+                "Fee Paid",
+                textColor: context.appColors.textPrimary,
+                fontSize: 13,
                 isFontRegular: true,
+                backgroundColor: context.appColors.lightBlueDarkBg,
+                cornerRadius: 3,
+                paddingLeft: 7,
+                marginRight: 6,
+                paddingRight: 7,
+                paddingTop: 3,
+                paddingBottom: 3,
               ),
 
-              //标签
-              Row(
-                children: [
-                  MyTextView(
-                    "Fee Paid",
-                    textColor: context.appColors.textPrimary,
-                    fontSize: 13,
-                    isFontRegular: true,
-                    backgroundColor: context.appColors.lightBlueDarkBg,
-                    cornerRadius: 3,
-                    paddingLeft: 7,
-                    marginRight: 6,
-                    paddingRight: 7,
-                    paddingTop: 3,
-                    paddingBottom: 3,
-                  ),
-                  MyTextView(
+              Visibility(
+                  visible: item.refundStatus != 0,
+                  child: MyTextView(
                     "Deposit Released",
                     textColor: context.appColors.textPrimary,
                     fontSize: 13,
@@ -104,39 +95,7 @@ class HistoryListItem extends StatelessWidget {
                     paddingRight: 7,
                     paddingTop: 3,
                     paddingBottom: 3,
-                  )
-                ],
-              )
-            ],
-          ).expanded(),
-          Column(
-            mainAxisSize: MainAxisSize.min,
-            mainAxisAlignment:MainAxisAlignment.start,
-            crossAxisAlignment: CrossAxisAlignment.start,
-            children: [
-              //查看按钮
-              MyTextView(
-                S.current.view,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                cornerRadius: 7,
-                paddingTop: 9,
-                paddingBottom: 9,
-                textAlign: TextAlign.center,
-                boxWidth: 60,
-              ),
-
-              MyTextView(
-                S.current.delete,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.orangeBG,
-                cornerRadius: 7,
-                paddingTop: 9,
-                marginTop: 15,
-                paddingBottom: 9,
-                textAlign: TextAlign.center,
-                boxWidth: 60,
-              )
+                  ))
             ],
           )
         ],

+ 55 - 16
packages/cpt_payment/lib/modules/payment/payment/item_payment_list.dart

@@ -1,3 +1,5 @@
+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:domain/entity/payment_page_entity.dart';
 import 'package:flutter/material.dart';
@@ -6,8 +8,6 @@ import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/utils/dark_theme_util.dart';
 
-import 'payment_list_types.dart';
-
 /// Condo Active 的 Item 布局
 class PaymentListItem extends StatelessWidget {
   final int index;
@@ -22,9 +22,8 @@ class PaymentListItem extends StatelessWidget {
   Widget build(BuildContext context) {
     return Container(
       width: double.infinity,
-      height: 80,
       margin: const EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
-      padding: const EdgeInsets.symmetric(horizontal: 20),
+      padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
       decoration: BoxDecoration(
         color: context.appColors.whiteBG,
         borderRadius: BorderRadius.circular(6.0), // 圆角
@@ -42,19 +41,59 @@ class PaymentListItem extends StatelessWidget {
         crossAxisAlignment: CrossAxisAlignment.center,
         children: [
           MyAssetImage(
-            PaymentListTypes.iconMap[item.type]?['icon_path'],
-            width: PaymentListTypes.iconMap[item.type]?['width'],
-            height: PaymentListTypes.iconMap[item.type]?['height'],
-            color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary,darkColor: Colors.white),
+            Assets.paymentPaymentPendingIcon,
+            width: 38.5,
+            height: 36.5,
+            color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
           ),
-
-          MyTextView(
-            PaymentListTypes.iconMap[item.type]?['name'],
-            marginLeft: 17,
-            fontSize: 16,
-            textColor: context.appColors.textBlack,
-            isFontMedium: true,
-          ).expanded(),
+          Column(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              MyTextView(
+                item.title ?? "",
+                fontSize: 16,
+                textColor: context.appColors.textBlack,
+                isFontMedium: true,
+              ),
+              MyTextView(
+                item.type == "property" || item.type == "vehicle" ? "${item.orderable?.startAt} - ${item.orderable?.endAt}" : item.createdAt ?? "",
+                marginTop: 4,
+                fontSize: 11,
+                textColor: context.appColors.textBlack,
+                isFontRegular: true,
+              ),
+              Row(
+                children: [
+                  MyTextView(
+                    "${S.current.amount}:",
+                    fontSize: 11,
+                    textColor: context.appColors.textBlack,
+                    isFontRegular: true,
+                  ),
+                  MyTextView(
+                    "\$${item.orderAmount}",
+                    fontSize: 11,
+                    textColor: context.appColors.textPrimary,
+                    isFontRegular: true,
+                  ),
+                  MyTextView(
+                    "${S.current.deposit}:",
+                    marginLeft: 10,
+                    fontSize: 11,
+                    textColor: context.appColors.textBlack,
+                    isFontRegular: true,
+                  ),
+                  MyTextView(
+                    "\$${item.depositAmount}",
+                    fontSize: 11,
+                    textColor: context.appColors.textPrimary,
+                    isFontRegular: true,
+                  ),
+                ],
+              ).marginOnly(top: 4)
+            ],
+          ).marginOnly(left: 17).expanded(),
         ],
       ),
     );

+ 4 - 1
packages/cpt_payment/lib/modules/payment/payment/payment_list_screen.dart

@@ -7,6 +7,7 @@ import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
+import '../../payment_confirm/payment_confirm_page.dart';
 import 'payment_list_view_model.dart';
 import 'item_payment_list.dart';
 
@@ -44,7 +45,9 @@ class PaymentListScreen extends HookConsumerWidget {
                       (context, index) {
                     return PaymentListItem(index: index, item: state.datas[index]).onTap(() {
                       //去信息页面
-                      PaymentInfoPage.startInstance(context: context);
+                      //根据类型跳转到不同的页面
+                      viewModel.gotoPaymentPage(state.datas[index]);
+
                     });
                   },
                   childCount: state.datas.length,

+ 0 - 25
packages/cpt_payment/lib/modules/payment/payment/payment_list_types.dart

@@ -1,25 +0,0 @@
-
-import 'package:cs_resources/generated/assets.dart';
-import 'package:cs_resources/generated/l10n.dart';
-
-
-class PaymentListTypes {
-  //对应的type类型 对应的icon的图片与宽高
-  static Map<String, Map<String, dynamic>> iconMap = {
-    //物业费
-    'property': {
-      'name': S.current.property_payment,
-      'icon_path': Assets.formCarVehicle,
-      'width': 39.5,
-      'height': 33.5,
-    },
-    //停车费
-    'vehicle': {
-      'name': S.current.parking_fee_payment,
-      'icon_path': Assets.paymentPropertyPaymentIcon,
-      'width': 39.5,
-      'height': 36.0,
-    },
-  };
-
-}

+ 57 - 2
packages/cpt_payment/lib/modules/payment/payment/payment_list_view_model.dart

@@ -1,17 +1,22 @@
 import 'package:domain/entity/payment_page_entity.dart';
 import 'package:domain/repository/payment_repository.dart';
+import 'package:plugin_basic/constants/app_constant.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
+import 'package:shared/utils/event_bus.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
+import '../../payment_confirm/payment_confirm_page.dart';
 import 'payment_list_state.dart';
 
 part 'payment_list_view_model.g.dart';
 
 @riverpod
-class PaymentListViewModel extends _$PaymentListViewModel with DioCancelableMixin{
+class PaymentListViewModel extends _$PaymentListViewModel with DioCancelableMixin {
   late final PaymentRepository _paymentRepository;
   var _curPage = 1; //请求参数当前的页面
   var _needShowPlaceholder = true; //是否展示LoadingView
@@ -26,7 +31,12 @@ class PaymentListViewModel extends _$PaymentListViewModel with DioCancelableMixi
   PaymentListState build() {
     _paymentRepository = ref.read(paymentRepositoryProvider);
     final state = PaymentListState(datas: []);
-    registerCancellation();
+
+    registerEventBus();
+    registerCancellation(callback: () {
+      unregisterEventBus();
+    });
+
     return state;
   }
 
@@ -106,4 +116,49 @@ class PaymentListViewModel extends _$PaymentListViewModel with DioCancelableMixi
       }
     }
   }
+
+  /// 根据类型跳转到不同的支付页面去支付
+  void gotoPaymentPage(PaymentPageList data) {
+    switch (data.type) {
+      case 'facility_booking':
+        //设施预定订单
+        ComponentServiceManager().facilityService.startFacilityDetailPage(id: data.orderable?.id ?? "");
+        break;
+      case 'online_form_apply':
+        //在线表单订单
+        ComponentServiceManager().formService.startFormDetailPage(
+              data.orderable?.estateOnlineFormId ?? "",
+              data.orderable?.id ?? "",
+              data.orderable?.onlineFormTypeId ?? "",
+            );
+        break;
+      case 'paid_service_order':
+        //服务订单
+        ToastEngine.show("Service 的订单,自己写路由跳转到支付确认页面");
+        break;
+      default:
+        //默认周期订单的支付 (通用支付页面)
+        PaymentConfirmPage.startInstance(
+          title: data.title,
+          orderId: data.id,
+          amount: data.orderAmount,
+          deposit: data.depositAmount,
+        );
+        break;
+    }
+  }
+
+  // EventBus 的事件接收
+  Subscription? subscribe;
+
+  void registerEventBus() {
+    subscribe = bus.on(AppConstant.eventStripePaymentSuccess, (arg) {
+      //用户支付成功的通知
+      refreshController.callRefresh();
+    });
+  }
+
+  void unregisterEventBus() {
+    bus.off(AppConstant.eventStripePaymentSuccess, subscribe);
+  }
 }

+ 1 - 1
packages/cpt_payment/lib/modules/payment/payment/payment_list_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'payment_list_view_model.dart';
 // **************************************************************************
 
 String _$paymentListViewModelHash() =>
-    r'aac4515525c2ec4c013bb07ad3da281258cef311';
+    r'b3d776c00199744d687fa0df87874ea4c5e6c84a';
 
 /// See also [PaymentListViewModel].
 @ProviderFor(PaymentListViewModel)

+ 164 - 77
packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_page.dart

@@ -17,14 +17,31 @@ import 'payment_confirm_view_model.dart';
 
 @RoutePage()
 class PaymentConfirmPage extends HookConsumerWidget {
-  const PaymentConfirmPage({Key? key}) : super(key: key);
+  final String? title;
+  final String? orderId;
+  final String? amount;
+  final String? deposit;
+
+  const PaymentConfirmPage({
+    Key? key,
+    @PathParam() required this.title,
+    @PathParam() required this.orderId,
+    @PathParam() required this.amount,
+    @PathParam() this.deposit,
+  }) : super(key: key);
 
   //启动当前页面
-  static void startInstance({BuildContext? context}) {
+  static void startInstance({
+    BuildContext? context,
+    required String? title,
+    required String? orderId,
+    required String? amount,
+    String? deposit,
+  }) {
     if (context != null) {
-      context.router.push(const PaymentConfirmPageRoute());
+      context.router.push(PaymentConfirmPageRoute(title: title, orderId: orderId, amount: amount, deposit: deposit));
     } else {
-      appRouter.push(const PaymentConfirmPageRoute());
+      appRouter.push(PaymentConfirmPageRoute(title: title, orderId: orderId, amount: amount, deposit: deposit));
     }
   }
 
@@ -34,7 +51,7 @@ class PaymentConfirmPage extends HookConsumerWidget {
     final state = ref.watch(paymentConfirmViewModelProvider);
 
     return Scaffold(
-      appBar: MyAppBar.appBar(context, "付款的标题"),
+      appBar: MyAppBar.appBar(context, title ?? "Payment"),
       backgroundColor: context.appColors.backgroundWhite,
       body: Column(
         mainAxisSize: MainAxisSize.max,
@@ -46,87 +63,158 @@ class PaymentConfirmPage extends HookConsumerWidget {
             child: Column(
               crossAxisAlignment: CrossAxisAlignment.start,
               children: [
-                //金额
-                Row(
-                  children: [
-                    MyAssetImage(
-                      Assets.paymentInfoDetails,
-                      width: 27,
-                      height: 27,
-                      color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
-                    ),
-                    MyTextView(
-                      S.current.payment_details,
-                      textColor: context.appColors.textBlack,
-                      fontSize: 17,
-                      marginLeft: 14,
-                      isFontMedium: true,
-                    ).expanded(),
-                  ],
-                ).marginOnly(top: 15, left: 15, right: 15),
-
-                Row(
-                  children: [
-                    MyTextView(
-                      "SGD",
-                      textColor: context.appColors.textBlack,
-                      fontSize: 18,
-                      isFontRegular: true,
-                    ),
-                    MyTextView(
-                      "\$21.80",
-                      textColor: context.appColors.textPrimary,
-                      fontSize: 22,
-                      marginLeft: 12,
-                      isFontMedium: true,
-                    ).expanded(),
-                  ],
-                ).marginOnly(top: 20, left: 15, right: 15),
-
-                Container(
-                  height: 0.5,
-                  margin: const EdgeInsets.only(top: 22, bottom: 13.5, left: 15, right: 15),
-                  color: context.appColors.dividerDefault,
+                //支付
+                Visibility(
+                  visible: true,
+                  child: Row(
+                    children: [
+                      MyAssetImage(
+                        Assets.paymentInfoDetails,
+                        width: 27,
+                        height: 27,
+                        color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                      ),
+                      MyTextView(
+                        S.current.payment,
+                        textColor: context.appColors.textBlack,
+                        fontSize: 17,
+                        marginLeft: 14,
+                        isFontMedium: true,
+                      ).expanded(),
+                    ],
+                  ).marginOnly(top: 15, left: 15, right: 15),
+                ),
+
+                //支付金额
+                Visibility(
+                  visible: true,
+                  child: Row(
+                    mainAxisSize: MainAxisSize.max,
+                    children: [
+                      MyTextView(
+                        S.current.fee,
+                        textColor: context.appColors.textBlack,
+                        fontSize: 18,
+                        isFontRegular: true,
+                      ),
+                      const Spacer(),
+                      MyTextView(
+                        "SGD",
+                        textColor: context.appColors.textBlack,
+                        fontSize: 18,
+                        isFontRegular: true,
+                      ),
+                      MyTextView(
+                        "\$${amount ?? "0.00"}",
+                        textColor: context.appColors.textPrimary,
+                        fontSize: 22,
+                        marginLeft: 8,
+                        isFontMedium: true,
+                      ),
+                    ],
+                  ).marginOnly(top: 20, left: 15, right: 15, bottom: 20),
+                ),
+
+                //分割线
+                Visibility(
+                  visible: deposit != null && int.parse(deposit!) > 0,
+                  child: Divider(
+                    color: context.appColors.dividerDefault,
+                    height: 0.5,
+                  ),
                 ),
 
-                // DESC
-                Row(
-                  children: [
-                    MyAssetImage(
-                      Assets.paymentInfoNotes,
-                      width: 27,
-                      height: 27,
-                      color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
-                    ),
-                    MyTextView(
-                      S.current.notes_to_recipient,
-                      textColor: context.appColors.textBlack,
-                      fontSize: 17,
-                      marginLeft: 14,
-                      isFontMedium: true,
-                    ).expanded(),
-                  ],
-                ).marginOnly(left: 15, right: 15),
-
-                MyTextView(
-                  "The money has already been paid",
-                  textColor: context.appColors.textPrimary,
-                  fontSize: 16,
-                  marginTop: 15,
-                  marginBottom: 20,
-                  marginLeft: 15,
-                  marginRight: 15,
-                  isFontRegular: true,
+                //押金
+                Visibility(
+                  visible: deposit != null && int.parse(deposit!) > 0,
+                  child: Row(
+                    children: [
+                      MyAssetImage(
+                        Assets.paymentInfoDetails,
+                        width: 27,
+                        height: 27,
+                        color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                      ),
+                      MyTextView(
+                        S.current.deposit,
+                        textColor: context.appColors.textBlack,
+                        fontSize: 17,
+                        marginLeft: 14,
+                        isFontMedium: true,
+                      ).expanded(),
+                    ],
+                  ).marginOnly(top: 15, left: 15, right: 15),
                 ),
 
-                _paymentInfo(context, ref),
+                //押金金额
+                Visibility(
+                  visible: deposit != null && int.parse(deposit!) > 0,
+                  child: Row(
+                    children: [
+                      MyTextView(
+                        S.current.deposit_hold,
+                        textColor: context.appColors.textBlack,
+                        fontSize: 18,
+                        isFontRegular: true,
+                      ),
+                      const Spacer(),
+                      MyTextView(
+                        "SGD",
+                        textColor: context.appColors.textBlack,
+                        fontSize: 18,
+                        isFontRegular: true,
+                      ),
+                      MyTextView(
+                        "\$${deposit ?? "0.00"}",
+                        textColor: context.appColors.textPrimary,
+                        fontSize: 22,
+                        marginLeft: 8,
+                        isFontMedium: true,
+                      ),
+                    ],
+                  ).marginOnly(top: 20, left: 15, right: 15, bottom: 20),
+                ),
+
+                // // DESC
+                // Row(
+                //   children: [
+                //     MyAssetImage(
+                //       Assets.paymentInfoNotes,
+                //       width: 27,
+                //       height: 27,
+                //       color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                //     ),
+                //     MyTextView(
+                //       S.current.notes_to_recipient,
+                //       textColor: context.appColors.textBlack,
+                //       fontSize: 17,
+                //       marginLeft: 14,
+                //       isFontMedium: true,
+                //     ).expanded(),
+                //   ],
+                // ).marginOnly(left: 15, right: 15),
+
+                // MyTextView(
+                //   "The money has already been paid",
+                //   textColor: context.appColors.textPrimary,
+                //   fontSize: 16,
+                //   marginTop: 15,
+                //   marginBottom: 20,
+                //   marginLeft: 15,
+                //   marginRight: 15,
+                //   isFontRegular: true,
+                // ),
+
+                // _paymentInfo(context, ref),
               ],
             ),
           ).expanded(),
 
           // 底部按钮
           MyButton(
-            onPressed: viewModel.doPayment,
+            onPressed: () {
+              viewModel.doPaymentOrder(orderId ?? "");
+            },
             text: S.current.proceed_with_payment,
             textColor: Colors.white,
             backgroundColor: context.appColors.btnBgDefault,
@@ -171,7 +259,6 @@ class PaymentConfirmPage extends HookConsumerWidget {
               paddingRight: 16,
               paddingLeft: 16,
               paddingTop: 8,
-              onClick: viewModel.gotoChooseCardPage,
               paddingBottom: 8,
               cornerRadius: 7,
               fontSize: 15,

+ 16 - 7
packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_view_model.dart

@@ -1,5 +1,7 @@
 import 'package:cpt_payment/modules/choose_card/choose_card_page.dart';
+import 'package:plugin_platform/engine/loading/loading_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
 
 import '../payment_success/payment_success_page.dart';
 import 'payment_confirm_state.dart';
@@ -13,13 +15,20 @@ class PaymentConfirmViewModel extends _$PaymentConfirmViewModel {
     return PaymentConfirmState();
   }
 
-  //执行支付
-  void doPayment() {
-    PaymentSuccessPage.startWithPop();
-  }
+  //根据OrderId继续支付订单
+  void doPaymentOrder(String orderId) async {
+    //支付流程 Loading 开始
+    LoadingEngine.show();
+
+    //调用支付服务
+    bool success = await ComponentServiceManager().paymentService.executePayment(orderId: orderId);
+
+    //支付流程 Loading 结束
+    LoadingEngine.dismiss();
 
-  //去设置银行卡页面
-  void gotoChooseCardPage() {
-    ChooseCardPage.startInstance();
+    //如果成功,返回页面
+    if (success) {
+      PaymentSuccessPage.startWithPop(orderId: orderId);
+    }
   }
 }

+ 1 - 1
packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'payment_confirm_view_model.dart';
 // **************************************************************************
 
 String _$paymentConfirmViewModelHash() =>
-    r'd49571f12210320ab33926074746f9d30710dfbc';
+    r'bd9a0a264d5db7db1b31fa48c82a6ee42f7d9a50';
 
 /// See also [PaymentConfirmViewModel].
 @ProviderFor(PaymentConfirmViewModel)

+ 1 - 1
packages/cpt_payment/lib/modules/payment_info/payment_info_view_model.dart

@@ -14,6 +14,6 @@ class PaymentInfoViewModel extends _$PaymentInfoViewModel {
 
   //去确定页面
   void gotoConfirmPage() {
-    PaymentConfirmPage.startInstance();
+
   }
 }

+ 1 - 1
packages/cpt_payment/lib/modules/payment_info/payment_info_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'payment_info_view_model.dart';
 // **************************************************************************
 
 String _$paymentInfoViewModelHash() =>
-    r'24cf0498be6ba7ed9cff855d084e4376b1db3613';
+    r'fdd42abc9ffbcd5ef82c592459232782ba913a13';
 
 /// See also [PaymentInfoViewModel].
 @ProviderFor(PaymentInfoViewModel)

+ 44 - 26
packages/cpt_payment/lib/modules/payment_success/payment_success_page.dart

@@ -1,8 +1,10 @@
+import 'package:cpt_payment/modules/payment_success/payment_success_state.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:widgets/ext/ex_widget.dart';
@@ -16,12 +18,17 @@ import 'payment_success_view_model.dart';
 
 @RoutePage()
 class PaymentSuccessPage extends HookConsumerWidget {
-  const PaymentSuccessPage({Key? key}) : super(key: key);
+  final String? orderId;
+
+  const PaymentSuccessPage({
+    Key? key,
+    @PathParam() required this.orderId,
+  }) : super(key: key);
 
   //启动并关闭其他栈
-  static void startWithPop() {
+  static void startWithPop({required String? orderId}) {
     appRouter.pushAndPopUntil(
-      const PaymentSuccessPageRoute(),
+      PaymentSuccessPageRoute(orderId: orderId),
       predicate: (route) {
         return route.settings.name == 'PaymentPageRoute';
       },
@@ -30,10 +37,21 @@ class PaymentSuccessPage extends HookConsumerWidget {
 
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    final viewModel = ref.watch(paymentSuccessViewModelProvider.notifier);
+    final viewModel = ref.read(paymentSuccessViewModelProvider.notifier);
+    final PaymentSuccessState state = ref.watch(paymentSuccessViewModelProvider);
+
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() {
+        viewModel.fetchFormDetail(orderId);
+      });
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
 
     return Scaffold(
-      appBar: MyAppBar.appBar(context, "付款的标题"),
+      appBar: MyAppBar.appBar(context, state?.paymentDetail?.title ?? "Payment Detail"),
       backgroundColor: context.appColors.backgroundWhite,
       body: SizedBox(
         width: double.infinity,
@@ -49,7 +67,7 @@ class PaymentSuccessPage extends HookConsumerWidget {
 
             //支付成功
             MyTextView(
-              S.current.booking_successful,
+              S.current.payment_successful,
               fontSize: 18,
               marginBottom: 3,
               isFontMedium: true,
@@ -65,30 +83,30 @@ class PaymentSuccessPage extends HookConsumerWidget {
               textColor: context.appColors.textBlack,
             ),
             MyTextView(
-              "\$10.80",
+              "\$${state.paymentDetail?.totalAmount ?? ""}",
               fontSize: 15,
               isFontRegular: true,
               textColor: context.appColors.textPrimary,
             ),
 
-            //付款类型与时间
-            Row(
-              mainAxisSize: MainAxisSize.min,
-              children: [
-                MyTextView(
-                  "Master card ending",
-                  fontSize: 15,
-                  isFontRegular: true,
-                  textColor: context.appColors.textBlack,
-                ),
-                MyTextView(
-                  "9423",
-                  fontSize: 15,
-                  isFontMedium: true,
-                  textColor: context.appColors.textBlack,
-                ),
-              ],
-            ).marginOnly(top: 12),
+            // //付款类型与时间
+            // Row(
+            //   mainAxisSize: MainAxisSize.min,
+            //   children: [
+            //     MyTextView(
+            //       "Master card ending",
+            //       fontSize: 15,
+            //       isFontRegular: true,
+            //       textColor: context.appColors.textBlack,
+            //     ),
+            //     MyTextView(
+            //       "9423",
+            //       fontSize: 15,
+            //       isFontMedium: true,
+            //       textColor: context.appColors.textBlack,
+            //     ),
+            //   ],
+            // ).marginOnly(top: 12),
 
             Row(
               mainAxisSize: MainAxisSize.min,
@@ -100,7 +118,7 @@ class PaymentSuccessPage extends HookConsumerWidget {
                   textColor: context.appColors.textBlack,
                 ),
                 MyTextView(
-                  "24 Oct 2023 at 02:19 PM",
+                  state.paymentDetail?.paidAt ?? "",
                   fontSize: 15,
                   isFontMedium: true,
                   textColor: context.appColors.textBlack,

+ 16 - 2
packages/cpt_payment/lib/modules/payment_success/payment_success_state.dart

@@ -1,3 +1,17 @@
-class PaymentSuccessState{
+import 'package:domain/entity/comm_payment_detail_entity.dart';
 
-}
+class PaymentSuccessState {
+  CommPaymentDetailEntity? paymentDetail;
+
+  PaymentSuccessState({
+    this.paymentDetail,
+  });
+
+  PaymentSuccessState copyWith({
+    CommPaymentDetailEntity? detail,
+  }) {
+    return PaymentSuccessState(
+      paymentDetail: detail ?? this.paymentDetail,
+    );
+  }
+}

+ 18 - 0
packages/cpt_payment/lib/modules/payment_success/payment_success_view_model.dart

@@ -1,3 +1,5 @@
+import 'package:domain/repository/payment_repository.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 
 import 'payment_success_state.dart';
@@ -6,8 +8,24 @@ part 'payment_success_view_model.g.dart';
 
 @riverpod
 class PaymentSuccessViewModel extends _$PaymentSuccessViewModel {
+  late final PaymentRepository _paymentRepository;
+
   @override
   PaymentSuccessState build() {
+    _paymentRepository = ref.read(paymentRepositoryProvider);
     return PaymentSuccessState();
   }
+
+  //获取表单的详情数据
+  void fetchFormDetail(String? orderId) async {
+    final result = await _paymentRepository.fetchPaymentDetail(orderId: orderId ?? "");
+
+    //根据后端返回的数据赋值状态
+    if (result.isSuccess) {
+      state = state.copyWith(detail: result.data);
+    } else {
+      ToastEngine.show(result.errorMsg ?? "Unknown Error");
+    }
+  }
+
 }

+ 1 - 1
packages/cpt_payment/lib/modules/payment_success/payment_success_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'payment_success_view_model.dart';
 // **************************************************************************
 
 String _$paymentSuccessViewModelHash() =>
-    r'ac260fa59e53f82ebd16ac2050134cd1991ca395';
+    r'94eca61fc9cdcc7f14120b660e3918747ba87372';
 
 /// See also [PaymentSuccessViewModel].
 @ProviderFor(PaymentSuccessViewModel)

+ 103 - 10
packages/cpt_payment/lib/router/page/payment_page_router.gr.dart

@@ -46,9 +46,23 @@ abstract class _$PaymentPageRouter extends RootStackRouter {
       );
     },
     PaymentConfirmPageRoute.name: (routeData) {
+      final pathParams = routeData.inheritedPathParams;
+      final args = routeData.argsAs<PaymentConfirmPageRouteArgs>(
+          orElse: () => PaymentConfirmPageRouteArgs(
+                title: pathParams.optString('title'),
+                orderId: pathParams.optString('orderId'),
+                amount: pathParams.optString('amount'),
+                deposit: pathParams.optString('deposit'),
+              ));
       return AutoRoutePage<dynamic>(
         routeData: routeData,
-        child: const PaymentConfirmPage(),
+        child: PaymentConfirmPage(
+          key: args.key,
+          title: args.title,
+          orderId: args.orderId,
+          amount: args.amount,
+          deposit: args.deposit,
+        ),
       );
     },
     PaymentInfoPageRoute.name: (routeData) {
@@ -70,9 +84,16 @@ abstract class _$PaymentPageRouter extends RootStackRouter {
       );
     },
     PaymentSuccessPageRoute.name: (routeData) {
+      final pathParams = routeData.inheritedPathParams;
+      final args = routeData.argsAs<PaymentSuccessPageRouteArgs>(
+          orElse: () => PaymentSuccessPageRouteArgs(
+              orderId: pathParams.optString('orderId')));
       return AutoRoutePage<dynamic>(
         routeData: routeData,
-        child: const PaymentSuccessPage(),
+        child: PaymentSuccessPage(
+          key: args.key,
+          orderId: args.orderId,
+        ),
       );
     },
   };
@@ -150,16 +171,62 @@ class ManagePageRoute extends PageRouteInfo<void> {
 
 /// generated route for
 /// [PaymentConfirmPage]
-class PaymentConfirmPageRoute extends PageRouteInfo<void> {
-  const PaymentConfirmPageRoute({List<PageRouteInfo>? children})
-      : super(
+class PaymentConfirmPageRoute
+    extends PageRouteInfo<PaymentConfirmPageRouteArgs> {
+  PaymentConfirmPageRoute({
+    Key? key,
+    required String? title,
+    required String? orderId,
+    required String? amount,
+    String? deposit,
+    List<PageRouteInfo>? children,
+  }) : super(
           PaymentConfirmPageRoute.name,
+          args: PaymentConfirmPageRouteArgs(
+            key: key,
+            title: title,
+            orderId: orderId,
+            amount: amount,
+            deposit: deposit,
+          ),
+          rawPathParams: {
+            'title': title,
+            'orderId': orderId,
+            'amount': amount,
+            'deposit': deposit,
+          },
           initialChildren: children,
         );
 
   static const String name = 'PaymentConfirmPageRoute';
 
-  static const PageInfo<void> page = PageInfo<void>(name);
+  static const PageInfo<PaymentConfirmPageRouteArgs> page =
+      PageInfo<PaymentConfirmPageRouteArgs>(name);
+}
+
+class PaymentConfirmPageRouteArgs {
+  const PaymentConfirmPageRouteArgs({
+    this.key,
+    required this.title,
+    required this.orderId,
+    required this.amount,
+    this.deposit,
+  });
+
+  final Key? key;
+
+  final String? title;
+
+  final String? orderId;
+
+  final String? amount;
+
+  final String? deposit;
+
+  @override
+  String toString() {
+    return 'PaymentConfirmPageRouteArgs{key: $key, title: $title, orderId: $orderId, amount: $amount, deposit: $deposit}';
+  }
 }
 
 /// generated route for
@@ -206,14 +273,40 @@ class PaymentPageRoute extends PageRouteInfo<void> {
 
 /// generated route for
 /// [PaymentSuccessPage]
-class PaymentSuccessPageRoute extends PageRouteInfo<void> {
-  const PaymentSuccessPageRoute({List<PageRouteInfo>? children})
-      : super(
+class PaymentSuccessPageRoute
+    extends PageRouteInfo<PaymentSuccessPageRouteArgs> {
+  PaymentSuccessPageRoute({
+    Key? key,
+    required String? orderId,
+    List<PageRouteInfo>? children,
+  }) : super(
           PaymentSuccessPageRoute.name,
+          args: PaymentSuccessPageRouteArgs(
+            key: key,
+            orderId: orderId,
+          ),
+          rawPathParams: {'orderId': orderId},
           initialChildren: children,
         );
 
   static const String name = 'PaymentSuccessPageRoute';
 
-  static const PageInfo<void> page = PageInfo<void>(name);
+  static const PageInfo<PaymentSuccessPageRouteArgs> page =
+      PageInfo<PaymentSuccessPageRouteArgs>(name);
+}
+
+class PaymentSuccessPageRouteArgs {
+  const PaymentSuccessPageRouteArgs({
+    this.key,
+    required this.orderId,
+  });
+
+  final Key? key;
+
+  final String? orderId;
+
+  @override
+  String toString() {
+    return 'PaymentSuccessPageRouteArgs{key: $key, orderId: $orderId}';
+  }
 }

+ 28 - 12
packages/cpt_profile/lib/modules/setting/setting_view_model.dart

@@ -3,11 +3,13 @@ import 'package:cpt_profile/modules/reset_password/reset_password_page.dart';
 import 'package:cpt_profile/modules/setting/dialog/account_deactivation_dialog.dart';
 import 'package:cpt_profile/modules/setting/setting_state.dart';
 import 'package:cs_resources/generated/l10n.dart';
+import 'package:domain/repository/auth_repository.dart';
 import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:plugin_platform/engine/sp/sp_util.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:shared/utils/event_bus.dart';
@@ -16,10 +18,13 @@ import 'package:widgets/dialog/app_default_dialog.dart';
 part 'setting_view_model.g.dart';
 
 @riverpod
-class SettingViewModel extends _$SettingViewModel {
+class SettingViewModel extends _$SettingViewModel with DioCancelableMixin{
+  late final AuthRepository _authRepository;
+
   @override
   SettingState build() {
-    return SettingState();
+    _authRepository = ref.read(authRepositoryProvider);
+    return const SettingState();
   }
 
   void changeEnableNotification(bool value) {
@@ -41,19 +46,31 @@ class SettingViewModel extends _$SettingViewModel {
         widget: AppDefaultDialog(
       message: S.current.logout_alert,
       confirmAction: () {
-        //清除用户登录信息
-        UserConfigService.getInstance().handleLogoutParams();
-        // 清除 garagesale category 缓存
-        SPUtil.remove(AppConstant.storageGarageCategoryList);
-        // 清除 servives category 缓存
-        SPUtil.remove(AppConstant.storagePaidServiceCategoryList);
-        SPUtil.remove(AppConstant.storageRepairServiceCategoryList);
-        //清除全部页面栈去登录页面
-        ComponentServiceManager().authService.startAndPopAllLoginPage();
+        _requestLogout();
       },
     ));
   }
 
+  /// 调用接口注册FCM
+  void _requestLogout() async {
+    final result = await _authRepository.authLogout(cancelToken: cancelToken);
+
+    //请求成功去首页
+    if (result.isSuccess) {
+      //清除用户登录信息
+      UserConfigService.getInstance().handleLogoutParams();
+      // 清除 garagesale category 缓存
+      SPUtil.remove(AppConstant.storageGarageCategoryList);
+      // 清除 servives category 缓存
+      SPUtil.remove(AppConstant.storagePaidServiceCategoryList);
+      SPUtil.remove(AppConstant.storageRepairServiceCategoryList);
+      //清除全部页面栈去登录页面
+      ComponentServiceManager().authService.startAndPopAllLoginPage();
+    } else {
+      ToastEngine.show(result.errorMsg ?? "UnKnow Error");
+    }
+  }
+
   //删除账号的提示弹窗
   void doDeleteAccount() {
     DialogEngine.show(widget: AccountDeactivationDialog(
@@ -72,5 +89,4 @@ class SettingViewModel extends _$SettingViewModel {
   void rateUs() {
     bus.emit(AppConstant.eventProfileRefresh, true);
   }
-
 }

+ 14 - 13
packages/cpt_property/lib/modules/ioan/property_ioan_page.dart

@@ -13,6 +13,7 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import '../../../router/page/property_page_router.dart';
 import 'property_ioan_vm.dart';
@@ -35,14 +36,14 @@ class PropertyIoanPage extends HookConsumerWidget {
       children: [
         MyTextView(
           "24IFM",
-          textColor: context.appColors.textBlack,
+          textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
           fontSize: 27,
           isFontMedium: true,
           textAlign: TextAlign.center,
         ),
         MyTextView(
           S.current.find_best_loan,
-          textColor: context.appColors.textBlack,
+          textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
           fontSize: 16,
           isFontRegular: true,
           marginBottom: 14,
@@ -53,7 +54,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           height: 210,
           decoration: BoxDecoration(
             borderRadius: BorderRadius.circular(0),
-            color: ColorUtils.string2Color('#FEFEFE'),
+            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#FEFEFE'), darkColor: Colors.black),
             image: const DecorationImage(
               image: AssetImage('packages/cs_resources/${Assets.propertyHomeLoanBg}'), // 使用包中的资源
               fit: BoxFit.cover,
@@ -63,14 +64,14 @@ class PropertyIoanPage extends HookConsumerWidget {
             children: [
               MyTextView(
                 S.current.exclusive_rates,
-                textColor: ColorUtils.string2Color('#FEFEFE'),
+                textColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#FEFEFE'), darkColor: Colors.white),
                 fontSize: 15,
                 boxWidth: 237,
                 boxHeight: 35,
                 alignment: Alignment.center,
                 textAlign: TextAlign.center,
                 marginTop: 5.5,
-                backgroundColor: context.appColors.textPrimary
+                backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.textPrimary, darkColor: Colors.black),
               ),
               Expanded(
                 child: Row(
@@ -80,7 +81,7 @@ class PropertyIoanPage extends HookConsumerWidget {
                         width: 105,
                         height: 105,
                         padding: const EdgeInsets.all(5),
-                        color: context.appColors.textPrimary,
+                        color: DarkThemeUtil.multiColors(context, context.appColors.textPrimary, darkColor: Colors.black),
                         child: Column(
                           mainAxisAlignment: MainAxisAlignment.center,
                           crossAxisAlignment: CrossAxisAlignment.center,
@@ -103,7 +104,7 @@ class PropertyIoanPage extends HookConsumerWidget {
                         width: 105,
                         height: 105,
                         padding: const EdgeInsets.all(5),
-                        color: context.appColors.textPrimary,
+                        color: DarkThemeUtil.multiColors(context, context.appColors.textPrimary, darkColor: Colors.black),
                         margin: const EdgeInsets.only(left: 18),
                         child: Column(
                             mainAxisAlignment: MainAxisAlignment.center,
@@ -137,7 +138,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           boxHeight: 40.5,
           alignment: Alignment.center,
           textAlign: TextAlign.center,
-          backgroundColor: context.appColors.textPrimary,
+          backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.textPrimary, darkColor: Colors.black),
         ),
 
         const SizedBox(height: 20),
@@ -262,7 +263,7 @@ class PropertyIoanPage extends HookConsumerWidget {
         children: [
           MyTextView(
             S.current.choose_best_package,
-            textColor: context.appColors.textBlack,
+            textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
             fontSize: 18,
             isFontMedium: true,
             marginTop: 20,
@@ -271,7 +272,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           ),
           MyTextView(
             S.current.text_no_hidden_fees,
-            textColor: context.appColors.textBlack,
+            textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
             fontSize: 15,
             textAlign: TextAlign.center,
             marginBottom: 20,
@@ -288,7 +289,7 @@ class PropertyIoanPage extends HookConsumerWidget {
         children: [
           MyTextView(
            S.current.what_do_we_offer,
-            textColor: context.appColors.textBlack,
+            textColor: DarkThemeUtil.multiColors(context, context.appColors.textBlack, darkColor: Colors.white),
             fontSize: 18,
             isFontMedium: true,
             marginTop: 16.5,
@@ -371,7 +372,7 @@ class PropertyIoanPage extends HookConsumerWidget {
     }, []);
 
     return Scaffold(
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       // appBar: AppBar(title: Text("资产")),
       body: Column(
         children: [
@@ -406,7 +407,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           //         MyTextView(
           //           "Request a Quote",
           //           fontSize: 16,
-          //           textColor: Colors.white,
+          //           textColor: context.appColors.textWhite,
           //           isFontMedium: true,
           //         ),
           //       ],

+ 2 - 3
packages/cpt_property/lib/modules/news/page/property_news_page.dart

@@ -13,6 +13,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -42,7 +43,6 @@ class PropertyNewsPage extends HookConsumerWidget {
         width: cardLeftWidth,
         decoration: BoxDecoration(
           color: ColorUtils.string2Color('#F2F3F6'),
-          // color: Colors.red,
           borderRadius: const BorderRadius.only(
             topLeft: Radius.circular(8),
             bottomLeft: Radius.circular(8),
@@ -200,8 +200,7 @@ class PropertyNewsPage extends HookConsumerWidget {
 
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
-      // backgroundColor: context.appColors.backgroundDefault,
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
         width: double.infinity,
         height: double.infinity,

+ 1 - 0
packages/cpt_property/lib/modules/property/page/property_page.dart

@@ -12,6 +12,7 @@ import 'package:widgets/my_load_image.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import '../../../router/page/property_page_router.dart';
 import '../vm/property_vm.dart';

+ 4 - 3
packages/cpt_property/lib/modules/rent/page/property_rent_page.dart

@@ -13,6 +13,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -49,12 +50,12 @@ class PropertyRentPage extends HookConsumerWidget {
   Widget _buildItemRightSection(BuildContext context,WidgetRef ref, Map<String, dynamic> item, _vm) {
     String price = item.getValue('price', '');
     return Container(
-      color: context.appColors.textWhite,
+      color: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.black), // 背景颜色
       child: TextButton(
         onPressed: (){},
         style: TextButton.styleFrom(
           foregroundColor: context.appColors.textBlack,
-          backgroundColor: ColorUtils.string2Color('#EFF3FF'), // 背景颜色
+          backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#EFF3FF'), darkColor: Colors.black), // 背景颜色
           // minimumSize: const Size(71, 30), // 最小宽度和高度
           padding: const EdgeInsets.symmetric(horizontal: 17.5, vertical: 7.5), // 内边距
           shape: RoundedRectangleBorder(
@@ -138,7 +139,7 @@ class PropertyRentPage extends HookConsumerWidget {
     }, []);
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,

+ 4 - 3
packages/cpt_property/lib/modules/sale/page/property_sale_page.dart

@@ -12,6 +12,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
@@ -47,13 +48,13 @@ class PropertySalePage extends HookConsumerWidget {
   Widget _buildItemRightSection(BuildContext context,WidgetRef ref, Map<String, dynamic>item, _vm) {
     String price = item.getValue('price', '');
     return Container(
-      color: context.appColors.textWhite,
+      color: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.black), // 背景颜
       width: 120,
       child: TextButton(
         onPressed: (){},
         style: TextButton.styleFrom(
           foregroundColor: context.appColors.textBlack,
-          backgroundColor: ColorUtils.string2Color('#EFF3FF'), // 背景颜
+          backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#EFF3FF'), darkColor: Colors.black), // 背景颜
           // minimumSize: const Size(91.5, 44), // 最小宽度和高度
           padding: const EdgeInsets.symmetric(horizontal: 11.0, vertical: 14), // 内边距
           shape: RoundedRectangleBorder(
@@ -124,7 +125,7 @@ class PropertySalePage extends HookConsumerWidget {
 
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black),
       body: EasyRefresh(
         controller: _vm.refreshController,
         // 上拉加载

+ 288 - 104
packages/cpt_rewards/lib/modules/rewards/rewards_page.dart

@@ -70,9 +70,10 @@ class RewardsPage extends HookConsumerWidget {
           titleDarkColor: Colors.white,
           showBackButton: true,
           backgroundColor: context.appColors.btnBgDefault,
-          systemUiOverlayStyle: MediaQuery.of(context).platformBrightness == Brightness.dark
-              ? ThemeConfig.systemUiOverlayStyleDarkTheme
-              : ThemeConfig.systemUiOverlayStyleLightThemeWhite,
+          systemUiOverlayStyle:
+              MediaQuery.of(context).platformBrightness == Brightness.dark
+                  ? ThemeConfig.systemUiOverlayStyleDarkTheme
+                  : ThemeConfig.systemUiOverlayStyleLightThemeWhite,
           actions: [
             const MyAssetImage(
               Assets.rewardsRewardsIconWen,
@@ -81,7 +82,10 @@ class RewardsPage extends HookConsumerWidget {
             ).marginOnly(right: 15).onTap(() {
               // 去详情
               // _vm.launchURL(url);
-              GlobalWebPage.startInstance(context: context, title: S.current.how_do_i_earn_points, url: 'https://yyjobs.sg/terms/PointsRules.html');
+              GlobalWebPage.startInstance(
+                  context: context,
+                  title: S.current.how_do_i_earn_points,
+                  url: 'https://yyjobs.sg/terms/PointsRules.html');
             })
           ]),
       body: Column(children: [
@@ -105,7 +109,9 @@ class RewardsPage extends HookConsumerWidget {
                         children: [
                           _buildSearch(context, ref, _vm, list),
                           _buildSwiper(context, ref, _vm, list),
-                          list?.points != 0 ? _buildList(context, ref, _vm, list) : const SizedBox.shrink(),
+                          list?.points != 0
+                              ? _buildList(context, ref, _vm, list)
+                              : const SizedBox.shrink(),
                           _buildHistory(context, ref, _vm, list),
                         ],
                       ), // 使用负数margin
@@ -118,7 +124,8 @@ class RewardsPage extends HookConsumerWidget {
     );
   }
 
-  Widget _buildTop(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+  Widget _buildTop(
+      BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
     int points = list?.points ?? 0;
     return Container(
       decoration: BoxDecoration(
@@ -143,7 +150,10 @@ class RewardsPage extends HookConsumerWidget {
             children: [
               Text(
                 S.current.available_points,
-                style: const TextStyle(fontSize: 17.0, color: Colors.white, fontWeight: FontWeight.w500), // 设置字体大小
+                style: const TextStyle(
+                    fontSize: 17.0,
+                    color: Colors.white,
+                    fontWeight: FontWeight.w500), // 设置字体大小
               ),
               Container(
                 decoration: BoxDecoration(
@@ -159,7 +169,10 @@ class RewardsPage extends HookConsumerWidget {
                     ).marginOnly(right: 5),
                     Text(
                       '$points',
-                      style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w400), // 设置字体大小
+                      style: const TextStyle(
+                          fontSize: 15.0,
+                          color: Colors.white,
+                          fontWeight: FontWeight.w400), // 设置字体大小
                     ),
                   ],
                 ).paddingOnly(left: 10, top: 7, bottom: 7, right: 10),
@@ -174,17 +187,24 @@ class RewardsPage extends HookConsumerWidget {
     );
   }
 
-  Widget _buildSearch(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+  Widget _buildSearch(
+      BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
     final dateFormat = DateFormat('yyyy-MM-dd');
     final now = DateFormat('yyyy-MM-dd').format(DateTime.now());
     // final date = list.continuous.currentWeekCheckin[0] ?? now;
     final date = now;
-    final date0 = DateFormat('MM-dd').format(dateFormat.parse(date).subtract(const Duration(days: 1)));
-    final date1 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 1)));
-    final date2 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 2)));
-    final date3 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 3)));
-    final date4 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 4)));
-    final date5 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 5)));
+    final date0 = DateFormat('MM-dd')
+        .format(dateFormat.parse(date).subtract(const Duration(days: 1)));
+    final date1 = DateFormat('MM-dd')
+        .format(dateFormat.parse(date).add(const Duration(days: 1)));
+    final date2 = DateFormat('MM-dd')
+        .format(dateFormat.parse(date).add(const Duration(days: 2)));
+    final date3 = DateFormat('MM-dd')
+        .format(dateFormat.parse(date).add(const Duration(days: 3)));
+    final date4 = DateFormat('MM-dd')
+        .format(dateFormat.parse(date).add(const Duration(days: 4)));
+    final date5 = DateFormat('MM-dd')
+        .format(dateFormat.parse(date).add(const Duration(days: 5)));
     // final nextDate = date.add(Duration(days: 1));
     return Container(
       width: MediaQuery.of(context).size.width - 30,
@@ -199,7 +219,10 @@ class RewardsPage extends HookConsumerWidget {
         children: [
           Text(
             S.current.continuous_login_8_day,
-            style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+            style: TextStyle(
+                fontSize: 15.0,
+                color: context.appColors.textBlack,
+                fontWeight: FontWeight.w500), // 设置字体大小
           ),
           Flex(
             direction: Axis.horizontal,
@@ -210,7 +233,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: context.appColors.whiteSecondBG,
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color: context.appColors.textPrimary, width: 1),
+                    border: Border.all(
+                        color: context.appColors.textPrimary, width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -219,7 +243,10 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         date0,
-                        style: TextStyle(fontSize: 13.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: context.appColors.textPrimary,
+                            fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -228,7 +255,10 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: context.appColors.textPrimary,
+                            fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -241,7 +271,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: AppColorsTheme.colorPrimary,
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color:AppColorsTheme.colorPrimary, width: 1),
+                    border: Border.all(
+                        color: AppColorsTheme.colorPrimary, width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -250,7 +281,10 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         'Today',
-                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#ffffff'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -259,7 +293,10 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#ffffff'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -272,7 +309,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -281,7 +319,10 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date1',
-                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -290,7 +331,10 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -303,7 +347,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -312,7 +357,10 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date2',
-                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -321,7 +369,10 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -338,7 +389,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -347,7 +399,10 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date3',
-                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -356,7 +411,10 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -369,7 +427,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Column(
@@ -378,7 +437,10 @@ class RewardsPage extends HookConsumerWidget {
                     children: [
                       Text(
                         '$date4',
-                        style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
                       ),
                       const MyAssetImage(
                         Assets.rewardsRewardsIconJb,
@@ -387,7 +449,10 @@ class RewardsPage extends HookConsumerWidget {
                       ),
                       Text(
                         '+2',
-                        style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],
                   ),
@@ -400,7 +465,8 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: ColorUtils.string2Color('#F2F3F6'),
                     borderRadius: BorderRadius.circular(10),
-                    border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
                   ),
                   height: 78,
                   child: Row(
@@ -413,11 +479,17 @@ class RewardsPage extends HookConsumerWidget {
                         children: [
                           Text(
                             '$date5',
-                            style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
+                            style: TextStyle(
+                                fontSize: 13.0,
+                                color: ColorUtils.string2Color('#000000'),
+                                fontWeight: FontWeight.w400), // 设置字体大小
                           ),
                           Text(
                             '+ More',
-                            style: TextStyle(fontSize: 12.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
+                            style: TextStyle(
+                                fontSize: 12.0,
+                                color: ColorUtils.string2Color('#000000'),
+                                fontWeight: FontWeight.w500), // 设置字体大小
                           ),
                         ],
                       ),
@@ -437,7 +509,8 @@ class RewardsPage extends HookConsumerWidget {
     );
   }
 
-  Widget _buildSwiper(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+  Widget _buildSwiper(
+      BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
     int points = list?.points ?? 0;
     return Container(
       // color: Colors.white,
@@ -453,17 +526,24 @@ class RewardsPage extends HookConsumerWidget {
         children: [
           Text(
             S.current.how_to_get_rewards,
-            style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+            style: TextStyle(
+                fontSize: 15.0,
+                color: context.appColors.textBlack,
+                fontWeight: FontWeight.w500), // 设置字体大小
           ),
           Container(
-            padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
+            padding:
+                const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
             decoration: BoxDecoration(
               color: context.appColors.btnBgDefaultDark,
               borderRadius: BorderRadius.circular(5),
             ),
             child: Text(
               S.current.rewards,
-              style: TextStyle(fontSize: 14.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w400), // 设置字体大小
+              style: TextStyle(
+                  fontSize: 14.0,
+                  color: ColorUtils.string2Color('#ffffff'),
+                  fontWeight: FontWeight.w400), // 设置字体大小
             ).onTap(() {
               RewardsHomePage.startInstance(points: points);
             }),
@@ -473,9 +553,11 @@ class RewardsPage extends HookConsumerWidget {
     ).marginOnly(top: 12, bottom: 12);
   }
 
-  Widget _buildList(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+  Widget _buildList(
+      BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
     bool newsFeed = list?.tasks?.newsFeedPost ?? false;
     int giveLikes = list?.tasks?.give10Likes ?? 0;
+    final viewModel = ref.watch(rewardsVmProvider.notifier);
     return Container(
       decoration: BoxDecoration(
         color: context.appColors.whiteBG,
@@ -487,7 +569,8 @@ class RewardsPage extends HookConsumerWidget {
         mainAxisAlignment: MainAxisAlignment.center,
         children: [
           Container(
-            padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
             decoration: BoxDecoration(
                 border: Border(
                     bottom: BorderSide(
@@ -501,7 +584,8 @@ class RewardsPage extends HookConsumerWidget {
                 Row(
                   children: [
                     Container(
-                      padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
+                      padding: const EdgeInsets.only(
+                          top: 10, bottom: 10, left: 17, right: 17),
                       decoration: BoxDecoration(
                         color: ColorUtils.string2Color('#f2f3f6'),
                         borderRadius: BorderRadius.circular(5),
@@ -518,13 +602,19 @@ class RewardsPage extends HookConsumerWidget {
                       children: [
                         Text(
                           S.current.daily_login,
-                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: context.appColors.textBlack,
+                              fontWeight: FontWeight.w500), // 设置字体大小
                         ).marginOnly(bottom: 6),
                         Row(
                           children: [
                             Text(
                               '+2',
-                              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
+                              style: TextStyle(
+                                  fontSize: 15.0,
+                                  color: context.appColors.textPrimary,
+                                  fontWeight: FontWeight.w500), // 设置字体大小
                             ),
                             const MyAssetImage(
                               Assets.rewardsRewardsIconJb,
@@ -543,12 +633,17 @@ class RewardsPage extends HookConsumerWidget {
                   decoration: BoxDecoration(
                     color: Colors.transparent,
                     borderRadius: BorderRadius.circular(5),
-                    border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
+                    border: Border.all(
+                        color: context.appColors.disEnableGray, width: 1),
                   ),
                   child: Center(
                     child: Text(
-                      S.current.check_in,
-                      style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
+                      // S.current.check_in,
+                      S.current.completed,
+                      style: TextStyle(
+                          fontSize: 14.0,
+                          color: context.appColors.disEnableGray,
+                          fontWeight: FontWeight.w400), // 设置字体大小
                     ),
                   ),
                 ),
@@ -556,7 +651,8 @@ class RewardsPage extends HookConsumerWidget {
             ),
           ),
           Container(
-            padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
             decoration: BoxDecoration(
                 border: Border(
                     bottom: BorderSide(
@@ -570,7 +666,8 @@ class RewardsPage extends HookConsumerWidget {
                 Row(
                   children: [
                     Container(
-                      padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
+                      padding: const EdgeInsets.only(
+                          top: 10, bottom: 10, left: 17, right: 17),
                       decoration: BoxDecoration(
                         color: ColorUtils.string2Color('#f2f3f6'),
                         borderRadius: BorderRadius.circular(5),
@@ -587,13 +684,19 @@ class RewardsPage extends HookConsumerWidget {
                       children: [
                         Text(
                           S.current.news_feed_post,
-                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: context.appColors.textBlack,
+                              fontWeight: FontWeight.w500), // 设置字体大小
                         ).marginOnly(bottom: 6),
                         Row(
                           children: [
                             Text(
                               '+2',
-                              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
+                              style: TextStyle(
+                                  fontSize: 15.0,
+                                  color: context.appColors.textPrimary,
+                                  fontWeight: FontWeight.w500), // 设置字体大小
                             ),
                             const MyAssetImage(
                               Assets.rewardsRewardsIconJb,
@@ -606,26 +709,54 @@ class RewardsPage extends HookConsumerWidget {
                     )
                   ],
                 ),
-                Container(
-                  width: 86,
-                  height: 30,
-                  decoration: BoxDecoration(
-                    color: Colors.transparent,
-                    borderRadius: BorderRadius.circular(5),
-                    border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
-                  ),
-                  child: Center(
-                    child: Text(
-                      newsFeed == true ? S.current.completed : S.current.incomplete,
-                      style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
-                    ),
-                  ),
-                ),
+                newsFeed == true
+                    ? Container(
+                        width: 86,
+                        height: 30,
+                        decoration: BoxDecoration(
+                          color: Colors.transparent,
+                          borderRadius: BorderRadius.circular(5),
+                          border: Border.all(
+                              color: context.appColors.disEnableGray, width: 1),
+                        ),
+                        child: Center(
+                          child: Text(
+                            S.current.completed,
+                            style: TextStyle(
+                                fontSize: 14.0,
+                                color: context.appColors.disEnableGray,
+                                fontWeight: FontWeight.w400), // 设置字体大小
+                          ),
+                        ),
+                      )
+                    : Container(
+                        width: 86,
+                        height: 30,
+                        decoration: BoxDecoration(
+                          color: Colors.transparent,
+                          borderRadius: BorderRadius.circular(5),
+                          border: Border.all(
+                              color: context.appColors.btnBgDefaultDark,
+                              width: 1),
+                        ),
+                        child: Center(
+                          child: Text(
+                            S.current.incomplete,
+                            style: TextStyle(
+                                fontSize: 14.0,
+                                color: context.appColors.textPrimary,
+                                fontWeight: FontWeight.w400), // 设置字体大小
+                          ),
+                        ),
+                      ).onTap(() {
+                        viewModel.gotoCommunityPage();
+                      }),
               ],
             ),
           ),
           Container(
-            padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
             decoration: BoxDecoration(
                 border: Border(
                     bottom: BorderSide(
@@ -639,7 +770,8 @@ class RewardsPage extends HookConsumerWidget {
                 Row(
                   children: [
                     Container(
-                      padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
+                      padding: const EdgeInsets.only(
+                          top: 10, bottom: 10, left: 17, right: 17),
                       decoration: BoxDecoration(
                         color: ColorUtils.string2Color('#f2f3f6'),
                         borderRadius: BorderRadius.circular(5),
@@ -656,13 +788,19 @@ class RewardsPage extends HookConsumerWidget {
                       children: [
                         Text(
                           S.current.give_10_likes,
-                          style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: context.appColors.textBlack,
+                              fontWeight: FontWeight.w500), // 设置字体大小
                         ).marginOnly(bottom: 6),
                         Row(
                           children: [
                             Text(
                               '+2',
-                              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
+                              style: TextStyle(
+                                  fontSize: 15.0,
+                                  color: context.appColors.textPrimary,
+                                  fontWeight: FontWeight.w500), // 设置字体大小
                             ),
                             const MyAssetImage(
                               Assets.rewardsRewardsIconJb,
@@ -675,21 +813,49 @@ class RewardsPage extends HookConsumerWidget {
                     )
                   ],
                 ),
-                Container(
-                  width: 86,
-                  height: 30,
-                  decoration: BoxDecoration(
-                    color: Colors.transparent,
-                    borderRadius: BorderRadius.circular(5),
-                    border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
-                  ),
-                  child: Center(
-                    child: Text(
-                      giveLikes == 10 ? S.current.completed : '$giveLikes/10',
-                      style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
-                    ),
-                  ),
-                ),
+                giveLikes == 10
+                    ? Container(
+                        width: 86,
+                        height: 30,
+                        decoration: BoxDecoration(
+                          color: Colors.transparent,
+                          borderRadius: BorderRadius.circular(5),
+                          border: Border.all(
+                              color: context.appColors.disEnableGray, width: 1),
+                        ),
+                        child: Center(
+                          child: Text(
+                            S.current.completed,
+                            style: TextStyle(
+                                fontSize: 14.0,
+                                color: context.appColors.disEnableGray,
+                                fontWeight: FontWeight.w400), // 设置字体大小
+                          ),
+                        ),
+                      )
+                    : Container(
+                        width: 86,
+                        height: 30,
+                        decoration: BoxDecoration(
+                          color: Colors.transparent,
+                          borderRadius: BorderRadius.circular(5),
+                          border: Border.all(
+                              color: context.appColors.btnBgDefaultDark,
+                              width: 1),
+                        ),
+                        child: Center(
+                          child: Text(
+                            '$giveLikes/10',
+
+                            style: TextStyle(
+                                fontSize: 14.0,
+                                color: context.appColors.textPrimary,
+                                fontWeight: FontWeight.w400), // 设置字体大小
+                          ),
+                        ),
+                      ).onTap(() {
+                        viewModel.gotoCommunityPage();
+                      }),
               ],
             ),
           )
@@ -698,7 +864,8 @@ class RewardsPage extends HookConsumerWidget {
     ).marginOnly(bottom: 12);
   }
 
-  Widget _buildHistory(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
+  Widget _buildHistory(
+      BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
     List latest = list?.latest ?? [];
     return Container(
       decoration: BoxDecoration(
@@ -710,25 +877,35 @@ class RewardsPage extends HookConsumerWidget {
         crossAxisAlignment: CrossAxisAlignment.center,
         mainAxisAlignment: MainAxisAlignment.center,
         children: [
-          Row(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
-            Text(
-              S.current.points_history,
-              style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
-            ),
-            Text(
-              S.current.more_arrow,
-              style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
-            ).onTap(() {
-              RewardsHistoryPage.startInstance();
-            })
-          ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
+          Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Text(
+                  S.current.points_history,
+                  style: TextStyle(
+                      fontSize: 15.0,
+                      color: context.appColors.textBlack,
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ),
+                Text(
+                  S.current.more_arrow,
+                  style: TextStyle(
+                      fontSize: 15.0,
+                      color: context.appColors.textPrimary,
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ).onTap(() {
+                  RewardsHistoryPage.startInstance();
+                })
+              ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
           Column(
               crossAxisAlignment: CrossAxisAlignment.center,
               mainAxisAlignment: MainAxisAlignment.center,
               children: List.generate(latest.length, (index) {
                 int point = latest[index]['point'];
                 return Container(
-                  padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+                  padding: const EdgeInsets.only(
+                      top: 15, bottom: 15, left: 15, right: 15),
                   decoration: BoxDecoration(
                       border: Border(
                           bottom: BorderSide(
@@ -745,13 +922,18 @@ class RewardsPage extends HookConsumerWidget {
                         children: [
                           Text(
                             latest[index]['short_description'],
-                            style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
+                            style: TextStyle(
+                                fontSize: 15.0,
+                                color: context.appColors.textBlack,
+                                fontWeight: FontWeight.w500), // 设置字体大小
                           ).marginOnly(bottom: 6),
                           Text(
                             latest[index]['created_at'],
                             style: TextStyle(
                                 fontSize: 13.0,
-                                color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
+                                color: DarkThemeUtil.multiColors(
+                                    context, ColorUtils.string2Color('#808DAF'),
+                                    darkColor: Colors.white),
                                 fontWeight: FontWeight.w400), // 设置字体大小
                           ),
                         ],
@@ -760,7 +942,9 @@ class RewardsPage extends HookConsumerWidget {
                         "$point",
                         style: TextStyle(
                             fontSize: 20.0,
-                            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#FDB429'), darkColor: Colors.white),
+                            color: DarkThemeUtil.multiColors(
+                                context, ColorUtils.string2Color('#FDB429'),
+                                darkColor: Colors.white),
                             fontWeight: FontWeight.w500), // 设置字体大小
                       ),
                     ],

+ 5 - 1
packages/cpt_rewards/lib/modules/rewards/rewards_vm.dart

@@ -2,6 +2,7 @@ import 'package:domain/entity/rewards_index_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:plugin_platform/http/http_result.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:widgets/load_state_layout.dart';
@@ -55,7 +56,10 @@ class RewardsVm extends _$RewardsVm {
     Log.d(item);
     // PropertyPage.startInstance(context: context, item: item);
   }
-
+//去社区页面
+  void gotoCommunityPage() {
+    ComponentServiceManager().communityService.startCommunityPage();
+  }
 // 重试请求
   Future retryRequest() async {
     _needShowPlaceholder = true;

+ 1 - 1
packages/cpt_services/lib/components/chooseAirConditionContent_vm.g.dart

@@ -7,7 +7,7 @@ part of 'chooseAirConditionContent_vm.dart';
 // **************************************************************************
 
 String _$chooseAirConditionContentVmHash() =>
-    r'54d8f91a4ffe39cc789fd1500b4a8e37b4e0a5b0';
+    r'8ada9dea431ef72afb15bccca9720ecb32d02579';
 
 /// See also [ChooseAirConditionContentVm].
 @ProviderFor(ChooseAirConditionContentVm)

+ 5 - 3
packages/cpt_services/lib/components/chooseHouseCleanContent.dart

@@ -11,6 +11,7 @@ import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:widgets/my_cart_num.dart';
 import 'chooseHouseCleanContent_state.dart';
@@ -77,7 +78,7 @@ class ChooseHouseCleanContent extends HookConsumerWidget {
     return Container(
       padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
       margin: const EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
-      color: ColorUtils.string2Color('#F8F8F8'),
+      color: context.appColors.whiteBG,
       child: Column(
         children: [
           Row(
@@ -127,8 +128,9 @@ class ChooseHouseCleanContent extends HookConsumerWidget {
                 fontSize: 19,
                 fontWeight: FontWeight.w500,
                 enable: !isDisable,
-                textColor:  !isChecked? context.appColors.textPrimary : context.appColors.textWhite,
-                backgroundColor: !isChecked ? context.appColors.textWhite : context.appColors.textPrimary,
+                textColor:  DarkThemeUtil.multiColors(context, !isChecked? context.appColors.textPrimary : context.appColors.textWhite, darkColor: isChecked? context.appColors.textPrimary :Colors.white)  ,
+                // backgroundColor: !isChecked ? context.appColors.textWhite : context.appColors.textPrimary,
+                backgroundColor: !isChecked ? context.appColors.textWhite : AppColorsTheme.colorPrimary,
                 disabledBackgroundColor: context.appColors.disEnableGray,
                 disabledTextColor: context.appColors.textWhite,
               ),

+ 1 - 1
packages/cpt_services/lib/components/chooseHouseCleanContent_vm.g.dart

@@ -7,7 +7,7 @@ part of 'chooseHouseCleanContent_vm.dart';
 // **************************************************************************
 
 String _$chooseHouseCleanContentVmHash() =>
-    r'acb10c35766b4580f8f01dd53555e24817941f1e';
+    r'3743258e9d8389c5552a89aa7a6717e038d16bb0';
 
 /// See also [ChooseHouseCleanContentVm].
 @ProviderFor(ChooseHouseCleanContentVm)

+ 5 - 4
packages/cpt_services/lib/components/chooseVisitTimeBottomFooter.dart

@@ -11,6 +11,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:widgets/my_cart_num.dart';
 
@@ -69,7 +70,7 @@ class ChooseVisitTimeBottomFooter extends HookConsumerWidget {
                       MyTextView(
                         "\$$totalPrice",
                         fontSize: 18,
-                        textColor: Colors.white,
+                        textColor: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.white),
                         isFontRegular: true,
                         maxLines:2,
                         isTextEllipsis: true,
@@ -80,15 +81,15 @@ class ChooseVisitTimeBottomFooter extends HookConsumerWidget {
                   ),
                 ),
               ],
-            ).backgroundColor(context.appColors.textPrimary),
+            ).backgroundColor(DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: AppColorsTheme.colorPrimary)),
           ),
           Expanded(
             child: Container(
-              color: context.appColors.redDefault,
+              color: DarkThemeUtil.multiColors(context, context.appColors.redDefault, darkColor: context.appColors.redDefault),
               child: Center(
                 child: MyTextView(
                  S.current.confirm,
-                  textColor: context.appColors.textWhite,
+                  textColor: DarkThemeUtil.multiColors(context, context.appColors.textWhite, darkColor: Colors.white),
                   fontSize: 17,
                   isFontMedium: true,
                   textAlign: TextAlign.center,

+ 5 - 2
packages/cpt_services/lib/components/chooseVisitTimeContent.dart

@@ -19,8 +19,10 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import 'package:widgets/my_cart_num.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 import 'chooseVisitTimeContent_state.dart';
 
@@ -67,7 +69,7 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
         return Container(
           width: double.infinity,
           // width: 80,
-          color: ColorUtils.string2Color("#F5F5F7"),
+          color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F5F5F7"), darkColor: AppColorsTheme.color666666),
           padding: const EdgeInsets.only(left:20, right: 20, top: 12, bottom: 12),
           constraints: const BoxConstraints(
             minHeight: 0,
@@ -137,7 +139,7 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                   borderRadius: BorderRadius.circular(8),
                   boxShadow: [
                     BoxShadow(
-                      color: ColorUtils.string2Color('#E5E5E5'),
+                      color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)??Colors.transparent,
                       offset: const Offset(0, 2),
                       blurRadius: 8,
                     ),
@@ -153,6 +155,7 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                   text: '$timeText',
                   padding: const EdgeInsets.only(left: 5, right: 5, top: 5, bottom: 5),
                   textColor: itemIsChecked ?context.appColors.textPrimary: context.appColors.textDarkGray999,
+                  backgroundColor: DarkThemeUtil.multiColors(context, context.appColors.disEnableGray, darkColor: itemIsChecked? AppColorsTheme.colorPrimary:Colors.black),
                   enable: enable.value,
                   disabledBackgroundColor: context.appColors.disEnableGray,
                   disabledTextColor: context.appColors.textWhite,

+ 3 - 1
packages/cpt_services/lib/components/chooseVisitTimeTitle.dart

@@ -9,10 +9,12 @@ import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_basic/provider/app_config/app_config_service.dart';
 import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import 'chooseVisitTimeTitle_state.dart';
@@ -74,7 +76,7 @@ class ChooseVisitTimeTitle extends HookConsumerWidget {
                       width: 100,
                       height: 65,
                       decoration: BoxDecoration(
-                        color: item.isSelected ? ColorUtils.string2Color('#F5F5F7'): context.appColors.whiteBG,
+                        color: item.isSelected ? DarkThemeUtil.multiColors(context,  ColorUtils.string2Color('#F5F5F7'), darkColor: AppColorsTheme.colorPrimary): context.appColors.whiteBG,
                         borderRadius: const BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10)),
                       ),
                       child: Column(

+ 2 - 1
packages/cpt_services/lib/modules/services/clean_order_cancel_success/clean_order_cancel_success_page.dart

@@ -10,6 +10,7 @@ import 'package:widgets/my_button.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import '../../../router/page/services_page_router.dart';
 
 @RoutePage()
@@ -46,7 +47,7 @@ class CleanOrderCancelSuccessPage extends HookConsumerWidget {
           S.current.cancellation_of_order,
           backgroundColor: context.appColors.whiteBG,
         ),
-        backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+        backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.black)?? Colors.black,
         body: Center(
           child: Container(
             margin: const EdgeInsets.only(top: 50),

+ 2 - 1
packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_page.dart

@@ -23,6 +23,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/chooseHouseCleanContent.dart';
@@ -79,7 +80,7 @@ class CleanOrderDetailPage extends HookConsumerWidget {
         S.current.order_details,
         backgroundColor: context.appColors.whiteBG,
       ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.black)?? Colors.black,
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,

+ 1 - 1
packages/cpt_services/lib/modules/services/clean_order_detail/clean_order_detail_vm.g.dart

@@ -7,7 +7,7 @@ part of 'clean_order_detail_vm.dart';
 // **************************************************************************
 
 String _$cleanOrderDetailVmHash() =>
-    r'fcfa75c5fcdae98cdcc58d6b872100967a9a3c16';
+    r'4d097e6e4a597cc6e047ae2f78afc9792e5ce513';
 
 /// See also [CleanOrderDetailVm].
 @ProviderFor(CleanOrderDetailVm)

+ 3 - 2
packages/cpt_services/lib/modules/services/history/history_page.dart

@@ -19,6 +19,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../constants_services.dart';
@@ -63,7 +64,7 @@ class HistoryPage extends HookConsumerWidget {
       //   "History",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.black)?? Colors.black,
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,
@@ -124,7 +125,7 @@ class HistoryPage extends HookConsumerWidget {
         borderRadius: BorderRadius.circular(8),
         boxShadow: [
           BoxShadow(
-            color: ColorUtils.string2Color('#E5E5E5'),
+            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
             offset: const Offset(0, 2),
             blurRadius: 8,
           ),

+ 1 - 1
packages/cpt_services/lib/modules/services/history/history_vm.g.dart

@@ -6,7 +6,7 @@ part of 'history_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$historyVmHash() => r'89aa7cc56fe2bb8cf7a7a2d7087f3ca431417819';
+String _$historyVmHash() => r'e27a0b2491a494df57ba02b193bb7ad6ca384b54';
 
 /// See also [HistoryVm].
 @ProviderFor(HistoryVm)

+ 4 - 2
packages/cpt_services/lib/modules/services/homeService/home_service_page.dart

@@ -21,6 +21,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../router/page/services_page_router.dart';
@@ -63,7 +64,7 @@ class HomeServicePage extends HookConsumerWidget {
       //   "HomeService",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color("#F2F3F6"), darkColor: Colors.black)  ,
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,
@@ -133,7 +134,8 @@ class HomeServicePage extends HookConsumerWidget {
           borderRadius: BorderRadius.circular(8),
           boxShadow: [
             BoxShadow(
-              color: ColorUtils.string2Color('#E5E5E5'),
+              // color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
+              color: DarkThemeUtil.multiColors(context, DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent, darkColor: Colors.transparent)?? Colors.transparent,
               offset: const Offset(0, 2),
               blurRadius: 8,
             ),

+ 0 - 1
packages/cpt_services/lib/modules/services/homeService/home_service_vm.dart

@@ -366,7 +366,6 @@ class HomeServiceVm extends _$HomeServiceVm {
           confirmTxt: "Ok",
           messageBuilder: (BuildContext context){
             return Container(
-              color: context.appColors.textWhite,
               child: Column(
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.start,

+ 1 - 1
packages/cpt_services/lib/modules/services/homeService/home_service_vm.g.dart

@@ -6,7 +6,7 @@ part of 'home_service_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$homeServiceVmHash() => r'318c976134aacfdc5ed6c7c8a641351822c48b32';
+String _$homeServiceVmHash() => r'5fbefc1a636113fd7813b1adfdcfa4d75dc6c88e';
 
 /// See also [HomeServiceVm].
 @ProviderFor(HomeServiceVm)

+ 1 - 1
packages/cpt_services/lib/modules/services/homeService/service_card_item.dart

@@ -177,7 +177,7 @@ class CollectionWidget extends HookConsumerWidget {
     return Container(
         alignment: Alignment.center,
         // decoration: BoxDecoration(
-        //   color: ColorUtils.string2Color('#E5E5E5'),
+        //   color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
         //   borderRadius: BorderRadius.circular(15),
         // ),
         child: Row(

+ 3 - 2
packages/cpt_services/lib/modules/services/inProgress/in_progress_page.dart

@@ -19,6 +19,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../constants_services.dart';
@@ -63,7 +64,7 @@ class InProgressPage extends HookConsumerWidget {
       //   "InProgress",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.black)?? Colors.black,
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,
@@ -117,7 +118,7 @@ class InProgressPage extends HookConsumerWidget {
         borderRadius: BorderRadius.circular(8),
         boxShadow: [
           BoxShadow(
-            color: ColorUtils.string2Color('#E5E5E5'),
+            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
             offset: const Offset(0, 2),
             blurRadius: 8,
           ),

+ 1 - 1
packages/cpt_services/lib/modules/services/inProgress/in_progress_vm.g.dart

@@ -6,7 +6,7 @@ part of 'in_progress_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$inProgressVmHash() => r'cf2b1d13c3c134c4b8a29e257fda6e652af9061d';
+String _$inProgressVmHash() => r'90feaa9478c9575831a324bcd841a3617f6b745c';
 
 /// See also [InProgressVm].
 @ProviderFor(InProgressVm)

+ 3 - 2
packages/cpt_services/lib/modules/services/repair_history/history_page.dart

@@ -17,6 +17,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../components/repair_status_card_item.dart';
@@ -64,7 +65,7 @@ class RepairHistoryPage extends HookConsumerWidget {
       //   "History",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.black)?? Colors.black,
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,
@@ -119,7 +120,7 @@ class RepairHistoryPage extends HookConsumerWidget {
         borderRadius: BorderRadius.circular(8),
         boxShadow: [
           BoxShadow(
-            color: ColorUtils.string2Color('#E5E5E5'),
+            color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
             offset: const Offset(0, 2),
             blurRadius: 8,
           ),

+ 1 - 1
packages/cpt_services/lib/modules/services/repair_history/history_vm.g.dart

@@ -6,7 +6,7 @@ part of 'history_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$repairHistoryVmHash() => r'02b81fc894e21133f15ca8b36d8026e2c195880e';
+String _$repairHistoryVmHash() => r'0de804caabed7fa85241a0c1493e12d989883847';
 
 /// See also [RepairHistoryVm].
 @ProviderFor(RepairHistoryVm)

+ 3 - 2
packages/cpt_services/lib/modules/services/repair_homeService/home_service_page.dart

@@ -21,6 +21,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../../router/page/services_page_router.dart';
@@ -63,7 +64,7 @@ class RepairHomeServicePage extends HookConsumerWidget {
       //   "RepairHomeService",
       //   backgroundColor: context.appColors.whiteBG,
       // ),
-      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
+      backgroundColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'), darkColor: Colors.black)?? Colors.black,
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,
@@ -135,7 +136,7 @@ class RepairHomeServicePage extends HookConsumerWidget {
           borderRadius: BorderRadius.circular(8),
           boxShadow: [
             BoxShadow(
-              color: ColorUtils.string2Color('#E5E5E5'),
+              color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#E5E5E5'), darkColor: Colors.transparent)?? Colors.transparent,
               offset: const Offset(0, 2),
               blurRadius: 8,
             ),

+ 0 - 1
packages/cpt_services/lib/modules/services/repair_homeService/home_service_vm.dart

@@ -350,7 +350,6 @@ class RepairHomeServiceVm extends _$RepairHomeServiceVm {
           confirmTxt: "Ok",
           messageBuilder: (BuildContext context){
             return Container(
-              color: context.appColors.textWhite,
               child: Column(
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.start,

+ 1 - 1
packages/cpt_services/lib/modules/services/repair_homeService/home_service_vm.g.dart

@@ -7,7 +7,7 @@ part of 'home_service_vm.dart';
 // **************************************************************************
 
 String _$repairHomeServiceVmHash() =>
-    r'4006150cdf360bf7db04f0c4e591f14e32e38990';
+    r'd80c22edbf6ac292d571c1fe4bf8a7d92d74a174';
 
 /// See also [RepairHomeServiceVm].
 @ProviderFor(RepairHomeServiceVm)

+ 0 - 0
packages/cpt_services/lib/modules/services/repair_homeService/service_card_item.dart


Some files were not shown because too many files changed in this diff