Browse Source

reward部分

“shanwenxin” 4 months ago
parent
commit
b538ee8ebc
100 changed files with 9729 additions and 93 deletions
  1. 11 7
      packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_page.dart
  2. 25 29
      packages/cpt_notice_board/lib/modules/event/page/event_page.dart
  3. 8 5
      packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_page.dart
  4. 2 5
      packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart
  5. 0 33
      packages/cpt_rewards/lib/modules/rewards/page/rewards_page.dart
  6. 918 0
      packages/cpt_rewards/lib/modules/rewards/rewards_page.dart
  7. 70 0
      packages/cpt_rewards/lib/modules/rewards/rewards_repository.dart
  8. 27 0
      packages/cpt_rewards/lib/modules/rewards/rewards_repository.g.dart
  9. 49 0
      packages/cpt_rewards/lib/modules/rewards/rewards_state.dart
  10. 108 0
      packages/cpt_rewards/lib/modules/rewards/rewards_vm.dart
  11. 25 0
      packages/cpt_rewards/lib/modules/rewards/rewards_vm.g.dart
  12. 0 14
      packages/cpt_rewards/lib/modules/rewards/vm/rewards_view_model.dart
  13. 170 0
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_page.dart
  14. 70 0
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_repository.dart
  15. 27 0
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_repository.g.dart
  16. 49 0
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_state.dart
  17. 109 0
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_vm.dart
  18. 25 0
      packages/cpt_rewards/lib/modules/rewards_address/rewards_address_vm.g.dart
  19. 129 0
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_page.dart
  20. 70 0
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_repository.dart
  21. 27 0
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_repository.g.dart
  22. 49 0
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_state.dart
  23. 109 0
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_vm.dart
  24. 25 0
      packages/cpt_rewards/lib/modules/rewards_code/rewards_code_vm.g.dart
  25. 144 0
      packages/cpt_rewards/lib/modules/rewards_confirm/dialog/account_deactivation_dialog.dart
  26. 388 0
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_page.dart
  27. 70 0
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_repository.dart
  28. 27 0
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_repository.g.dart
  29. 49 0
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_state.dart
  30. 118 0
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_vm.dart
  31. 25 0
      packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_vm.g.dart
  32. 632 0
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_page.dart
  33. 70 0
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_repository.dart
  34. 27 0
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_repository.g.dart
  35. 49 0
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_state.dart
  36. 109 0
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_vm.dart
  37. 25 0
      packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_vm.g.dart
  38. 130 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_page.dart
  39. 70 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_repository.dart
  40. 27 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_repository.g.dart
  41. 49 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_state.dart
  42. 105 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_vm.dart
  43. 25 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_vm.g.dart
  44. 124 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_page.dart
  45. 129 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_page.dart
  46. 70 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_repository.dart
  47. 27 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_repository.g.dart
  48. 49 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_state.dart
  49. 105 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_vm.dart
  50. 25 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_vm.g.dart
  51. 86 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_vm.dart
  52. 25 0
      packages/cpt_rewards/lib/modules/rewards_history/rewards_history_vm.g.dart
  53. 500 0
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_page.dart
  54. 70 0
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_repository.dart
  55. 27 0
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_repository.g.dart
  56. 57 0
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_state.dart
  57. 122 0
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_vm.dart
  58. 25 0
      packages/cpt_rewards/lib/modules/rewards_home/rewards_home_vm.g.dart
  59. 212 0
      packages/cpt_rewards/lib/modules/rewards_list/dialog/reward_listfilter_all_dialog.dart
  60. 338 0
      packages/cpt_rewards/lib/modules/rewards_list/dialog/reward_listfilter_dialog.dart
  61. 283 0
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_page.dart
  62. 70 0
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_repository.dart
  63. 27 0
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_repository.g.dart
  64. 55 0
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_state.dart
  65. 147 0
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_vm.dart
  66. 25 0
      packages/cpt_rewards/lib/modules/rewards_list/rewards_list_vm.g.dart
  67. 205 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_page.dart
  68. 70 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_repository.dart
  69. 27 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_repository.g.dart
  70. 49 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_state.dart
  71. 105 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_vm.dart
  72. 25 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_vm.g.dart
  73. 184 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_page.dart
  74. 70 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_repository.dart
  75. 27 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_repository.g.dart
  76. 49 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_state.dart
  77. 105 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_vm.dart
  78. 25 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_vm.g.dart
  79. 125 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_page.dart
  80. 218 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_page.dart
  81. 70 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_repository.dart
  82. 27 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_repository.g.dart
  83. 49 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_state.dart
  84. 105 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_vm.dart
  85. 25 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_vm.g.dart
  86. 93 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_vm.dart
  87. 25 0
      packages/cpt_rewards/lib/modules/rewards_my/rewards_my_vm.g.dart
  88. 322 0
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_page.dart
  89. 70 0
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_repository.dart
  90. 27 0
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_repository.g.dart
  91. 49 0
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_state.dart
  92. 110 0
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_vm.dart
  93. 25 0
      packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_vm.g.dart
  94. 329 0
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_page.dart
  95. 70 0
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_repository.dart
  96. 27 0
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_repository.g.dart
  97. 49 0
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_state.dart
  98. 109 0
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_vm.dart
  99. 25 0
      packages/cpt_rewards/lib/modules/rewards_search/rewards_search_vm.g.dart
  100. 0 0
      packages/cpt_rewards/lib/modules/rewards_successful/rewards_successful_page.dart

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

@@ -28,7 +28,6 @@ class AnnouncementDetailPage extends HookConsumerWidget {
     }
   }
 
-
   Widget _buildDetailTop(BuildContext context, WidgetRef ref, _vm) {
     // List itemsList = _vm.state.list.toList();
     return Column(
@@ -116,8 +115,10 @@ class AnnouncementDetailPage extends HookConsumerWidget {
               ),
             ],
           ).marginOnly(top: 15),
-        ]).paddingOnly(bottom: 25).border(bottom: 1,color: ColorUtils.string2Color('#F2F3F6')),
-         Column(
+        ])
+            .paddingOnly(bottom: 25)
+            .border(bottom: 1, color: ColorUtils.string2Color('#F2F3F6')),
+        Column(
           children: [
             const Column(
               mainAxisAlignment: MainAxisAlignment.center,
@@ -157,10 +158,13 @@ class AnnouncementDetailPage extends HookConsumerWidget {
       ),
       body: Container(
           child: EasyRefresh(
-        child: Container(
-            color: ColorUtils.string2Color('#FFFFFF'),
-            padding: const EdgeInsets.only(top: 30, left: 15, right: 15),
-            child: _buildDetailTop(context, ref, _vm)),
+        child: SingleChildScrollView(
+            scrollDirection: Axis.vertical,
+            physics: const BouncingScrollPhysics(),
+            clipBehavior: Clip.none,
+            child: Padding(
+                padding: const EdgeInsets.only(left: 15, right: 15, top: 15),
+                child: _buildDetailTop(context, ref, _vm))),
       )),
     );
   }

+ 25 - 29
packages/cpt_notice_board/lib/modules/event/page/event_page.dart

@@ -28,17 +28,14 @@ class EventPage extends HookConsumerWidget {
   }
 
   Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
-    return Container(
-      // color: Colors.blue,
-      child: Text(
-        maxLines: 2, // 设置最大行数为2
-        overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-        item['title'],
-        style: const TextStyle(
-            fontSize: 16.0,
-            color: Colors.black,
-            fontWeight: FontWeight.w700), // 设置字体大小
-      ),
+    return Text(
+      maxLines: 2, // 设置最大行数为2
+      overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+      item['title'],
+      style: const TextStyle(
+          fontSize: 16.0,
+          color: Colors.black,
+          fontWeight: FontWeight.w700), // 设置字体大小
     );
   }
 
@@ -68,7 +65,7 @@ class EventPage extends HookConsumerWidget {
       ),
       child: Column(
         children: [
-          Container(
+          SizedBox(
             width: MediaQuery.of(context).size.width - 30,
             height: 100,
             // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
@@ -113,23 +110,22 @@ class EventPage extends HookConsumerWidget {
 
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
-      body: Container(
-          child: EasyRefresh(
-        // 上拉加载
-        onLoad: () async {
-          Log.d("----onLoad");
-          _vm.onLoadData();
-        },
-        // 下拉刷新
-        onRefresh: () async {
-          Log.d("----onRefresh");
-          _vm.refreshListData();
-        },
-        child: Container(
-            color: ColorUtils.string2Color('#F2F3F6'),
-            padding: const EdgeInsets.only(top: 15),
-            child: _buildSaleList(context, ref, _vm)),
-      )),
+      body: EasyRefresh(
+              // 上拉加载
+              onLoad: () async {
+      Log.d("----onLoad");
+      _vm.onLoadData();
+              },
+              // 下拉刷新
+              onRefresh: () async {
+      Log.d("----onRefresh");
+      _vm.refreshListData();
+              },
+              child: Container(
+        color: ColorUtils.string2Color('#F2F3F6'),
+        padding: const EdgeInsets.only(top: 15),
+        child: _buildSaleList(context, ref, _vm)),
+            ),
     );
   }
 }

+ 8 - 5
packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_page.dart

@@ -29,7 +29,7 @@ class EventDetailPage extends HookConsumerWidget {
   }
 
   Widget _buildDetailTop(BuildContext context, WidgetRef ref, _vm) {
-    // List itemsList = _vm.state.list.toList();
+    // List itemsList = _vm.state.list.toList();3
     return Column(
       children: [
         Column(children: [
@@ -111,10 +111,13 @@ class EventDetailPage extends HookConsumerWidget {
       ),
       body: Container(
           child: EasyRefresh(
-        child: Container(
-            color: ColorUtils.string2Color('#FFFFFF'),
-            padding: const EdgeInsets.only(top: 30, left: 15, right: 15),
-            child: _buildDetailTop(context, ref, _vm)),
+        child: SingleChildScrollView(
+            scrollDirection: Axis.vertical,
+            physics: const BouncingScrollPhysics(),
+            clipBehavior: Clip.none,
+            child: Padding(
+                padding: const EdgeInsets.only(left: 15, right: 15, top: 15),
+                child: _buildDetailTop(context, ref, _vm))),
       )),
     );
   }

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

@@ -43,9 +43,7 @@ class NoticeBoardPage extends HookConsumerWidget {
           crossAxisAlignment: CrossAxisAlignment.center,
           children: List.generate(topSectionsData.length, (index) {
             final item = topSectionsData[index];
-            return Flexible(
-              flex: 1,
-              child: Column(
+            return Column(
                 children: [
                   Container(
                     width: MediaQuery.of(context).size.width /
@@ -92,8 +90,7 @@ class NoticeBoardPage extends HookConsumerWidget {
                     isFontMedium: true,
                   ),
                 ],
-              ),
-            ).marginOnly(left: 18, right: 18, top: 10, bottom: 10);
+              ).marginOnly(left: 18, right: 18, top: 10, bottom: 10);
           }),
         ),
       ),

+ 0 - 33
packages/cpt_rewards/lib/modules/rewards/page/rewards_page.dart

@@ -1,33 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:auto_route/auto_route.dart';
-import 'package:hooks_riverpod/hooks_riverpod.dart';
-import 'package:router/ext/auto_router_extensions.dart';
-
-import '../../../router/page/rewards_page_router.dart';
-import '../../rewards/vm/rewards_view_model.dart';
-
-@RoutePage()
-class RewardsPage extends HookConsumerWidget {
-  const RewardsPage({Key? key}) : super(key: key);
-
-  //启动当前页面
-  static void startInstance({BuildContext? context}) {
-    if (context != null) {
-      context.router.push(const RewardsPageRoute());
-    } else {
-      appRouter.push(const RewardsPageRoute());
-    }
-  }
-
-  @override
-  Widget build(BuildContext context, WidgetRef ref) {
-    final _viewModel = ref.read(rewardsViewModelProvider.notifier);
-
-    return Scaffold(
-      appBar: AppBar(title: Text("奖励")),
-      body: Center(
-        child: Text("奖励的主页面"),
-      ),
-    );
-  }
-}

+ 918 - 0
packages/cpt_rewards/lib/modules/rewards/rewards_page.dart

@@ -0,0 +1,918 @@
+import 'package:cpt_rewards/modules/rewards_address/rewards_address_page.dart';
+import 'package:cpt_rewards/modules/rewards_code/rewards_code_page.dart';
+import 'package:cpt_rewards/modules/rewards_history/rewards_history_page.dart';
+import 'package:cpt_rewards/modules/rewards_home/rewards_home_page.dart';
+import 'package:cpt_rewards/modules/rewards_list/rewards_list_page.dart';
+import 'package:cpt_rewards/modules/rewards_my/rewards_my_page.dart';
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_platform/engine/image/image_nine_grid.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_vm.dart';
+
+@RoutePage()
+class RewardsPage extends HookConsumerWidget {
+  const RewardsPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsPageRoute());
+    } else {
+      appRouter.push(const RewardsPageRoute());
+    }
+  }
+
+  Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
+    // List itemsList = _vm.state.list.toList();
+    return Container(
+        decoration: BoxDecoration(
+          border: Border(
+              bottom: BorderSide(
+            color: ColorUtils.string2Color('#4161D0'), // 设置bottom边框的颜色
+            width: 45.0, // 设置bottom边框的宽度
+          )),
+          borderRadius: const BorderRadius.only(
+            topLeft: Radius.circular(0.0),
+            topRight: Radius.circular(0.0),
+            bottomLeft: Radius.circular(30.0),
+            bottomRight: Radius.circular(30.0),
+          ), // 圆角
+        ),
+        child: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const MyAssetImage(
+              Assets.rewardsRewardsBack,
+              width: 44,
+              height: 44,
+            ),
+            // const Text(
+            //   '1526 Available Points',
+            //   style: TextStyle(
+            //       fontSize: 18.0,
+            //       color: Colors.white,
+            //       fontWeight: FontWeight.w500), // 设置字体大小
+            // ).paddingOnly(left: 10, top: 20, bottom: 18),
+            Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                const Text(
+                  'Available Points',
+                  style: TextStyle(
+                      fontSize: 17.0,
+                      color: Colors.white,
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ),
+                Container(
+                  decoration: BoxDecoration(
+                    border: Border.all(color: Colors.white, width: 1), // 边框
+                    borderRadius: BorderRadius.circular(8), // 圆角
+                  ),
+                  child: Row(
+                    children: [
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ).marginOnly(right: 5),
+                      const Text(
+                        '1022',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: Colors.white,
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                    ],
+                  ).paddingOnly(left: 10, top: 7, bottom: 7, right: 10),
+                ),
+              ],
+            ).paddingOnly(left: 10, top: 20, bottom: 18),
+          ],
+        )
+            .paddingOnly(top: 15, left: 5, right: 15, bottom: 0)
+            .border(bottom: 0, color: ColorUtils.string2Color('#4161D0'))
+            .backgroundColor(ColorUtils.string2Color('#4161D0')));
+  }
+
+  Widget _buildSearch(BuildContext context, WidgetRef ref, _vm) {
+    // List itemsList = _vm.state.list.toList();
+    return Container(
+      width: MediaQuery.of(context).size.width - 30,
+      decoration: BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.circular(10),
+        boxShadow: const [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        mainAxisAlignment: MainAxisAlignment.center,
+        children: [
+          Text(
+            'Continuous Login 8 Day',
+            style: TextStyle(
+                fontSize: 15.0,
+                color: ColorUtils.string2Color('#000000'),
+                fontWeight: FontWeight.w500), // 设置字体大小
+          ),
+          Flex(
+            direction: Axis.horizontal,
+            children: [
+              Expanded(
+                flex: 1,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                  ),
+                  height: 78,
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        '11/01',
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#4161D0'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ),
+                      Text(
+                        '+2',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#4161D0'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    ],
+                  ),
+                ),
+              ),
+              const SizedBox(width: 15.0),
+              Expanded(
+                flex: 1,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#4161D0'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                  ),
+                  height: 78,
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        'Today',
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#ffffff'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ),
+                      Text(
+                        '+2',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#ffffff'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    ],
+                  ),
+                ),
+              ),
+              const SizedBox(width: 15.0),
+              Expanded(
+                flex: 1,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                  ),
+                  height: 78,
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        'Today',
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ),
+                      Text(
+                        '+2',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    ],
+                  ),
+                ),
+              ),
+              const SizedBox(width: 15.0),
+              Expanded(
+                flex: 1,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                  ),
+                  height: 78,
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        'Today',
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ),
+                      Text(
+                        '+2',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    ],
+                  ),
+                ),
+              ),
+            ],
+          ).marginOnly(top: 13, bottom: 13),
+          Flex(
+            direction: Axis.horizontal,
+            children: [
+              Expanded(
+                flex: 1,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                  ),
+                  height: 78,
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        'Today',
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ),
+                      Text(
+                        '+2',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    ],
+                  ),
+                ),
+              ),
+              const SizedBox(width: 15.0),
+              Expanded(
+                flex: 1,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                  ),
+                  height: 78,
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        'Today',
+                        style: TextStyle(
+                            fontSize: 13.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w400), // 设置字体大小
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconJb,
+                        width: 23,
+                        height: 23,
+                      ),
+                      Text(
+                        '+2',
+                        style: TextStyle(
+                            fontSize: 15.0,
+                            color: ColorUtils.string2Color('#000000'),
+                            fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    ],
+                  ),
+                ),
+              ),
+              const SizedBox(width: 15.0),
+              Expanded(
+                flex: 2,
+                child: Container(
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    borderRadius: BorderRadius.circular(10),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#F2F3F6'), width: 1),
+                  ),
+                  height: 78,
+                  child: Row(
+                    crossAxisAlignment: CrossAxisAlignment.start,
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    children: [
+                      Column(
+                        crossAxisAlignment: CrossAxisAlignment.center,
+                        // mainAxisAlignment: MainAxisAlignment.center,
+                        children: [
+                          Text(
+                            'Today',
+                            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), // 设置字体大小
+                          ),
+                        ],
+                      ),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsIconYdjb,
+                        width: 67,
+                        height: 57,
+                      ).paddingOnly(top: 7),
+                    ],
+                  ).paddingOnly(top: 8, left: 13, right: 4),
+                ),
+              ),
+            ],
+          ),
+        ],
+      ).paddingOnly(left: 15, right: 15, top: 15, bottom: 15),
+    );
+  }
+
+  Widget _buildSwiper(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      // color: Colors.white,
+      height: 55,
+      decoration: BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.circular(10),
+        boxShadow: const [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Row(
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+        children: [
+          Text(
+            'How To Get Rewards?',
+            style: TextStyle(
+                fontSize: 15.0,
+                color: ColorUtils.string2Color('#000000'),
+                fontWeight: FontWeight.w500), // 设置字体大小
+          ),
+          Container(
+            padding:
+                const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
+            decoration: BoxDecoration(
+              color: ColorUtils.string2Color('#4161D0'),
+              borderRadius: BorderRadius.circular(5),
+            ),
+            child: Text(
+              'Rewards',
+              style: TextStyle(
+                  fontSize: 14.0,
+                  color: ColorUtils.string2Color('#ffffff'),
+                  fontWeight: FontWeight.w400), // 设置字体大小
+            ).onTap(() {
+              RewardsHomePage.startInstance();
+            }),
+          ),
+        ],
+      ).paddingOnly(left: 15, right: 15),
+    ).marginOnly(top: 12, bottom: 12);
+  }
+
+  Widget _buildList(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      decoration: BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.circular(10),
+        boxShadow: const [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisAlignment: MainAxisAlignment.center,
+        children: [
+          Container(
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            decoration: BoxDecoration(
+                border: Border(
+                    bottom: BorderSide(
+              width: 1.0, // 底边边框的宽度
+              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+            ))),
+            child: Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Row(
+                  children: [
+                    Container(
+                      padding: const EdgeInsets.only(
+                          top: 10, bottom: 10, left: 17, right: 17),
+                      decoration: BoxDecoration(
+                        color: ColorUtils.string2Color('#f2f3f6'),
+                        borderRadius: BorderRadius.circular(5),
+                      ),
+                      child: const MyAssetImage(
+                        Assets.rewardsRewardsIconIm,
+                        width: 29,
+                        height: 24,
+                      ),
+                    ).marginOnly(right: 12),
+                    Column(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      mainAxisAlignment: MainAxisAlignment.center,
+                      children: [
+                        Text(
+                          'Daily Login',
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w500), // 设置字体大小
+                        ).marginOnly(bottom: 6),
+                        Row(
+                          children: [
+                            Text(
+                              '+2',
+                              style: TextStyle(
+                                  fontSize: 15.0,
+                                  color: ColorUtils.string2Color('#4161D0'),
+                                  fontWeight: FontWeight.w500), // 设置字体大小
+                            ),
+                            const MyAssetImage(
+                              Assets.rewardsRewardsIconJb,
+                              width: 14,
+                              height: 14,
+                            )
+                          ],
+                        )
+                      ],
+                    )
+                  ],
+                ),
+                Container(
+                  width: 86,
+                  height: 30,
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#ffffff'),
+                    borderRadius: BorderRadius.circular(5),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                  ),
+                  child: Center(
+                    child: Text(
+                      'Check In',
+                      style: TextStyle(
+                          fontSize: 14.0,
+                          color: ColorUtils.string2Color('#4161D0'),
+                          fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ),
+                ),
+              ],
+            ),
+          ),
+          Container(
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            decoration: BoxDecoration(
+                border: Border(
+                    bottom: BorderSide(
+              width: 1.0, // 底边边框的宽度
+              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+            ))),
+            child: Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Row(
+                  children: [
+                    Container(
+                      padding: const EdgeInsets.only(
+                          top: 10, bottom: 10, left: 17, right: 17),
+                      decoration: BoxDecoration(
+                        color: ColorUtils.string2Color('#f2f3f6'),
+                        borderRadius: BorderRadius.circular(5),
+                      ),
+                      child: const MyAssetImage(
+                        Assets.rewardsRewardsIconIm,
+                        width: 29,
+                        height: 24,
+                      ),
+                    ).marginOnly(right: 12),
+                    Column(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      mainAxisAlignment: MainAxisAlignment.center,
+                      children: [
+                        Text(
+                          'Daily Login',
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w500), // 设置字体大小
+                        ).marginOnly(bottom: 6),
+                        Row(
+                          children: [
+                            Text(
+                              '+2',
+                              style: TextStyle(
+                                  fontSize: 15.0,
+                                  color: ColorUtils.string2Color('#4161D0'),
+                                  fontWeight: FontWeight.w500), // 设置字体大小
+                            ),
+                            const MyAssetImage(
+                              Assets.rewardsRewardsIconJb,
+                              width: 14,
+                              height: 14,
+                            )
+                          ],
+                        )
+                      ],
+                    )
+                  ],
+                ),
+                Container(
+                  width: 86,
+                  height: 30,
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#ffffff'),
+                    borderRadius: BorderRadius.circular(5),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                  ),
+                  child: Center(
+                    child: Text(
+                      'Check In',
+                      style: TextStyle(
+                          fontSize: 14.0,
+                          color: ColorUtils.string2Color('#4161D0'),
+                          fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ),
+                ),
+              ],
+            ),
+          ),
+          Container(
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            decoration: BoxDecoration(
+                border: Border(
+                    bottom: BorderSide(
+              width: 1.0, // 底边边框的宽度
+              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+            ))),
+            child: Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Row(
+                  children: [
+                    Container(
+                      padding: const EdgeInsets.only(
+                          top: 10, bottom: 10, left: 17, right: 17),
+                      decoration: BoxDecoration(
+                        color: ColorUtils.string2Color('#f2f3f6'),
+                        borderRadius: BorderRadius.circular(5),
+                      ),
+                      child: const MyAssetImage(
+                        Assets.rewardsRewardsIconIm,
+                        width: 29,
+                        height: 24,
+                      ),
+                    ).marginOnly(right: 12),
+                    Column(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      mainAxisAlignment: MainAxisAlignment.center,
+                      children: [
+                        Text(
+                          'Daily Login',
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w500), // 设置字体大小
+                        ).marginOnly(bottom: 6),
+                        Row(
+                          children: [
+                            Text(
+                              '+2',
+                              style: TextStyle(
+                                  fontSize: 15.0,
+                                  color: ColorUtils.string2Color('#4161D0'),
+                                  fontWeight: FontWeight.w500), // 设置字体大小
+                            ),
+                            const MyAssetImage(
+                              Assets.rewardsRewardsIconJb,
+                              width: 14,
+                              height: 14,
+                            )
+                          ],
+                        )
+                      ],
+                    )
+                  ],
+                ),
+                Container(
+                  width: 86,
+                  height: 30,
+                  decoration: BoxDecoration(
+                    color: ColorUtils.string2Color('#ffffff'),
+                    borderRadius: BorderRadius.circular(5),
+                    border: Border.all(
+                        color: ColorUtils.string2Color('#4161D0'), width: 1),
+                  ),
+                  child: Center(
+                    child: Text(
+                      'Check In',
+                      style: TextStyle(
+                          fontSize: 14.0,
+                          color: ColorUtils.string2Color('#4161D0'),
+                          fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ),
+                ),
+              ],
+            ),
+          )
+        ],
+      ),
+    ).marginOnly(bottom: 12);
+  }
+
+  Widget _buildHistory(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      decoration: BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.circular(10),
+        boxShadow: const [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisAlignment: MainAxisAlignment.center,
+        children: [
+          Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Text(
+                  'Points History',
+                  style: TextStyle(
+                      fontSize: 15.0,
+                      color: ColorUtils.string2Color('#000000'),
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ),
+                Text(
+                  'More >',
+                  style: TextStyle(
+                      fontSize: 15.0,
+                      color: ColorUtils.string2Color('#4161D0'),
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ).onTap(() {
+                  RewardsHistoryPage.startInstance();
+                })
+              ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
+          Container(
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            decoration: BoxDecoration(
+                border: Border(
+                    bottom: BorderSide(
+              width: 1.0, // 底边边框的宽度
+              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+            ))),
+            child: Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    Text(
+                      'Daily Login',
+                      style: TextStyle(
+                          fontSize: 15.0,
+                          color: ColorUtils.string2Color('#000000'),
+                          fontWeight: FontWeight.w500), // 设置字体大小
+                    ).marginOnly(bottom: 6),
+                    Text(
+                      '14 Oct 2024  10:00PM',
+                      style: TextStyle(
+                          fontSize: 13.0,
+                          color: ColorUtils.string2Color('#808DAF'),
+                          fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ],
+                ),
+                Text(
+                  '+2',
+                  style: TextStyle(
+                      fontSize: 20.0,
+                      color: ColorUtils.string2Color('#FDB429'),
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ),
+              ],
+            ),
+          ),
+          Container(
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            decoration: BoxDecoration(
+                border: Border(
+                    bottom: BorderSide(
+              width: 1.0, // 底边边框的宽度
+              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+            ))),
+            child: Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    Text(
+                      'Daily Login',
+                      style: TextStyle(
+                          fontSize: 15.0,
+                          color: ColorUtils.string2Color('#000000'),
+                          fontWeight: FontWeight.w500), // 设置字体大小
+                    ).marginOnly(bottom: 6),
+                    Text(
+                      '14 Oct 2024  10:00PM',
+                      style: TextStyle(
+                          fontSize: 13.0,
+                          color: ColorUtils.string2Color('#808DAF'),
+                          fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ],
+                ),
+                Text(
+                  '+2',
+                  style: TextStyle(
+                      fontSize: 20.0,
+                      color: ColorUtils.string2Color('#FDB429'),
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ),
+              ],
+            ),
+          ),
+          Container(
+            padding:
+                const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
+            decoration: BoxDecoration(
+                border: Border(
+                    bottom: BorderSide(
+              width: 1.0, // 底边边框的宽度
+              color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+            ))),
+            child: Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    Text(
+                      'Daily Login',
+                      style: TextStyle(
+                          fontSize: 15.0,
+                          color: ColorUtils.string2Color('#000000'),
+                          fontWeight: FontWeight.w500), // 设置字体大小
+                    ).marginOnly(bottom: 6),
+                    Text(
+                      '14 Oct 2024  10:00PM',
+                      style: TextStyle(
+                          fontSize: 13.0,
+                          color: ColorUtils.string2Color('#808DAF'),
+                          fontWeight: FontWeight.w400), // 设置字体大小
+                    ),
+                  ],
+                ),
+                Text(
+                  '+2',
+                  style: TextStyle(
+                      fontSize: 20.0,
+                      color: ColorUtils.string2Color('#FDB429'),
+                      fontWeight: FontWeight.w500), // 设置字体大小
+                ),
+              ],
+            ),
+          ),
+        ],
+      ),
+    ).marginOnly(bottom: 12);
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("奖励")),
+      body: Column(children: [
+        Expanded(
+          child: SingleChildScrollView(
+              scrollDirection: Axis.vertical,
+              physics: const BouncingScrollPhysics(),
+              clipBehavior: Clip.none,
+              child: Column(
+                children: [
+                  _buildTop(context, ref, _vm),
+                  Container(
+                    transform: Matrix4.translationValues(0.0, -45.0, 0.0),
+                    child: Column(
+                      children: [
+                        _buildSearch(context, ref, _vm),
+                        _buildSwiper(context, ref, _vm),
+                        _buildList(context, ref, _vm),
+                        _buildHistory(context, ref, _vm),
+                      ],
+                    ), // 使用负数margin
+                  ).paddingOnly(left: 15, right: 15),
+                ],
+              )),
+        ),
+      ]).backgroundColor(ColorUtils.string2Color('#F2F3F6')),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards/rewards_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_state.dart';
+part 'rewards_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsRepository rewardsRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsRepository {
+  DioEngine dioEngine;
+
+  RewardsRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards/rewards_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsRepository].
+@ProviderFor(rewardsRepository)
+final rewardsRepositoryProvider = Provider<RewardsRepository>.internal(
+  rewardsRepository,
+  name: r'rewardsRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsRepositoryRef = ProviderRef<RewardsRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards/rewards_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsState rewardsStateFromJson(String str) => RewardsState.fromJson(json.decode(str));
+
+String rewardsStateToJson(RewardsState data) => json.encode(data.toJson());
+
+class RewardsState {
+  RewardsState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsState.fromJson(Map<dynamic, dynamic> json) => RewardsState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 108 - 0
packages/cpt_rewards/lib/modules/rewards/rewards_vm.dart

@@ -0,0 +1,108 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_state.dart';
+import './rewards_repository.dart';
+part 'rewards_vm.g.dart';
+
+@riverpod
+class RewardsVm extends _$RewardsVm {
+  late RewardsRepository rewardsRepository;
+  RewardsState initState() {
+    return RewardsState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsState build() {
+    // 引入数据仓库
+    rewardsRepository = ref.read(rewardsRepositoryProvider);
+    // 初始化状态
+    RewardsState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result =
+          await rewardsRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards/rewards_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsVm].
+@ProviderFor(RewardsVm)
+final rewardsVmProvider =
+    AutoDisposeNotifierProvider<RewardsVm, RewardsState>.internal(
+  RewardsVm.new,
+  name: r'rewardsVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsVm = AutoDisposeNotifier<RewardsState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 0 - 14
packages/cpt_rewards/lib/modules/rewards/vm/rewards_view_model.dart

@@ -1,14 +0,0 @@
-
-import 'package:riverpod_annotation/riverpod_annotation.dart';
-
-part 'rewards_view_model.g.dart';
-
-@riverpod
-class RewardsViewModel extends _$RewardsViewModel {
-
-  @override
-  void build(){
-
-  }
-
-}

+ 170 - 0
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_page.dart

@@ -0,0 +1,170 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_address_vm.dart';
+
+@RoutePage()
+class RewardsAddressPage extends HookConsumerWidget {
+  const RewardsAddressPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsAddressPageRoute());
+    } else {
+      appRouter.push(const RewardsAddressPageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Delibowl Group',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w500),
+            ),
+            Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIconAddes,
+                  width: 15,
+                  height: 19,
+                ).marginOnly(right: 10),
+                const Expanded(
+                  child: Text(
+                    maxLines: 2, // 设置最大行数为2
+                    overflow: TextOverflow.ellipsis,
+                    softWrap: true, // 启用自动换行
+                    '176 Orchard Rd, #02-29/30 Song Fa Bak Kut Teh The Centrepoint, Singapore 238843',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: Color.fromARGB(255, 69, 33, 33),
+                        fontWeight: FontWeight.w400),
+                  ),
+                ),
+              ],
+            ).marginOnly(top: 10, bottom: 10),
+            Container(
+              height: 40,
+              decoration: BoxDecoration(
+                color: Colors.white,
+                borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                border: Border.all(
+                    color: ColorUtils.string2Color('#4161D0'), width: 1.0),
+              ),
+              child: Center(
+                child: Text(
+                  '+65 26593458',
+                  style: TextStyle(
+                      fontSize: 15.0,
+                      color: ColorUtils.string2Color('#4161D0'),
+                      fontWeight: FontWeight.w500),
+                ),
+              ),
+            ),
+          ],
+        ),
+      ],
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        children: [
+          SizedBox(
+            width: MediaQuery.of(context).size.width - 30,
+            height: 160,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [_buildItemLeftSection(context, ref, item, _vm)],
+            ).paddingOnly(left: 20, right: 20, top: 15),
+          ).constrained(
+            minHeight: 160,
+          ),
+        ],
+      ),
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return ListView.builder(
+      itemCount: itemsList.length,
+      itemBuilder: (context, index) {
+        return _buildSaleItem(context, ref, itemsList[index], _vm);
+      },
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsAddressVmProvider.notifier);
+    final state = ref.watch(rewardsAddressVmProvider);
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Redeem Deal At",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      body: Container(
+        child: Column(
+          children: [
+            Expanded(
+              child: EasyRefresh(
+                // 上拉加载
+                onLoad: () async {
+                  Log.d("----onLoad");
+                  _vm.onLoadData();
+                },
+                // 下拉刷新
+                onRefresh: () async {
+                  Log.d("----onRefresh");
+                  _vm.refreshListData();
+                },
+                child: Container(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    padding: const EdgeInsets.only(top: 15),
+                    child: _buildSaleList(context, ref, _vm)),
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_address_state.dart';
+part 'rewards_address_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsAddressRepository rewardsAddressRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsAddressRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsAddressRepository {
+  DioEngine dioEngine;
+
+  RewardsAddressRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsAddressState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsAddressState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_address_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsAddressRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsAddressRepository].
+@ProviderFor(rewardsAddressRepository)
+final rewardsAddressRepositoryProvider = Provider<RewardsAddressRepository>.internal(
+  rewardsAddressRepository,
+  name: r'rewardsAddressRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsAddressRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsAddressRepositoryRef = ProviderRef<RewardsAddressRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsAddressState rewardsAddressStateFromJson(String str) => RewardsAddressState.fromJson(json.decode(str));
+
+String rewardsAddressStateToJson(RewardsAddressState data) => json.encode(data.toJson());
+
+class RewardsAddressState {
+  RewardsAddressState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsAddressState.fromJson(Map<dynamic, dynamic> json) => RewardsAddressState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsAddressState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsAddressState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 109 - 0
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_vm.dart

@@ -0,0 +1,109 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_address_state.dart';
+import './rewards_address_repository.dart';
+part 'rewards_address_vm.g.dart';
+
+@riverpod
+class RewardsAddressVm extends _$RewardsAddressVm {
+  late RewardsAddressRepository rewardsAddressRepository;
+  RewardsAddressState initState() {
+    return RewardsAddressState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsAddressState build() {
+    // 引入数据仓库
+    rewardsAddressRepository = ref.read(rewardsAddressRepositoryProvider);
+    // 初始化状态
+    RewardsAddressState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsAddressRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_address/rewards_address_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_address_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsAddressVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsAddressVm].
+@ProviderFor(RewardsAddressVm)
+final rewardsAddressVmProvider =
+    AutoDisposeNotifierProvider<RewardsAddressVm, RewardsAddressState>.internal(
+  RewardsAddressVm.new,
+  name: r'rewardsAddressVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsAddressVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsAddressVm = AutoDisposeNotifier<RewardsAddressState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 129 - 0
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_page.dart

@@ -0,0 +1,129 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_code_vm.dart';
+
+@RoutePage()
+class RewardsCodePage extends HookConsumerWidget {
+  const RewardsCodePage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsCodePageRoute());
+    } else {
+      appRouter.push(const RewardsCodePageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.center,
+          mainAxisAlignment: MainAxisAlignment.center,
+          children: [
+            const Center(
+              child: Text(
+                'SHOW THE VERIFICATION CODE TO YOUR MERCHANT',
+                textAlign: TextAlign.center,
+                style: TextStyle(
+                    fontSize: 20.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w500),
+              ),
+            ),
+            Text(
+              'VERIFICATION CODE',
+              style: TextStyle(
+                  fontSize: 18.0,
+                  color: ColorUtils.string2Color('#54638C'),
+                  fontWeight: FontWeight.w500),
+            ).marginOnly(top: 35, bottom: 20),
+            Text(
+              '778890',
+              style: TextStyle(
+                  fontSize: 36.0,
+                  color: ColorUtils.string2Color('#4161D0'),
+                  fontWeight: FontWeight.w500),
+            ),
+          ],
+        ),
+      ],
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          height: 250,
+          // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            mainAxisAlignment: MainAxisAlignment.start,
+            children: [_buildItemLeftSection(context, ref, item, _vm)],
+          ).paddingOnly(left: 26, right: 26, top: 40),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return _buildSaleItem(context, ref, itemsList[0], _vm);
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsCodeVmProvider.notifier);
+    final state = ref.watch(rewardsCodeVmProvider);
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Verification Code",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      body: Container(
+        child: Column(
+          children: [
+            Expanded(
+              child: 
+              EasyRefresh(
+                child: 
+                Container(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    padding: const EdgeInsets.only(top: 15),
+                    child: _buildSaleList(context, ref, _vm)),
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_code_state.dart';
+part 'rewards_code_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsCodeRepository rewardsCodeRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsCodeRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsCodeRepository {
+  DioEngine dioEngine;
+
+  RewardsCodeRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsCodeState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsCodeState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_code_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsCodeRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsCodeRepository].
+@ProviderFor(rewardsCodeRepository)
+final rewardsCodeRepositoryProvider = Provider<RewardsCodeRepository>.internal(
+  rewardsCodeRepository,
+  name: r'rewardsCodeRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsCodeRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsCodeRepositoryRef = ProviderRef<RewardsCodeRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsCodeState rewardsCodeStateFromJson(String str) => RewardsCodeState.fromJson(json.decode(str));
+
+String rewardsCodeStateToJson(RewardsCodeState data) => json.encode(data.toJson());
+
+class RewardsCodeState {
+  RewardsCodeState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsCodeState.fromJson(Map<dynamic, dynamic> json) => RewardsCodeState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsCodeState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsCodeState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 109 - 0
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_vm.dart

@@ -0,0 +1,109 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_code_state.dart';
+import './rewards_code_repository.dart';
+part 'rewards_code_vm.g.dart';
+
+@riverpod
+class RewardsCodeVm extends _$RewardsCodeVm {
+  late RewardsCodeRepository rewardsCodeRepository;
+  RewardsCodeState initState() {
+    return RewardsCodeState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsCodeState build() {
+    // 引入数据仓库
+    rewardsCodeRepository = ref.read(rewardsCodeRepositoryProvider);
+    // 初始化状态
+    RewardsCodeState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsCodeRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_code/rewards_code_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_code_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsCodeVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsCodeVm].
+@ProviderFor(RewardsCodeVm)
+final rewardsCodeVmProvider =
+    AutoDisposeNotifierProvider<RewardsCodeVm, RewardsCodeState>.internal(
+  RewardsCodeVm.new,
+  name: r'rewardsCodeVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsCodeVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsCodeVm = AutoDisposeNotifier<RewardsCodeState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 144 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/dialog/account_deactivation_dialog.dart

@@ -0,0 +1,144 @@
+import 'package:cpt_rewards/modules/rewards_successful/rewards_successful_page.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:hooks_riverpod/hooks_riverpod.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+import '../rewards_confirm_vm.dart';
+
+class AccountDeactivationDialog extends HookConsumerWidget {
+  VoidCallback confirmAction;
+
+  AccountDeactivationDialog({
+    required this.confirmAction,
+  });
+
+  Widget CheckboxList(BuildContext context) {
+    // final List<String> items = ['苹果', '香蕉', '橙子'];
+    // final List<bool> selections = [false, false, false];
+    // return Expanded(child:ListView.builder(
+    //   itemCount: items.length,
+    //   itemBuilder: (context, index) {
+    //     return Container(
+    //       padding: EdgeInsets.symmetric(vertical: 5.0),
+    //       child: CheckboxListTile(
+    //         value: selections[index],
+    //         onChanged: (bool? val) {
+    //           print('Option 1 is now ${val ?? false}');
+    //           selections[index] = val!;
+    //         },
+    //         title: Text(items[index]),
+    //       ),
+    //     );
+    //   },
+    // )
+    // );
+    var _rangeValues = RangeValues(20.0, 80.0);
+    return Column(
+      mainAxisAlignment: MainAxisAlignment.center,
+      crossAxisAlignment: CrossAxisAlignment.center,
+      children: [
+        const Text(
+          textAlign: TextAlign.center,
+          'Are you sure to spend 600 points to redeem goods?',
+          style: TextStyle(
+              fontSize: 19.0, color: Colors.black, fontWeight: FontWeight.w500),
+        ).paddingOnly(left: 40, right: 40)
+      ],
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsConfirmVmProvider.notifier);
+    final state = ref.watch(rewardsConfirmVmProvider);
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.center,
+      mainAxisAlignment: MainAxisAlignment.center,
+      children: [
+        Container(
+          width: double.infinity,
+          height: 55,
+          decoration: BoxDecoration(
+            color: context.appColors.btnBgDefault,
+            borderRadius: const BorderRadius.only(
+              topRight: Radius.circular(15),
+              topLeft: Radius.circular(15),
+            ),
+          ),
+          child: Row(
+            children: [
+              const SizedBox(width: 45),
+              MyTextView(
+                'Points payment',
+                fontSize: 18,
+                textAlign: TextAlign.center,
+                isFontMedium: true,
+                textColor: Colors.white,
+              ).expanded(),
+              const MyAssetImage(
+                Assets.baseServiceDialogDeleteIcon,
+                width: 25,
+                height: 25.5,
+              ).onTap(() {
+                onCancel();
+              }, padding: 10)
+            ],
+          ),
+        ),
+        Container(
+          width: double.infinity,
+          padding: const EdgeInsets.only(top: 22),
+          decoration: BoxDecoration(
+            color: context.appColors.whiteSecondBG,
+            borderRadius: const BorderRadius.only(
+              bottomLeft: Radius.circular(15),
+              bottomRight: Radius.circular(15),
+            ),
+          ),
+          child: Column(
+            children: [
+              Container(height: 150, child: CheckboxList(context)),
+              Row(
+                children: [
+                  const SizedBox(width: 18),
+                  Expanded(
+                      flex: 1,
+                      child: InkWell(
+                        onTap: () async {
+                          onCancel();
+                          RewardsSuccessfulPage.startInstance();
+                          // confirmAction();
+                        },
+                        child: MyTextView(
+                          'Pay Now',
+                          fontSize: 16,
+                          paddingTop: 13,
+                          paddingBottom: 13,
+                          isFontMedium: true,
+                          textAlign: TextAlign.center,
+                          textColor: Colors.white,
+                          backgroundColor: context.appColors.btnBgDefault,
+                          cornerRadius: 7,
+                        ),
+                      )),
+                  const SizedBox(width: 18),
+                ],
+              ).marginOnly(bottom: 30, top: 28),
+            ],
+          ),
+        ),
+      ],
+    ).constrained(width: 340);
+  }
+
+//取消弹框
+  void onCancel() async {
+    SmartDialog.dismiss();
+  }
+}

+ 388 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_page.dart

@@ -0,0 +1,388 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_confirm_vm.dart';
+
+@RoutePage()
+class RewardsConfirmPage extends HookConsumerWidget {
+  const RewardsConfirmPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsConfirmPageRoute());
+    } else {
+      appRouter.push(const RewardsConfirmPageRoute());
+    }
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+            decoration: const BoxDecoration(
+              color: Colors.white,
+              borderRadius: BorderRadius.all(Radius.circular(6.0)),
+              boxShadow: [
+                BoxShadow(
+                    color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+              ],
+            ),
+            width: MediaQuery.of(context).size.width - 30,
+            // height: 420,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIndex1,
+                  // width: 110,
+                  height: 150,
+                ),
+                const Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  mainAxisAlignment: MainAxisAlignment.start,
+                  children: [
+                    Text(
+                      maxLines: 1, // 设置最大行数为2
+                      overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                      'Cute children multifunctional umbrella',
+                      style: TextStyle(
+                          fontSize: 17.0,
+                          color: Colors.black,
+                          fontWeight: FontWeight.w500),
+                    ),
+                  ],
+                ).paddingOnly(left: 15, right: 15, top: 10, bottom: 30),
+              ],
+            )),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildDeal(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                mainAxisSize: MainAxisSize.min,
+                mainAxisAlignment: MainAxisAlignment.start,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.rewardsRewardsDetailDeal,
+                    width: 25,
+                    height: 25,
+                  ).marginOnly(right: 5),
+                  Text(
+                    'Redeem Deal At',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#000000'),
+                        fontWeight: FontWeight.w500),
+                  )
+                ],
+              ),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  Text(
+                    'Also redeemable in 1 more location',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#54638C'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                ],
+              ).marginOnly(top: 10, bottom: 15),
+              Container(
+                height: 40,
+                decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                  border: Border.all(
+                      color: ColorUtils.string2Color('#4161D0'), width: 1.0),
+                ),
+                child: Center(
+                  child: Text(
+                    'See More Locations',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#4161D0'),
+                        fontWeight: FontWeight.w500),
+                  ),
+                ),
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15, top: 12, bottom: 20),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildPackage(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                mainAxisSize: MainAxisSize.min,
+                mainAxisAlignment: MainAxisAlignment.start,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.rewardsRewardsIconDatd,
+                    width: 15,
+                    height: 15,
+                  ).marginOnly(right: 10),
+                  Text(
+                    'Redeem From',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#000000'),
+                        fontWeight: FontWeight.w500),
+                  )
+                ],
+              ).marginOnly(bottom: 10),
+              Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  Text(
+                    '17 Mar 2020 until 15 Jul 2020',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#54638C'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                ],
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15, top: 12, bottom: 20),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildNotice(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  Text(
+                    'Quantity:',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#333333'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                  Row(
+                    children: [
+                      const MyAssetImage(
+                        Assets.rewardsRewardsJian,
+                        width: 21,
+                        height: 21,
+                      ),
+                      Text(
+                        '2',
+                        style: TextStyle(
+                            fontSize: 19.0,
+                            color: ColorUtils.string2Color('#333333'),
+                            fontWeight: FontWeight.w500),
+                      ).marginOnly(left: 15, right: 15),
+                      const MyAssetImage(
+                        Assets.rewardsRewardsJia,
+                        width: 21,
+                        height: 21,
+                      ),
+                    ],
+                  ),
+                ],
+              ),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  Text(
+                    'Points:',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#333333'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                  Row(
+                    children: [
+                      Text(
+                        '350',
+                        style: TextStyle(
+                            decoration: TextDecoration.lineThrough,
+                            decorationColor: ColorUtils.string2Color('#54638C'),
+                            decorationStyle: TextDecorationStyle.solid,
+                            fontSize: 14.0,
+                            color: ColorUtils.string2Color('#54638C'),
+                            fontWeight: FontWeight.w400),
+                      ),
+                      Text(
+                        '300',
+                        style: TextStyle(
+                            fontSize: 19.0,
+                            color: ColorUtils.string2Color('#333333'),
+                            fontWeight: FontWeight.w500),
+                      ).marginOnly(left: 10),
+                    ],
+                  ),
+                ],
+              ).marginOnly(top: 30, bottom: 30),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  Text(
+                    'Amount:',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#333333'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                  Row(
+                    children: [
+                      Text(
+                        '600',
+                        style: TextStyle(
+                            fontSize: 19.0,
+                            color: ColorUtils.string2Color('#4161D0'),
+                            fontWeight: FontWeight.w500),
+                      ),
+                    ],
+                  ),
+                ],
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15, top: 30, bottom: 30),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsConfirmVmProvider.notifier);
+    final state = ref.watch(rewardsConfirmVmProvider);
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Verification Confirm",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      body: Column(
+        children: [
+          Expanded(
+              child: SingleChildScrollView(
+                  scrollDirection: Axis.vertical,
+                  physics: const BouncingScrollPhysics(),
+                  clipBehavior: Clip.none,
+                  child: Column(
+                    children: [
+                      Container(
+                          color: ColorUtils.string2Color('#F2F3F6'),
+                          padding: const EdgeInsets.only(top: 15),
+                          child: Column(
+                            children: [
+                              _buildSaleItem(context, ref, _vm),
+                              _buildDeal(context, ref, _vm),
+                              _buildPackage(context, ref, _vm),
+                              _buildNotice(context, ref, _vm),
+                            ],
+                          )),
+                    ],
+                  ))),
+          Container(
+            height: 50,
+            color: ColorUtils.string2Color('#4161D0'),
+            child: Flex(
+              direction: Axis.horizontal,
+              children: [
+                Expanded(
+                  flex: 1,
+                  child: Container(
+                    color: ColorUtils.string2Color('#4161D0'),
+                    height: 100,
+                    child: Row(
+                      mainAxisAlignment: MainAxisAlignment.center,
+                      crossAxisAlignment: CrossAxisAlignment.center,
+                      children: [
+                        MyTextView(
+                          "Redeem",
+                          fontSize: 16,
+                          textColor: Colors.white,
+                          isFontMedium: true,
+                        ),
+                      ],
+                    ),
+                  ).onTap(() {
+                    // 去详情
+                    _vm.doDeleteAccount();
+                  }),
+                ),
+              ],
+            ),
+          )
+        ],
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_confirm_state.dart';
+part 'rewards_confirm_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsConfirmRepository rewardsConfirmRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsConfirmRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsConfirmRepository {
+  DioEngine dioEngine;
+
+RewardsConfirmRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+      final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsConfirmState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsConfirmState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_confirm_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsConfirmRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsConfirmRepository].
+@ProviderFor(rewardsConfirmRepository)
+final rewardsConfirmRepositoryProvider = Provider<RewardsConfirmRepository>.internal(
+  rewardsConfirmRepository,
+  name: r'rewardsConfirmRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsConfirmRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsConfirmRepositoryRef = ProviderRef<RewardsConfirmRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsConfirmState rewardsConfirmStateFromJson(String str) => RewardsConfirmState.fromJson(json.decode(str));
+
+String rewardsConfirmStateToJson(RewardsConfirmState data) => json.encode(data.toJson());
+
+class RewardsConfirmState {
+  RewardsConfirmState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsConfirmState.fromJson(Map<dynamic, dynamic> json) => RewardsConfirmState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsConfirmState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsConfirmState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 118 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_vm.dart

@@ -0,0 +1,118 @@
+import 'package:cpt_rewards/modules/rewards_confirm/dialog/account_deactivation_dialog.dart';
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_confirm_state.dart';
+import './rewards_confirm_repository.dart';
+part 'rewards_confirm_vm.g.dart';
+
+@riverpod
+class RewardsConfirmVm extends _$RewardsConfirmVm {
+  late RewardsConfirmRepository rewardsConfirmRepository;
+  RewardsConfirmState initState() {
+    return RewardsConfirmState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsConfirmState build() {
+    // 引入数据仓库
+    rewardsConfirmRepository = ref.read(rewardsConfirmRepositoryProvider);
+    // 初始化状态
+    RewardsConfirmState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsConfirm(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result =
+          await rewardsConfirmRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+  void doDeleteAccount() {
+    DialogEngine.show(widget: AccountDeactivationDialog(
+      confirmAction: () {
+        ToastEngine.show("点击了确定");
+      },
+    ));
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_confirm/rewards_confirm_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_confirm_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsConfirmVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsConfirmVm].
+@ProviderFor(RewardsConfirmVm)
+final rewardsConfirmVmProvider =
+    AutoDisposeNotifierProvider<RewardsConfirmVm, RewardsConfirmState>.internal(
+  RewardsConfirmVm.new,
+  name: r'rewardsConfirmVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsConfirmVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsConfirmVm = AutoDisposeNotifier<RewardsConfirmState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, ]invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

File diff suppressed because it is too large
+ 632 - 0
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_page.dart


+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_detail_state.dart';
+part 'rewards_detail_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsDetailRepository rewardsDetailRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsDetailRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsDetailRepository {
+  DioEngine dioEngine;
+
+  RewardsDetailRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsDetailState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsDetailState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_detail_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsDetailRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsDetailRepository].
+@ProviderFor(rewardsDetailRepository)
+final rewardsDetailRepositoryProvider = Provider<RewardsDetailRepository>.internal(
+  rewardsDetailRepository,
+  name: r'rewardsDetailRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsDetailRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsDetailRepositoryRef = ProviderRef<RewardsDetailRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsDetailState rewardsDetailStateFromJson(String str) => RewardsDetailState.fromJson(json.decode(str));
+
+String rewardsDetailStateToJson(RewardsDetailState data) => json.encode(data.toJson());
+
+class RewardsDetailState {
+  RewardsDetailState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsDetailState.fromJson(Map<dynamic, dynamic> json) => RewardsDetailState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsDetailState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsDetailState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 109 - 0
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_vm.dart

@@ -0,0 +1,109 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_detail_state.dart';
+import './rewards_detail_repository.dart';
+part 'rewards_detail_vm.g.dart';
+
+@riverpod
+class RewardsDetailVm extends _$RewardsDetailVm {
+  late RewardsDetailRepository rewardsDetailRepository;
+  RewardsDetailState initState() {
+    return RewardsDetailState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsDetailState build() {
+    // 引入数据仓库
+    rewardsDetailRepository = ref.read(rewardsDetailRepositoryProvider);
+    // 初始化状态
+    RewardsDetailState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsDetailRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_detail_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsDetailVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsDetailVm].
+@ProviderFor(RewardsDetailVm)
+final rewardsDetailVmProvider =
+    AutoDisposeNotifierProvider<RewardsDetailVm, RewardsDetailState>.internal(
+  RewardsDetailVm.new,
+  name: r'rewardsDetailVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsDetailVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsDetailVm = AutoDisposeNotifier<RewardsDetailState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 130 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_page.dart

@@ -0,0 +1,130 @@
+import 'package:cpt_rewards/modules/rewards_code/rewards_code_page.dart';
+import 'package:cpt_rewards/modules/rewards_redeem/rewards_redeem_page.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_history_earned_vm.dart';
+
+@RoutePage()
+class RewardsHistoryEarnedPage extends HookConsumerWidget {
+  const RewardsHistoryEarnedPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsHistoryEarnedPageRoute());
+    } else {
+      appRouter.push(const RewardsHistoryEarnedPageRoute());
+    }
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      padding: const EdgeInsets.only(top: 15, bottom: 15, left: 18, right: 18),
+      decoration: BoxDecoration(
+          border: Border(
+              bottom: BorderSide(
+        width: 1.0, // 底边边框的宽度
+        color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+      ))),
+      child: Row(
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+        children: [
+          Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              Text(
+                'Daily Login',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: ColorUtils.string2Color('#000000'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ).marginOnly(bottom: 6),
+              Text(
+                '14 Oct 2024  10:00PM',
+                style: TextStyle(
+                    fontSize: 13.0,
+                    color: ColorUtils.string2Color('#808DAF'),
+                    fontWeight: FontWeight.w400), // 设置字体大小
+              ),
+            ],
+          ),
+          Text(
+            '+2',
+            style: TextStyle(
+                fontSize: 20.0,
+                color: ColorUtils.string2Color('#FDB429'),
+                fontWeight: FontWeight.w500), // 设置字体大小
+          ),
+        ],
+      ),
+    );
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return Container(
+        decoration: BoxDecoration(
+          color: Colors.white,
+          borderRadius: BorderRadius.circular(10),
+          boxShadow: const [
+            BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          ],
+        ),
+        child:
+            // Column(
+            //     crossAxisAlignment: CrossAxisAlignment.center,
+            //     mainAxisAlignment: MainAxisAlignment.center,
+            //     children: [
+            ListView.builder(
+          itemCount: itemsList.length,
+          itemBuilder: (context, index) {
+            return _buildSaleItem(context, ref, itemsList[index], _vm);
+          },
+        )
+        // ])
+        );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsHistoryEarnedVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("资产")),
+      body: Container(
+        color: ColorUtils.string2Color('#F2F3F6'),
+        padding: const EdgeInsets.only(top: 15, left: 15, right: 15),
+        child: EasyRefresh(
+          // 上拉加载
+          onLoad: () async {
+            Log.d("----onLoad");
+            _vm.onLoadData();
+          },
+          // 下拉刷新
+          onRefresh: () async {
+            Log.d("----onRefresh");
+            _vm.refreshListData();
+          },
+          child: Container(
+              // color: ColorUtils.string2Color('#F2F3F6'),
+              // padding: const EdgeInsets.only(top: 15, left: 15, right: 15),
+              child: _buildSaleList(context, ref, _vm)),
+        ),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_history_earned_state.dart';
+part 'rewards_history_earned_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsHistoryEarnedRepository rewardsHistoryEarnedRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsHistoryEarnedRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsHistoryEarnedRepository {
+  DioEngine dioEngine;
+
+  RewardsHistoryEarnedRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsHistoryEarnedState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsHistoryEarnedState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_history_earned_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHistoryEarnedRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsHistoryEarnedRepository].
+@ProviderFor(rewardsHistoryEarnedRepository)
+final rewardsHistoryEarnedRepositoryProvider = Provider<RewardsHistoryEarnedRepository>.internal(
+  rewardsHistoryEarnedRepository,
+  name: r'rewardsHistoryEarnedRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsHistoryEarnedRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsHistoryEarnedRepositoryRef = ProviderRef<RewardsHistoryEarnedRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsHistoryEarnedState rewardsHistoryEarnedStateFromJson(String str) => RewardsHistoryEarnedState.fromJson(json.decode(str));
+
+String rewardsHistoryEarnedStateToJson(RewardsHistoryEarnedState data) => json.encode(data.toJson());
+
+class RewardsHistoryEarnedState {
+  RewardsHistoryEarnedState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsHistoryEarnedState.fromJson(Map<dynamic, dynamic> json) => RewardsHistoryEarnedState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsHistoryEarnedState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsHistoryEarnedState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 105 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_vm.dart

@@ -0,0 +1,105 @@
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import './rewards_history_earned_state.dart';
+import './rewards_history_earned_repository.dart';
+part 'rewards_history_earned_vm.g.dart';
+
+@riverpod
+class RewardsHistoryEarnedVm extends _$RewardsHistoryEarnedVm {
+  late RewardsHistoryEarnedRepository rewardsHistoryEarnedRepository;
+  RewardsHistoryEarnedState initState() {
+    return RewardsHistoryEarnedState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsHistoryEarnedState build() {
+    // 引入数据仓库
+    rewardsHistoryEarnedRepository = ref.read(rewardsHistoryEarnedRepositoryProvider);
+    // 初始化状态
+    RewardsHistoryEarnedState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsHistoryEarnedRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_earned/rewards_history_earned_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_history_earned_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHistoryEarnedVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsHistoryEarnedVm].
+@ProviderFor(RewardsHistoryEarnedVm)
+final rewardsHistoryEarnedVmProvider =
+    AutoDisposeNotifierProvider<RewardsHistoryEarnedVm, RewardsHistoryEarnedState>.internal(
+  RewardsHistoryEarnedVm.new,
+  name: r'rewardsHistoryEarnedVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsHistoryEarnedVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsHistoryEarnedVm = AutoDisposeNotifier<RewardsHistoryEarnedState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 124 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_page.dart

@@ -0,0 +1,124 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+// ignore: depend_on_referenced_packages
+import 'package:auto_route/auto_route.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_load_image.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/my_appbar.dart';
+
+import '../../router/page/rewards_page_router.dart';
+import './rewards_history_vm.dart';
+
+@RoutePage()
+class RewardsHistoryPage extends HookConsumerWidget {
+  const RewardsHistoryPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsHistoryPageRoute());
+    } else {
+      appRouter.push(const RewardsHistoryPageRoute());
+    }
+  }
+
+  // 顶部tab 切换
+  Widget _buildTopSection(
+      BuildContext context, WidgetRef ref, _vm, tabsRouter) {
+    final topSectionsData = _vm.topSectionsData;
+    final currentTabIdx = tabsRouter.activeIndex;
+    return Container(
+      color: ColorUtils.string2Color('#F2F3F6'),
+      child: Center(
+        child: Row(
+          mainAxisAlignment: MainAxisAlignment.center,
+          crossAxisAlignment: CrossAxisAlignment.center,
+          children: List.generate(topSectionsData.length, (index) {
+            final item = topSectionsData[index];
+            return Container(
+              width:
+                  MediaQuery.of(context).size.width / topSectionsData.length -
+                      45,
+              height: 43,
+              padding: const EdgeInsets.only(
+                  top: 10, bottom: 10, left: 10, right: 10),
+              decoration: index == currentTabIdx
+                  ? BoxDecoration(
+                      color: index == currentTabIdx
+                          ? context.appColors.btnBgDefault
+                          : ColorUtils.string2Color("#F2F3F6"),
+                      borderRadius: BorderRadius.circular(20),
+                      boxShadow: [
+                        BoxShadow(
+                          color: Colors.grey.withOpacity(0.5),
+                          spreadRadius: 1,
+                          blurRadius: 5,
+                          offset:
+                              const Offset(0, 2), // changes position of shadow
+                        ),
+                      ],
+                    )
+                  : null,
+              child: Row(
+                children: [
+                  Expanded(
+                    child: Container(
+                      alignment: Alignment.center,
+                      child: MyTextView(
+                        item['title'],
+                        fontSize: 16,
+                        textAlign: TextAlign.center,
+                        isFontMedium: true,
+                        textColor: index == currentTabIdx
+                            ? Colors.white
+                            : ColorUtils.string2Color("#000000"),
+                      ),
+                    ).onTap(
+                      () {
+                        tabsRouter.setActiveIndex(index);
+                      },
+                      type: ClickType.throttle,
+                    ),
+                  ),
+                ],
+              ),
+            ).marginOnly(left: 20, right: 0, top: 15, bottom: 5);
+          }),
+        ),
+      ),
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsHistoryVmProvider.notifier);
+    return Scaffold(
+        appBar: MyAppBar.appBar(
+          context,
+          "Points History",
+          backgroundColor: context.appColors.whiteBG,
+        ),
+        body: AutoTabsRouter.pageView(
+          routes: const [
+            RewardsHistoryEarnedPageRoute(),
+            RewardsHistorySpentPageRoute(),
+          ],
+          builder: (context, child, pageController) {
+            final tabsRouter = AutoTabsRouter.of(context);
+            return Column(
+              children: [
+                _buildTopSection(context, ref, _vm, tabsRouter),
+                Expanded(
+                  child: child,
+                ),
+              ],
+            );
+          },
+        ));
+  }
+}

+ 129 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_page.dart

@@ -0,0 +1,129 @@
+import 'package:cpt_rewards/modules/rewards_transaction/rewards_transaction_page.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_history_spent_vm.dart';
+
+@RoutePage()
+class RewardsHistorySpentPage extends HookConsumerWidget {
+  const RewardsHistorySpentPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsHistorySpentPageRoute());
+    } else {
+      appRouter.push(const RewardsHistorySpentPageRoute());
+    }
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      padding: const EdgeInsets.only(top: 15, bottom: 15, left: 18, right: 18),
+      decoration: BoxDecoration(
+          border: Border(
+              bottom: BorderSide(
+        width: 1.0, // 底边边框的宽度
+        color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+      ))),
+      child: Row(
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+        children: [
+          Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              Text(
+                'Daily Login',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: ColorUtils.string2Color('#000000'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ).marginOnly(bottom: 6),
+              Text(
+                '14 Oct 2024  10:00PM',
+                style: TextStyle(
+                    fontSize: 13.0,
+                    color: ColorUtils.string2Color('#808DAF'),
+                    fontWeight: FontWeight.w400), // 设置字体大小
+              ),
+            ],
+          ),
+          Text(
+            '-4.500',
+            style: TextStyle(
+                fontSize: 20.0,
+                color: ColorUtils.string2Color('#4161D0'),
+                fontWeight: FontWeight.w500), // 设置字体大小
+          ),
+        ],
+      ),
+    );
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return Container(
+        decoration: BoxDecoration(
+          color: Colors.white,
+          borderRadius: BorderRadius.circular(10),
+          boxShadow: const [
+            BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          ],
+        ),
+        child:
+            // Column(
+            //     crossAxisAlignment: CrossAxisAlignment.center,
+            //     mainAxisAlignment: MainAxisAlignment.center,
+            //     children: [
+            ListView.builder(
+          itemCount: itemsList.length,
+          itemBuilder: (context, index) {
+            return _buildSaleItem(context, ref, itemsList[index], _vm);
+          },
+        )
+        // ])
+        );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsHistorySpentVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("资产")),
+      body: Container(
+        color: ColorUtils.string2Color('#F2F3F6'),
+        padding: const EdgeInsets.only(top: 15, left: 15, right: 15),
+        child: EasyRefresh(
+          // 上拉加载
+          onLoad: () async {
+            Log.d("----onLoad");
+            _vm.onLoadData();
+          },
+          // 下拉刷新
+          onRefresh: () async {
+            Log.d("----onRefresh");
+            _vm.refreshListData();
+          },
+          child: Container(
+              // color: ColorUtils.string2Color('#F2F3F6'),
+              // padding: const EdgeInsets.only(top: 15, left: 15, right: 15),
+              child: _buildSaleList(context, ref, _vm)),
+        ),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_history_spent_state.dart';
+part 'rewards_history_spent_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsHistorySpentRepository rewardsHistorySpentRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsHistorySpentRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsHistorySpentRepository {
+  DioEngine dioEngine;
+
+  RewardsHistorySpentRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsHistorySpentState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsHistorySpentState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_history_spent_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHistorySpentRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsHistorySpentRepository].
+@ProviderFor(rewardsHistorySpentRepository)
+final rewardsHistorySpentRepositoryProvider = Provider<RewardsHistorySpentRepository>.internal(
+  rewardsHistorySpentRepository,
+  name: r'rewardsHistorySpentRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsHistorySpentRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsHistorySpentRepositoryRef = ProviderRef<RewardsHistorySpentRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsHistorySpentState rewardsHistorySpentStateFromJson(String str) => RewardsHistorySpentState.fromJson(json.decode(str));
+
+String rewardsHistorySpentStateToJson(RewardsHistorySpentState data) => json.encode(data.toJson());
+
+class RewardsHistorySpentState {
+  RewardsHistorySpentState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsHistorySpentState.fromJson(Map<dynamic, dynamic> json) => RewardsHistorySpentState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsHistorySpentState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsHistorySpentState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 105 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_vm.dart

@@ -0,0 +1,105 @@
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import './rewards_history_spent_state.dart';
+import './rewards_history_spent_repository.dart';
+part 'rewards_history_spent_vm.g.dart';
+
+@riverpod
+class RewardsHistorySpentVm extends _$RewardsHistorySpentVm {
+  late RewardsHistorySpentRepository rewardsHistorySpentRepository;
+  RewardsHistorySpentState initState() {
+    return RewardsHistorySpentState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsHistorySpentState build() {
+    // 引入数据仓库
+    rewardsHistorySpentRepository = ref.read(rewardsHistorySpentRepositoryProvider);
+    // 初始化状态
+    RewardsHistorySpentState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsHistorySpentRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_spent/rewards_history_spent_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_history_spent_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHistorySpentVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsHistorySpentVm].
+@ProviderFor(RewardsHistorySpentVm)
+final rewardsHistorySpentVmProvider =
+    AutoDisposeNotifierProvider<RewardsHistorySpentVm, RewardsHistorySpentState>.internal(
+  RewardsHistorySpentVm.new,
+  name: r'rewardsHistorySpentVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsHistorySpentVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsHistorySpentVm = AutoDisposeNotifier<RewardsHistorySpentState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 86 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_vm.dart

@@ -0,0 +1,86 @@
+
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+
+import './rewards_history_earned/rewards_history_earned_page.dart';
+import './rewards_history_spent/rewards_history_spent_page.dart';
+
+part 'rewards_history_vm.g.dart';
+
+
+class RewardsHistoryVmState {
+  List<Map<String, dynamic>>? topSectionsData;
+  int? curIdx;
+
+  RewardsHistoryVmState({
+    List<Map<String, dynamic>>? topSectionsData,
+    this.curIdx = 0,
+  }) : topSectionsData = topSectionsData?? [
+    {
+      "title": "Earned Points",
+      "icon": Assets.propertyIoan,
+      "pageStartInstanceFn": RewardsHistoryEarnedPage.startInstance,
+      "page": const RewardsHistoryEarnedPage(),
+    },
+    {
+      "title": "Spent Points",
+      "icon": Assets.propertyNews,
+      "pageStartInstanceFn": RewardsHistorySpentPage.startInstance,
+      "page": const RewardsHistorySpentPage(),
+    },
+  ];
+
+  RewardsHistoryVmState copyWith({
+    List<Map<String, dynamic>>? topSectionsData,
+    int? curIdx = 0,
+  }) {
+    return RewardsHistoryVmState(
+      topSectionsData: topSectionsData ?? this.topSectionsData,
+      curIdx: curIdx ?? 0,
+    );
+  }
+}
+
+@riverpod
+class RewardsHistoryVm extends _$RewardsHistoryVm {
+  get topSectionsData => state.topSectionsData;
+
+  RewardsHistoryVmState initState() {
+    return RewardsHistoryVmState();
+  }
+
+  @override
+  RewardsHistoryVmState build(){
+    final state = initState();
+    Log.d("--------------------------build---------------------");
+
+    // 初始时导航到子路由
+    WidgetsBinding.instance.addPostFrameCallback((_) {
+    });
+
+    return state;
+  }
+
+  // 页面切换
+  switchPage(int index,BuildContext? context, [bool? isFirstInitSwitch] ){
+    if(state.curIdx != index){
+      state = state.copyWith(curIdx: index);
+      final List<Map<String, dynamic>>? topSectionsData = state.topSectionsData;
+      // Log.d("当前页面${topSectionsData?[index]['pageStartInstanceFn']}");
+      final pageStartInstanceFn = topSectionsData?[index]['pageStartInstanceFn'] as Function({BuildContext? context});
+      pageStartInstanceFn(context:context);
+    }else {
+      if(isFirstInitSwitch??false){
+        final List<Map<String, dynamic>>? topSectionsData = state.topSectionsData;
+        // Log.d("当前页面${topSectionsData?[index]['pageStartInstanceFn']}");
+        final pageStartInstanceFn = topSectionsData?[index]['pageStartInstanceFn'] as Function({BuildContext? context});
+        pageStartInstanceFn(context:context);
+      }
+    }
+  }
+
+}
+

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_history_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHistoryVmHash() => r'9b08b5e83d2b45f67b653daf60bb66bacb9c47ed';
+
+/// See also [RewardsHistoryVm].
+@ProviderFor(RewardsHistoryVm)
+final rewardsHistoryVmProvider =
+    AutoDisposeNotifierProvider<RewardsHistoryVm, RewardsHistoryVmState>.internal(
+  RewardsHistoryVm.new,
+  name: r'rewardsHistoryVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsHistoryVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsHistoryVm = AutoDisposeNotifier<RewardsHistoryVmState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 500 - 0
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_page.dart

@@ -0,0 +1,500 @@
+import 'package:cpt_rewards/modules/rewards_address/rewards_address_page.dart';
+import 'package:cpt_rewards/modules/rewards_code/rewards_code_page.dart';
+import 'package:cpt_rewards/modules/rewards_detail/rewards_detail_page.dart';
+import 'package:cpt_rewards/modules/rewards_list/rewards_list_page.dart';
+import 'package:cpt_rewards/modules/rewards_my/rewards_my_page.dart';
+import 'package:cpt_rewards/modules/rewards_search/rewards_search_page.dart';
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_platform/engine/image/image_nine_grid.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_home_vm.dart';
+
+@RoutePage()
+class RewardsHomePage extends HookConsumerWidget {
+  const RewardsHomePage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsHomePageRoute());
+    } else {
+      appRouter.push(const RewardsHomePageRoute());
+    }
+  }
+
+  Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
+    // List itemsList = _vm.state.list.toList();
+    return Container(
+        decoration: BoxDecoration(
+          border: Border(
+              bottom: BorderSide(
+            color: ColorUtils.string2Color('#4161D0'), // 设置bottom边框的颜色
+            width: 45.0, // 设置bottom边框的宽度
+          )),
+          borderRadius: const BorderRadius.only(
+            topLeft: Radius.circular(0.0),
+            topRight: Radius.circular(0.0),
+            bottomLeft: Radius.circular(30.0),
+            bottomRight: Radius.circular(30.0),
+          ), // 圆角
+        ),
+        child: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const MyAssetImage(
+              Assets.rewardsRewardsBack,
+              width: 44,
+              height: 44,
+            ),
+            const Text(
+              '1526 Available Points',
+              style: TextStyle(
+                  fontSize: 18.0,
+                  color: Colors.white,
+                  fontWeight: FontWeight.w500), // 设置字体大小
+            ).paddingOnly(left: 10, top: 20, bottom: 18),
+            Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Container(
+                  decoration: BoxDecoration(
+                    border: Border.all(color: Colors.white, width: 1), // 边框
+                    borderRadius: BorderRadius.circular(8), // 圆角
+                  ),
+                  child: const Text(
+                    'My Rewards',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: Colors.white,
+                        fontWeight: FontWeight.w400), // 设置字体大小
+                  )
+                      .paddingOnly(left: 10, top: 7, bottom: 7, right: 10)
+                      .onTap(() {
+                    RewardsMyPage.startInstance();
+                  }),
+                ),
+                Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    const MyAssetImage(
+                      Assets.rewardsRewardsY,
+                      width: 26,
+                      height: 26,
+                    ),
+                    Text(
+                      'Bronze',
+                      style: TextStyle(
+                          fontSize: 17.0,
+                          color: ColorUtils.string2Color('#FFCC00'),
+                          fontWeight: FontWeight.w500), // 设置字体大小
+                    ).marginOnly(
+                      left: 9,
+                      right: 7,
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsRight,
+                      width: 7,
+                      height: 12,
+                    ),
+                  ],
+                )
+              ],
+            ).paddingOnly(left: 10)
+          ],
+        )
+            .paddingOnly(top: 15, left: 5, right: 15, bottom: 0)
+            .border(bottom: 0, color: ColorUtils.string2Color('#4161D0'))
+            .backgroundColor(ColorUtils.string2Color('#4161D0')));
+  }
+
+  Widget _buildSearch(BuildContext context, WidgetRef ref, _vm) {
+    // List itemsList = _vm.state.list.toList();
+    return Container(
+      height: 50,
+      decoration: BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.circular(10),
+      ),
+      child: Row(
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+        children: [
+          Text(
+            'Search',
+            style: TextStyle(
+                fontSize: 15.0,
+                color: ColorUtils.string2Color('#C7CDE3'),
+                fontWeight: FontWeight.w500), // 设置字体大小
+          ),
+          const MyAssetImage(
+            Assets.rewardsRewardsIndexSearch,
+            width: 21,
+            height: 21,
+          ),
+        ],
+      ).paddingOnly(left: 15, right: 15),
+    ).onTap(() {
+      RewardsSearchPage.startInstance();
+    });
+  }
+
+  Widget _buildSwiper(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.lists.toList();
+    return Container(
+      transform: Matrix4.translationValues(0.0, -10.0, 0.0),
+      // color: Colors.white,
+      height: 110,
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: const BorderRadius.only(
+          topLeft: Radius.circular(10.0),
+          topRight: Radius.circular(0.0),
+          bottomLeft: Radius.circular(10.0),
+          bottomRight: Radius.circular(0.0),
+        ),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: ClipRect(
+          child: SingleChildScrollView(
+        scrollDirection: Axis.horizontal,
+        physics: const BouncingScrollPhysics(),
+        clipBehavior: Clip.none,
+        child: Row(
+          crossAxisAlignment: CrossAxisAlignment.center,
+          mainAxisAlignment: MainAxisAlignment.center,
+          children: List.generate(itemsList.length, (index) {
+            final item = itemsList[index];
+            return Column(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: [
+                MyAssetImage(
+                  item['icon'],
+                  width: 70,
+                  height: 70,
+                ),
+                Text(
+                  item['title']!,
+                  style: TextStyle(
+                      fontSize: 14.0,
+                      color: ColorUtils.string2Color('#000001'),
+                      fontWeight: FontWeight.w600), // 设置字体大小
+                ),
+              ],
+            ).marginOnly(right: 5).onTap(() {
+              RewardsListPage.startInstance();
+            });
+          }),
+        ).marginOnly(left: 15, right: 15),
+      )),
+    ).paddingOnly(left: 15);
+  }
+
+  Widget _buildRecommend(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      child: Column(
+        children: [
+          Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              Text(
+                'Recommend',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#000001'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ),
+              Text(
+                'See All',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#4161D0'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ).onTap(() {
+                RewardsListPage.startInstance();
+              }),
+            ],
+          ).marginOnly(bottom: 15),
+          Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: List.generate(2, (index) {
+                double hg = 70;
+                return Container(
+                    width: MediaQuery.of(context).size.width / 2 - 25,
+                    height: 185,
+                    decoration: const BoxDecoration(
+                      color: Colors.white,
+                      borderRadius: BorderRadius.all(Radius.circular(6.0)),
+                      boxShadow: [
+                        BoxShadow(
+                            color: Color.fromRGBO(184, 191, 217, 0.3),
+                            blurRadius: 6)
+                      ],
+                    ),
+                    child: _buildItem(context, ref, _vm, hg));
+              }))
+        ],
+      ),
+    ).paddingOnly(left: 15, right: 15, top: 10);
+  }
+
+  Widget _buildHottest(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      child: Column(
+        children: [
+          Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              Text(
+                'Hottest',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#000001'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ),
+              Text(
+                'See All',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#4161D0'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ).onTap(() {
+                RewardsListPage.startInstance();
+              }),
+            ],
+          ).marginOnly(bottom: 15),
+          Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: List.generate(2, (index) {
+                double hg = 70;
+                return Container(
+                    width: MediaQuery.of(context).size.width / 2 - 25,
+                    height: 185,
+                    decoration: const BoxDecoration(
+                      color: Colors.white,
+                      borderRadius: BorderRadius.all(Radius.circular(6.0)),
+                      boxShadow: [
+                        BoxShadow(
+                            color: Color.fromRGBO(184, 191, 217, 0.3),
+                            blurRadius: 6)
+                      ],
+                    ),
+                    child: _buildItem(context, ref, _vm, hg));
+              }))
+        ],
+      ),
+    ).paddingOnly(left: 15, right: 15, top: 10);
+  }
+
+  Widget _buildItem(BuildContext context, WidgetRef ref, _vm, height) {
+    double hg = height;
+    return Column(
+      children: [
+        MyAssetImage(
+          Assets.rewardsRewardsIndex1,
+          // width: 110,
+          height: hg,
+        ),
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const Text(
+              maxLines: 2, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Cute children multifunctional ……',
+              style: TextStyle(
+                  fontSize: 15.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w500),
+            ),
+            Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Hong Ye Group Co., Ltd',
+              style: TextStyle(
+                  fontSize: 13.0,
+                  color: ColorUtils.string2Color('#808DAF'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(bottom: 5),
+            Row(
+              children: [
+                const Text(
+                  '300',
+                  style: TextStyle(
+                      fontSize: 18.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w500),
+                ),
+                Text(
+                  '350',
+                  style: TextStyle(
+                      decoration: TextDecoration.lineThrough,
+                      decorationColor: ColorUtils.string2Color('#808DAF'),
+                      decorationStyle: TextDecorationStyle.solid,
+                      fontSize: 13.0,
+                      color: ColorUtils.string2Color('#808DAF'),
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 5, right: 5),
+                const Text(
+                  'Points',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ),
+              ],
+            )
+          ],
+        ).paddingOnly(top: 12, left: 12, right: 12)
+      ],
+    ).onTap(() {
+      RewardsDetailPage.startInstance();
+    });
+  }
+
+  Widget _buildFood(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      child: Column(
+        children: [
+          Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              Text(
+                'Food & Beverage',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#000001'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ),
+              Text(
+                'See All',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#4161D0'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ).onTap(() {
+                RewardsListPage.startInstance();
+              }),
+            ],
+          ).marginOnly(bottom: 15),
+          Row(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: List.generate(2, (index) {
+                double hg = 70;
+                return Container(
+                    width: MediaQuery.of(context).size.width / 2 - 25,
+                    height: 185,
+                    decoration: const BoxDecoration(
+                      color: Colors.white,
+                      borderRadius: BorderRadius.all(Radius.circular(6.0)),
+                      boxShadow: [
+                        BoxShadow(
+                            color: Color.fromRGBO(184, 191, 217, 0.3),
+                            blurRadius: 6)
+                      ],
+                    ),
+                    child: _buildItem(context, ref, _vm, hg));
+              }))
+        ],
+      ),
+    ).paddingOnly(left: 15, right: 15, top: 10);
+  }
+
+  Widget _buildBest(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      child: Column(
+        children: [
+          Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              Text(
+                'Best Offers in Singapore',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#000001'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ),
+              Text(
+                'See All',
+                style: TextStyle(
+                    fontSize: 17.0,
+                    color: ColorUtils.string2Color('#4161D0'),
+                    fontWeight: FontWeight.w500), // 设置字体大小
+              ),
+            ],
+          ).marginOnly(bottom: 15),
+          Column(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: List.generate(2, (index) {
+                double hg = 140;
+                return Container(
+                        // width: MediaQuery.of(context).size.width / 2 - 25,
+                        height: 240,
+                        decoration: const BoxDecoration(
+                          color: Colors.white,
+                          borderRadius: BorderRadius.all(Radius.circular(6.0)),
+                          boxShadow: [
+                            BoxShadow(
+                                color: Color.fromRGBO(184, 191, 217, 0.3),
+                                blurRadius: 6)
+                          ],
+                        ),
+                        child: _buildItem(context, ref, _vm, hg))
+                    .marginOnly(bottom: 13);
+              }))
+        ],
+      ),
+    ).paddingOnly(left: 15, right: 15, top: 10);
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("奖励")),
+      body: Column(children: [
+        Expanded(
+          child: SingleChildScrollView(
+              scrollDirection: Axis.vertical,
+              physics: const BouncingScrollPhysics(),
+              clipBehavior: Clip.none,
+              child: Column(
+                children: [
+                  _buildTop(context, ref, _vm),
+                  Container(
+                    transform: Matrix4.translationValues(0.0, -25.0, 0.0),
+                    child: _buildSearch(context, ref, _vm), // 使用负数margin
+                  ).paddingOnly(left: 15, right: 15),
+                  _buildSwiper(context, ref, _vm),
+                  _buildRecommend(context, ref, _vm).marginOnly(bottom: 15),
+                  _buildHottest(context, ref, _vm).marginOnly(bottom: 15),
+                  _buildFood(context, ref, _vm).marginOnly(bottom: 15),
+                  _buildBest(context, ref, _vm).marginOnly(bottom: 15),
+                ],
+              )),
+        ),
+      ]).backgroundColor(ColorUtils.string2Color('#F2F3F6')),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_home_state.dart';
+part 'rewards_home_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsHomeRepository rewardsHomeRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsHomeRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsHomeRepository {
+  DioEngine dioEngine;
+
+  RewardsHomeRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsHomeState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsHomeState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_home_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHomeRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsHomeRepository].
+@ProviderFor(rewardsHomeRepository)
+final rewardsHomeRepositoryProvider = Provider<RewardsHomeRepository>.internal(
+  rewardsHomeRepository,
+  name: r'rewardsHomeRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsHomeRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsHomeRepositoryRef = ProviderRef<RewardsHomeRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 57 - 0
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_state.dart

@@ -0,0 +1,57 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsHomeState rewardsHomeStateFromJson(String str) =>
+    RewardsHomeState.fromJson(json.decode(str));
+
+String rewardsHomeStateToJson(RewardsHomeState data) =>
+    json.encode(data.toJson());
+
+class RewardsHomeState {
+  RewardsHomeState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+    required this.lists,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+  List<Map<String, dynamic>> lists;
+
+  factory RewardsHomeState.fromJson(Map<dynamic, dynamic> json) =>
+      RewardsHomeState(
+        curPage: json["curPage"],
+        pageSize: json["pageSize"],
+        list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+        filterCount: json["filterCount"],
+        lists: List<Map<String, dynamic>>.from(json["lists"].map((x) => x)),
+      );
+
+  Map<dynamic, dynamic> toJson() => {
+        "curPage": curPage,
+        "pageSize": pageSize,
+        "list": List<dynamic>.from(list.map((x) => x)),
+        "filterCount": filterCount,
+        "lists": List<dynamic>.from(lists.map((x) => x)),
+      };
+  RewardsHomeState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+    List<Map<String, dynamic>>? lists,
+  }) {
+    return RewardsHomeState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+      lists: list ?? this.lists,
+    );
+  }
+}

+ 122 - 0
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_vm.dart

@@ -0,0 +1,122 @@
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_home_state.dart';
+import './rewards_home_repository.dart';
+part 'rewards_home_vm.g.dart';
+
+@riverpod
+class RewardsHomeVm extends _$RewardsHomeVm {
+  late RewardsHomeRepository rewardsHomeRepository;
+  RewardsHomeState initState() {
+    return RewardsHomeState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+      lists: [
+        {'title': 'YY', 'icon': Assets.rewardsRewardsIndex1},
+        {'title': 'F&B', 'icon': Assets.rewardsRewardsIndex2},
+        {'title': 'F&B', 'icon': Assets.rewardsRewardsIndex3},
+        {'title': 'Beauty', 'icon': Assets.rewardsRewardsIndex4},
+        {'title': 'Activites', 'icon': Assets.rewardsRewardsIndex5},
+        {'title': 'Travel', 'icon': Assets.rewardsRewardsIndex6},
+        {'title': 'Electronics', 'icon': Assets.rewardsRewardsIndex7},
+        {'title': 'Gifts', 'icon': Assets.rewardsRewardsIndex8},
+        {'title': 'Services', 'icon': Assets.rewardsRewardsIndex9},
+      ],
+    );
+  }
+
+  @override
+  RewardsHomeState build() {
+    // 初始化列表数据
+    // 初始化列表数据
+    // 引入数据仓库
+    Log.d("----property_news_vm-----initPageData");
+    rewardsHomeRepository = ref.read(rewardsHomeRepositoryProvider);
+    // 初始化状态
+    RewardsHomeState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount)Home{
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsHomeRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_home_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsHomeVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsHomeVm].
+@ProviderFor(RewardsHomeVm)
+final rewardsVmProvider =
+    AutoDisposeNotifierProvider<RewardsHomeVm, RewardsHomeState>.internal(
+  RewardsHomeVm.new,
+  name: r'rewardsHomeVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsHomeVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsHomeVm = AutoDisposeNotifier<RewardsHomeState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 212 - 0
packages/cpt_rewards/lib/modules/rewards_list/dialog/reward_listfilter_all_dialog.dart

@@ -0,0 +1,212 @@
+import 'package:cpt_rewards/modules/rewards_successful/rewards_successful_page.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:hooks_riverpod/hooks_riverpod.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+import '../rewards_list_vm.dart';
+
+class RewardsListfilterAllDialo extends HookConsumerWidget {
+  VoidCallback confirmAction;
+
+  RewardsListfilterAllDialo({
+    required this.confirmAction,
+  });
+
+  Widget CheckboxList(BuildContext context) {
+    return Column(
+      children: [
+        Column(
+          children: [
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+          ],
+        ).paddingOnly(left: 15, right: 15),
+      ],
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsListVmProvider.notifier);
+    final state = ref.watch(rewardsListVmProvider);
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        Container(
+          transform: Matrix4.translationValues(0.0, 160.0, 0.0),
+          width: double.infinity,
+          padding: const EdgeInsets.only(top: 22),
+          decoration: BoxDecoration(
+            color: context.appColors.whiteSecondBG,
+            boxShadow: const [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          child: Column(
+            children: [
+              Container(child: CheckboxList(context)),
+              Row(
+                children: [
+                  const SizedBox(width: 18),
+                  Expanded(
+                      flex: 1,
+                      child: InkWell(
+                        onTap: () async {
+                          onCancel();
+                          RewardsSuccessfulPage.startInstance();
+                          // confirmAction();
+                        },
+                        child: MyTextView(
+                          'Apply',
+                          fontSize: 16,
+                          paddingTop: 13,
+                          paddingBottom: 13,
+                          isFontMedium: true,
+                          textAlign: TextAlign.center,
+                          textColor: Colors.white,
+                          backgroundColor: context.appColors.btnBgDefault,
+                          cornerRadius: 7,
+                        ),
+                      )),
+                  const SizedBox(width: 18),
+                ],
+              ).marginOnly(bottom: 30, top: 28),
+            ],
+          ),
+        ),
+      ],
+    );
+  }
+
+//取消弹框
+  void onCancel() async {
+    SmartDialog.dismiss();
+  }
+}

+ 338 - 0
packages/cpt_rewards/lib/modules/rewards_list/dialog/reward_listfilter_dialog.dart

@@ -0,0 +1,338 @@
+import 'package:cpt_rewards/modules/rewards_successful/rewards_successful_page.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:hooks_riverpod/hooks_riverpod.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+import '../rewards_list_vm.dart';
+
+class RewardsListfilterDialo extends HookConsumerWidget {
+  VoidCallback confirmAction;
+
+  RewardsListfilterDialo({
+    required this.confirmAction,
+  });
+
+  Widget CheckboxList(BuildContext context) {
+    var _rangeValues = RangeValues(20.0, 80.0);
+    var isSelected = false;
+    return Column(
+      children: [
+        Container(
+          height: 40,
+          color: ColorUtils.string2Color('#F1F1F1'),
+          child: Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.start,
+            children: [
+              Text(
+                textAlign: TextAlign.center,
+                'Sort by',
+                style: TextStyle(
+                    fontSize: 16.0,
+                    color: ColorUtils.string2Color('#767676'),
+                    fontWeight: FontWeight.w500),
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15),
+        ),
+        Column(
+          children: [
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        const MyAssetImage(
+                          Assets.rewardsRewardsIconDomn,
+                          width: 13,
+                          height: 16,
+                        ).marginOnly(right: 15),
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        const MyAssetImage(
+                          Assets.rewardsRewardsIconDomn,
+                          width: 13,
+                          height: 16,
+                        ).marginOnly(right: 15),
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        const MyAssetImage(
+                          Assets.rewardsRewardsIconDomn,
+                          width: 13,
+                          height: 16,
+                        ).marginOnly(right: 15),
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+            Container(
+                height: 45,
+                decoration: BoxDecoration(
+                    border: Border(
+                        bottom: BorderSide(
+                  width: 1.0, // 底边边框的宽度
+                  color: ColorUtils.string2Color('#F2F3F6'), // 底边边框的颜色
+                ))),
+                child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Row(
+                      children: [
+                        const MyAssetImage(
+                          Assets.rewardsRewardsIconDomn,
+                          width: 13,
+                          height: 16,
+                        ).marginOnly(right: 15),
+                        Text(
+                          'Latest',
+                          style: TextStyle(
+                              fontSize: 16.0,
+                              color: ColorUtils.string2Color('#000000'),
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                    const MyAssetImage(
+                      Assets.rewardsRewardsIconDomn,
+                      width: 17,
+                      height: 17,
+                    )
+                  ],
+                )),
+          ],
+        ).paddingOnly(left: 15, right: 15),
+        Container(
+          height: 40,
+          color: ColorUtils.string2Color('#F1F1F1'),
+          child: Row(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.start,
+            children: [
+              Text(
+                textAlign: TextAlign.center,
+                'Filter By',
+                style: TextStyle(
+                    fontSize: 16.0,
+                    color: ColorUtils.string2Color('#767676'),
+                    fontWeight: FontWeight.w500),
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15),
+        ),
+        Row(
+          crossAxisAlignment: CrossAxisAlignment.center,
+          mainAxisAlignment: MainAxisAlignment.start,
+          children: [
+            Text(
+              '0',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: ColorUtils.string2Color('#000000'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(right: 3),
+            Text(
+              'points',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: ColorUtils.string2Color('#000000'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(right: 3),
+            Text(
+              '-',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: ColorUtils.string2Color('#000000'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(right: 3),
+            Text(
+              '1200+',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: ColorUtils.string2Color('#000000'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(right: 3),
+            Text(
+              'points',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: ColorUtils.string2Color('#000000'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(right: 3),
+          ],
+        ).paddingOnly(left: 15, right: 15, top: 20),
+        RangeSlider(
+          values: _rangeValues, // 初始化范围
+          min: 0, // 最小值
+          max: 100, // 最大值
+          onChanged: (RangeValues values) {
+            // 处理范围改变事件
+            _rangeValues = values;
+            print('Selected range: ${values.start} to ${values.end}');
+          },
+        ).marginOnly(top: 5),
+        CheckboxListTile(
+          title: Container(
+            transform: Matrix4.translationValues(-20.0, 0.0, 0.0),
+            child: Text(
+              'Only show rewards I can redeem',
+              style: TextStyle(
+                  fontSize: 14.0,
+                  color: ColorUtils.string2Color('#767676'),
+                  fontWeight: FontWeight.w400),
+            ),
+          ),
+          controlAffinity: ListTileControlAffinity.leading,
+          value: isSelected,
+          onChanged: (value) {
+            isSelected = value!;
+          },
+        )
+      ],
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsListVmProvider.notifier);
+    final state = ref.watch(rewardsListVmProvider);
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        Container(
+          transform: Matrix4.translationValues(0.0, 160.0, 0.0),
+          width: double.infinity,
+          padding: const EdgeInsets.only(top: 22),
+          decoration: BoxDecoration(
+            color: context.appColors.whiteSecondBG,
+            boxShadow: const [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          child: Column(
+            children: [
+              Container(child: CheckboxList(context)),
+              Row(
+                children: [
+                  const SizedBox(width: 18),
+                  Expanded(
+                      flex: 1,
+                      child: InkWell(
+                        onTap: () async {
+                          onCancel();
+                          RewardsSuccessfulPage.startInstance();
+                          // confirmAction();
+                        },
+                        child: MyTextView(
+                          'Apply',
+                          fontSize: 16,
+                          paddingTop: 13,
+                          paddingBottom: 13,
+                          isFontMedium: true,
+                          textAlign: TextAlign.center,
+                          textColor: Colors.white,
+                          backgroundColor: context.appColors.btnBgDefault,
+                          cornerRadius: 7,
+                        ),
+                      )),
+                  const SizedBox(width: 18),
+                ],
+              ).marginOnly(bottom: 30, top: 28),
+            ],
+          ),
+        ),
+      ],
+    );
+  }
+
+//取消弹框
+  void onCancel() async {
+    SmartDialog.dismiss();
+  }
+}

+ 283 - 0
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_page.dart

@@ -0,0 +1,283 @@
+import 'package:cpt_rewards/modules/rewards_detail/rewards_detail_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_list_vm.dart';
+
+@RoutePage()
+class RewardsListPage extends HookConsumerWidget {
+  const RewardsListPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsListPageRoute());
+    } else {
+      appRouter.push(const RewardsListPageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const MyAssetImage(
+              Assets.rewardsRewardsIndex1,
+              // width: 110,
+              height: 150,
+            ),
+            const Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Cute children multifunctional ……',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w500),
+            ),
+            Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Hong Ye Group Co., Ltd',
+              style: TextStyle(
+                  fontSize: 13.0,
+                  color: ColorUtils.string2Color('#808DAF'),
+                  fontWeight: FontWeight.w400),
+            ).marginOnly(bottom: 5),
+            Row(
+              children: [
+                const Text(
+                  '300',
+                  style: TextStyle(
+                      fontSize: 19.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w500),
+                ),
+                Text(
+                  '350',
+                  style: TextStyle(
+                      decoration: TextDecoration.lineThrough,
+                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationStyle: TextDecorationStyle.solid,
+                      fontSize: 12.0,
+                      color: ColorUtils.string2Color('#000000'),
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 5, right: 5),
+                const Text(
+                  'Points',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ),
+              ],
+            ),
+          ],
+        ).onTap(() {
+          RewardsDetailPage.startInstance();
+        }),
+      ],
+    ).paddingOnly(top: 0);
+  }
+
+  Widget _buildItemRightSection(
+      BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      // color: Colors.green,
+      child: Text(
+        item['price'],
+        style: const TextStyle(
+            fontSize: 14.0,
+            color: Colors.black,
+            fontWeight: FontWeight.w400), // 设置字体大小
+      ),
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        children: [
+          SizedBox(
+            width: MediaQuery.of(context).size.width - 30,
+            height: 235,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                _buildItemLeftSection(context, ref, item, _vm)
+                // .marginOnly(bottom: 5),
+                // _buildItemRightSection(context, ref, item, _vm),
+              ],
+            ).paddingOnly(left: 20, right: 20),
+          ).constrained(
+            minHeight: 235,
+          ),
+        ],
+      ),
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return ListView.builder(
+      itemCount: itemsList.length,
+      itemBuilder: (context, index) {
+        return _buildSaleItem(context, ref, itemsList[index], _vm);
+      },
+    );
+  }
+
+  Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
+    final state = ref.watch(rewardsListVmProvider);
+    return Container(
+      height: 55,
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Row(
+        children: [
+          SizedBox(
+              width: MediaQuery.of(context).size.width / 2 - 60,
+              child:
+                  // Column(
+                  //   children: [
+                  //     PickerContainer(
+                  //       content: state.selectedOption ?? "",
+                  //       hint: 'All',
+                  //       bgColor: Colors.white,
+                  //       margin: const EdgeInsets.only(top: 0),
+                  //       onClick: _vm.pickCategory,
+                  //     ),
+                  //   ],
+                  // ),
+                  const Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  Text(
+                    'All',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: Colors.black,
+                        fontWeight: FontWeight.w500), // 设置字体大小
+                  ),
+                  MyAssetImage(
+                    Assets.rewardsRewardsIconDomn,
+                    width: 12,
+                    height: 7,
+                  ),
+                ],
+              ).onTap(() {
+                // 去详情
+                _vm.doDeleteAccountAll(context);
+              })).paddingOnly(left: 15, right: 15),
+          SizedBox(
+              width: MediaQuery.of(context).size.width / 2 - 40,
+              child:
+                  // Column(
+                  //   children: [
+                  //     PickerContainer(
+                  //       content: state.selectedOption ?? "",
+                  //       hint: 'Popularity',
+                  //       bgColor: Colors.white,
+                  //       margin: const EdgeInsets.only(top: 0),
+                  //       onClick: _vm.pickCategory,
+                  //     ),
+                  //   ],
+                  // )
+                  const Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  Text(
+                    'Popularity',
+                    style: const TextStyle(
+                        fontSize: 15.0,
+                        color: Colors.black,
+                        fontWeight: FontWeight.w500), // 设置字体大小
+                  ),
+                  MyAssetImage(
+                    Assets.rewardsRewardsIconDomn,
+                    width: 12,
+                    height: 7,
+                  ),
+                ],
+              ).onTap(() {
+                // 去详情
+                _vm.doDeleteAccount(context);
+              })).paddingOnly(left: 15, right: 15)
+        ],
+      ),
+    )
+        .marginOnly(top: 12, left: 15, right: 15)
+        .backgroundColor(ColorUtils.string2Color('#F2F3F6'));
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsListVmProvider.notifier);
+    final state = ref.watch(rewardsListVmProvider);
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Recommend",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      body: Container(
+        child: Column(
+          children: [
+            _buildTop(context, ref, _vm),
+            Expanded(
+              child: EasyRefresh(
+                // 上拉加载
+                onLoad: () async {
+                  Log.d("----onLoad");
+                  _vm.onLoadData();
+                },
+                // 下拉刷新
+                onRefresh: () async {
+                  Log.d("----onRefresh");
+                  _vm.refreshListData();
+                },
+                child: Container(
+                    color: ColorUtils.string2Color('#F2F3F6'),
+                    padding: const EdgeInsets.only(top: 15),
+                    child: _buildSaleList(context, ref, _vm)),
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_list_state.dart';
+part 'rewards_list_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsListRepository rewardsListRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsListRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsListRepository {
+  DioEngine dioEngine;
+
+  RewardsListRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsListState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsListState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_list_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsListRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsListRepository].
+@ProviderFor(rewardsListRepository)
+final rewardsListRepositoryProvider = Provider<RewardsListRepository>.internal(
+  rewardsListRepository,
+  name: r'rewardsListRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsListRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsListRepositoryRef = ProviderRef<RewardsListRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 55 - 0
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_state.dart

@@ -0,0 +1,55 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsListState rewardsListStateFromJson(String str) => RewardsListState.fromJson(json.decode(str));
+
+String rewardsListStateToJson(RewardsListState data) => json.encode(data.toJson());
+
+class RewardsListState {
+  //类型选项
+  final List<String> optionList = ["条件1", "条件2", "条件3", "条件4"];
+  String? selectedOption;
+  RewardsListState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+    this.selectedOption,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsListState.fromJson(Map<dynamic, dynamic> json) => RewardsListState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsListState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+    String? selectedOption,
+  }) {
+    return RewardsListState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+      selectedOption: selectedOption ?? this.selectedOption,
+    );
+  }
+}

+ 147 - 0
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_vm.dart

@@ -0,0 +1,147 @@
+import 'package:cpt_rewards/modules/rewards_list/dialog/reward_listfilter_all_dialog.dart';
+import 'package:flutter/material.dart';
+import 'package:cpt_rewards/modules/rewards_list/dialog/reward_listfilter_dialog.dart';
+import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_list_state.dart';
+import './rewards_list_repository.dart';
+part 'rewards_list_vm.g.dart';
+
+@riverpod
+class RewardsListVm extends _$RewardsListVm {
+  late RewardsListRepository rewardsListRepository;
+  RewardsListState initState() {
+    return RewardsListState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsListState build() {
+    // 引入数据仓库
+    rewardsListRepository = ref.read(rewardsListRepositoryProvider);
+    // 初始化状态
+    RewardsListState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsListRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+  //选择选项
+  void pickCategory() {
+    OptionPickerUtil.showCupertinoOptionPicker(
+      items: state.optionList,
+      initialSelectIndex: 0,
+      onPickerChanged: (_, index) {
+        state = state.copyWith(selectedOption: state.optionList[index]);
+      },
+    );
+  }
+
+  void doDeleteAccount(context) {
+    DialogEngine.show(
+      maskColor: Colors.transparent,
+      animType: DialogAnimation.centerScale_otherSlide,
+      position: DialogPosition.top,
+      widget: RewardsListfilterDialo(
+        confirmAction: () {
+          ToastEngine.show("点击了确定");
+        },
+      ),
+    );
+  }
+
+  void doDeleteAccountAll(context) {
+    DialogEngine.show(
+      maskColor: Colors.transparent,
+      animType: DialogAnimation.centerScale_otherSlide,
+      position: DialogPosition.top,
+      widget: RewardsListfilterAllDialo(
+        confirmAction: () {
+          ToastEngine.show("点击了确定");
+        },
+      ),
+    );
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_list/rewards_list_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_list_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsListVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsListVm].
+@ProviderFor(RewardsListVm)
+final rewardsListVmProvider =
+    AutoDisposeNotifierProvider<RewardsListVm, RewardsListState>.internal(
+  RewardsListVm.new,
+  name: r'rewardsListVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsListVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsListVm = AutoDisposeNotifier<RewardsListState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 205 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_page.dart

@@ -0,0 +1,205 @@
+import 'package:cpt_rewards/modules/rewards_code/rewards_code_page.dart';
+import 'package:cpt_rewards/modules/rewards_redeem/rewards_redeem_page.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_my_active_vm.dart';
+
+@RoutePage()
+class RewardsMyActivePage extends HookConsumerWidget {
+  const RewardsMyActivePage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsMyActivePageRoute());
+    } else {
+      appRouter.push(const RewardsMyActivePageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Cute children multifunctional ……',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w500),
+            ),
+            Row(
+              children: [
+                const Text(
+                  '300',
+                  style: TextStyle(
+                      fontSize: 19.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w500),
+                ),
+                Text(
+                  '350',
+                  style: TextStyle(
+                      decoration: TextDecoration.lineThrough,
+                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationStyle: TextDecorationStyle.solid,
+                      fontSize: 12.0,
+                      color: ColorUtils.string2Color('#000000'),
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 5, right: 5),
+                const Text(
+                  'Points',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ),
+              ],
+            ),
+            Row(
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIconDatd,
+                  width: 15,
+                  height: 15,
+                ),
+                const Text(
+                  'Redeem From: 17 Mar 2024 until 15 Jul 2024',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 6)
+              ],
+            ).paddingOnly(left: 6),
+            Container(
+                height: 43,
+                decoration: BoxDecoration(
+                  color: ColorUtils.string2Color('#4161D0'),
+                  borderRadius: BorderRadius.circular(8), // 圆角
+                ),
+                child: Expanded(
+                    child: Container(
+                        alignment: Alignment.center,
+                        child: Text(
+                          'Redeem Now',
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: ColorUtils.string2Color('#FFFFFF'),
+                              fontWeight: FontWeight.w500),
+                        )))).marginOnly(top: 10, bottom: 5),
+          ],
+        ),
+        const MyAssetImage(
+          Assets.rewardsRewardsIndex1,
+          // width: 110,
+          height: 133,
+        ),
+      ],
+    ).paddingOnly(top: 20).onTap(() {
+      bool isd = true;
+      if (isd) {
+        RewardsRedeemPage.startInstance();
+      } else {
+        RewardsCodePage.startInstance();
+      }
+    });
+  }
+
+  Widget _buildItemRightSection(
+      BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      // color: Colors.green,
+      child: Text(
+        item['price'],
+        style: const TextStyle(
+            fontSize: 14.0,
+            color: Colors.black,
+            fontWeight: FontWeight.w400), // 设置字体大小
+      ),
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        children: [
+          SizedBox(
+            width: MediaQuery.of(context).size.width - 30,
+            height: 302,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                _buildItemLeftSection(context, ref, item, _vm)
+                // .marginOnly(bottom: 5),
+                // _buildItemRightSection(context, ref, item, _vm),
+              ],
+            ).paddingOnly(left: 20, right: 20),
+          ).constrained(
+            minHeight: 300.5,
+          ),
+        ],
+      ),
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return ListView.builder(
+      itemCount: itemsList.length,
+      itemBuilder: (context, index) {
+        return _buildSaleItem(context, ref, itemsList[index], _vm);
+      },
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsMyActiveVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("资产")),
+      body: EasyRefresh(
+        // 上拉加载
+        onLoad: () async {
+          Log.d("----onLoad");
+          _vm.onLoadData();
+        },
+        // 下拉刷新
+        onRefresh: () async {
+          Log.d("----onRefresh");
+          _vm.refreshListData();
+        },
+        child: Container(
+            color: ColorUtils.string2Color('#F2F3F6'),
+            padding: const EdgeInsets.only(top: 15),
+            child: _buildSaleList(context, ref, _vm)),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_my_active_state.dart';
+part 'rewards_my_active_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsMyActiveRepository rewardsMyActiveRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsMyActiveRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsMyActiveRepository {
+  DioEngine dioEngine;
+
+  RewardsMyActiveRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsMyActiveState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsMyActiveState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_active_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyActiveRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsMyActiveRepository].
+@ProviderFor(rewardsMyActiveRepository)
+final rewardsMyActiveRepositoryProvider = Provider<RewardsMyActiveRepository>.internal(
+  rewardsMyActiveRepository,
+  name: r'rewardsMyActiveRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsMyActiveRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsMyActiveRepositoryRef = ProviderRef<RewardsMyActiveRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsMyActiveState rewardsMyActiveStateFromJson(String str) => RewardsMyActiveState.fromJson(json.decode(str));
+
+String rewardsMyActiveStateToJson(RewardsMyActiveState data) => json.encode(data.toJson());
+
+class RewardsMyActiveState {
+  RewardsMyActiveState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsMyActiveState.fromJson(Map<dynamic, dynamic> json) => RewardsMyActiveState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsMyActiveState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsMyActiveState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 105 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_vm.dart

@@ -0,0 +1,105 @@
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import './rewards_my_active_state.dart';
+import './rewards_my_active_repository.dart';
+part 'rewards_my_active_vm.g.dart';
+
+@riverpod
+class RewardsMyActiveVm extends _$RewardsMyActiveVm {
+  late RewardsMyActiveRepository rewardsMyActiveRepository;
+  RewardsMyActiveState initState() {
+    return RewardsMyActiveState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsMyActiveState build() {
+    // 引入数据仓库
+    rewardsMyActiveRepository = ref.read(rewardsMyActiveRepositoryProvider);
+    // 初始化状态
+    RewardsMyActiveState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsMyActiveRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_active_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyActiveVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsMyActiveVm].
+@ProviderFor(RewardsMyActiveVm)
+final rewardsMyActiveVmProvider =
+    AutoDisposeNotifierProvider<RewardsMyActiveVm, RewardsMyActiveState>.internal(
+  RewardsMyActiveVm.new,
+  name: r'rewardsMyActiveVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsMyActiveVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsMyActiveVm = AutoDisposeNotifier<RewardsMyActiveState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 184 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_page.dart

@@ -0,0 +1,184 @@
+import 'package:cpt_rewards/modules/rewards_transaction/rewards_transaction_page.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_my_expired_vm.dart';
+
+@RoutePage()
+class RewardsMyExpiredPage extends HookConsumerWidget {
+  const RewardsMyExpiredPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsMyExpiredPageRoute());
+    } else {
+      appRouter.push(const RewardsMyExpiredPageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Cute children multifunctional ……',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w500),
+            ),
+            Row(
+              children: [
+                const Text(
+                  '300',
+                  style: TextStyle(
+                      fontSize: 19.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w500),
+                ),
+                Text(
+                  '350',
+                  style: TextStyle(
+                      decoration: TextDecoration.lineThrough,
+                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationStyle: TextDecorationStyle.solid,
+                      fontSize: 12.0,
+                      color: ColorUtils.string2Color('#000000'),
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 5, right: 5),
+                const Text(
+                  'Points',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ),
+              ],
+            ),
+            Row(
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIconDatd,
+                  width: 15,
+                  height: 15,
+                ),
+                const Text(
+                  'Redeem From: 17 Mar 2024 until 15 Jul 2024',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 6)
+              ],
+            ).paddingOnly(left: 6),
+          ],
+        ),
+        const MyAssetImage(
+          Assets.rewardsRewardsIndex1,
+          // width: 110,
+          height: 133,
+        ),
+      ],
+    ).paddingOnly(top: 20).onTap(() {
+      // 去详情
+      RewardsTransactionPage.startInstance();
+    });
+  }
+
+  Widget _buildItemRightSection(
+      BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      // color: Colors.green,
+      child: Text(
+        item['price'],
+        style: const TextStyle(
+            fontSize: 14.0,
+            color: Colors.black,
+            fontWeight: FontWeight.w400), // 设置字体大小
+      ),
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        children: [
+          SizedBox(
+            width: MediaQuery.of(context).size.width - 30,
+            height: 302,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                _buildItemLeftSection(context, ref, item, _vm)
+                // .marginOnly(bottom: 5),
+                // _buildItemRightSection(context, ref, item, _vm),
+              ],
+            ).paddingOnly(left: 20, right: 20),
+          ).constrained(
+            minHeight: 300.5,
+          ),
+        ],
+      ),
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return ListView.builder(
+      itemCount: itemsList.length,
+      itemBuilder: (context, index) {
+        return _buildSaleItem(context, ref, itemsList[index], _vm);
+      },
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsMyExpiredVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("资产")),
+      body: EasyRefresh(
+        // 上拉加载
+        onLoad: () async {
+          Log.d("----onLoad");
+          _vm.onLoadData();
+        },
+        // 下拉刷新
+        onRefresh: () async {
+          Log.d("----onRefresh");
+          _vm.refreshListData();
+        },
+        child: Container(
+            color: ColorUtils.string2Color('#F2F3F6'),
+            padding: const EdgeInsets.only(top: 15),
+            child: _buildSaleList(context, ref, _vm)),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_my_expired_state.dart';
+part 'rewards_my_expired_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsMyExpiredRepository rewardsMyExpiredRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsMyExpiredRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsMyExpiredRepository {
+  DioEngine dioEngine;
+
+  RewardsMyExpiredRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsMyExpiredState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsMyExpiredState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_expired_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyExpiredRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsMyExpiredRepository].
+@ProviderFor(rewardsMyExpiredRepository)
+final rewardsMyExpiredRepositoryProvider = Provider<RewardsMyExpiredRepository>.internal(
+  rewardsMyExpiredRepository,
+  name: r'rewardsMyExpiredRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsMyExpiredRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsMyExpiredRepositoryRef = ProviderRef<RewardsMyExpiredRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsMyExpiredState rewardsMyExpiredStateFromJson(String str) => RewardsMyExpiredState.fromJson(json.decode(str));
+
+String rewardsMyExpiredStateToJson(RewardsMyExpiredState data) => json.encode(data.toJson());
+
+class RewardsMyExpiredState {
+  RewardsMyExpiredState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsMyExpiredState.fromJson(Map<dynamic, dynamic> json) => RewardsMyExpiredState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsMyExpiredState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsMyExpiredState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 105 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_vm.dart

@@ -0,0 +1,105 @@
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import './rewards_my_expired_state.dart';
+import './rewards_my_expired_repository.dart';
+part 'rewards_my_expired_vm.g.dart';
+
+@riverpod
+class RewardsMyExpiredVm extends _$RewardsMyExpiredVm {
+  late RewardsMyExpiredRepository rewardsMyExpiredRepository;
+  RewardsMyExpiredState initState() {
+    return RewardsMyExpiredState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsMyExpiredState build() {
+    // 引入数据仓库
+    rewardsMyExpiredRepository = ref.read(rewardsMyExpiredRepositoryProvider);
+    // 初始化状态
+    RewardsMyExpiredState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsMyExpiredRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_expired/rewards_my_expired_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_expired_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyExpiredVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsMyExpiredVm].
+@ProviderFor(RewardsMyExpiredVm)
+final rewardsMyExpiredVmProvider =
+    AutoDisposeNotifierProvider<RewardsMyExpiredVm, RewardsMyExpiredState>.internal(
+  RewardsMyExpiredVm.new,
+  name: r'rewardsMyExpiredVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsMyExpiredVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsMyExpiredVm = AutoDisposeNotifier<RewardsMyExpiredState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 125 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_page.dart

@@ -0,0 +1,125 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+// ignore: depend_on_referenced_packages
+import 'package:auto_route/auto_route.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_load_image.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/my_appbar.dart';
+
+import '../../router/page/rewards_page_router.dart';
+import './rewards_my_vm.dart';
+
+@RoutePage()
+class RewardsMyPage extends HookConsumerWidget {
+  const RewardsMyPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsMyPageRoute());
+    } else {
+      appRouter.push(const RewardsMyPageRoute());
+    }
+  }
+
+  // 顶部tab 切换
+  Widget _buildTopSection(
+      BuildContext context, WidgetRef ref, _vm, tabsRouter) {
+    final topSectionsData = _vm.topSectionsData;
+    final currentTabIdx = tabsRouter.activeIndex;
+    return Container(
+      color: Colors.white,
+      child: Center(
+        child: Row(
+          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+          crossAxisAlignment: CrossAxisAlignment.center,
+          children: List.generate(topSectionsData.length, (index) {
+            final item = topSectionsData[index];
+            return Container(
+              width:
+                  MediaQuery.of(context).size.width / topSectionsData.length -
+                      30,
+              height: 43,
+              padding: const EdgeInsets.only(
+                  top: 10, bottom: 10, left: 10, right: 10),
+              decoration: index == currentTabIdx
+                  ? BoxDecoration(
+                      color: index == currentTabIdx
+                          ? context.appColors.btnBgDefault
+                          : ColorUtils.string2Color("#F2F3F6"),
+                      borderRadius: BorderRadius.circular(20),
+                      boxShadow: [
+                        BoxShadow(
+                          color: Colors.grey.withOpacity(0.5),
+                          spreadRadius: 1,
+                          blurRadius: 5,
+                          offset:
+                              const Offset(0, 2), // changes position of shadow
+                        ),
+                      ],
+                    )
+                  : null,
+              child: Row(
+                children: [
+                  Expanded(
+                    child: Container(
+                      alignment: Alignment.center,
+                      child: MyTextView(
+                        item['title'],
+                        fontSize: 16,
+                        textAlign: TextAlign.center,
+                        isFontMedium: true,
+                        textColor: index == currentTabIdx
+                            ? Colors.white
+                            : ColorUtils.string2Color("#000000"),
+                      ),
+                    ).onTap(
+                      () {
+                        tabsRouter.setActiveIndex(index);
+                      },
+                      type: ClickType.throttle,
+                    ),
+                  ),
+                ],
+              ),
+            ).marginOnly(left: 20, right: 0, top: 10, bottom: 10);
+          }),
+        ),
+      ),
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsMyVmProvider.notifier);
+    return Scaffold(
+        appBar: MyAppBar.appBar(
+          context,
+          "My Rewards",
+          backgroundColor: context.appColors.whiteBG,
+        ),
+        body: AutoTabsRouter.pageView(
+          routes: const [
+            RewardsMyActivePageRoute(),
+            RewardsMyExpiredPageRoute(),
+            RewardsMyUsedPageRoute(),
+          ],
+          builder: (context, child, pageController) {
+            final tabsRouter = AutoTabsRouter.of(context);
+            return Column(
+              children: [
+                _buildTopSection(context, ref, _vm, tabsRouter),
+                Expanded(
+                  child: child,
+                ),
+              ],
+            );
+          },
+        ));
+  }
+}

+ 218 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_page.dart

@@ -0,0 +1,218 @@
+import 'package:cpt_rewards/modules/rewards_transaction/rewards_transaction_page.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_my_used_vm.dart';
+
+@RoutePage()
+class RewardsMyUsedPage extends HookConsumerWidget {
+  const RewardsMyUsedPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsMyUsedPageRoute());
+    } else {
+      appRouter.push(const RewardsMyUsedPageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const Text(
+              maxLines: 1, // 设置最大行数为2
+              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+              'Cute children multifunctional ……',
+              style: TextStyle(
+                  fontSize: 16.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w500),
+            ),
+            Row(
+              children: [
+                const Text(
+                  '300',
+                  style: TextStyle(
+                      fontSize: 19.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w500),
+                ),
+                Text(
+                  '350',
+                  style: TextStyle(
+                      decoration: TextDecoration.lineThrough,
+                      decorationColor: ColorUtils.string2Color('#000000'),
+                      decorationStyle: TextDecorationStyle.solid,
+                      fontSize: 12.0,
+                      color: ColorUtils.string2Color('#000000'),
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 5, right: 5),
+                const Text(
+                  'Points',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ),
+              ],
+            ),
+            Row(
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIconDatd,
+                  width: 15,
+                  height: 15,
+                ),
+                const Text(
+                  'Redeem From: 17 Mar 2024 until 15 Jul 2024',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 6)
+              ],
+            ).paddingOnly(left: 6),
+            Row(
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIconDraw,
+                  width: 15,
+                  height: 15,
+                ),
+                const Text(
+                  'Redeemed at: 2 July 2014, 17:23',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(left: 6)
+              ],
+            ).paddingOnly(left: 6),
+            Container(
+                height: 43,
+                decoration: BoxDecoration(
+                  color: ColorUtils.string2Color('#4161D0'),
+                  borderRadius: BorderRadius.circular(8), // 圆角
+                ),
+                child: Expanded(
+                    child: Container(
+                        alignment: Alignment.center,
+                        child: Text(
+                          'View',
+                          style: TextStyle(
+                              fontSize: 15.0,
+                              color: ColorUtils.string2Color('#FFFFFF'),
+                              fontWeight: FontWeight.w500),
+                        )))).marginOnly(top: 10, bottom: 5).onTap(() {
+              RewardsTransactionPage.startInstance();
+            }),
+          ],
+        ),
+        const MyAssetImage(
+          Assets.rewardsRewardsIndex1,
+          // width: 110,
+          height: 133,
+        ),
+      ],
+    ).paddingOnly(top: 20).onTap(() {
+      // 去详情
+      RewardsTransactionPage.startInstance();
+    });
+  }
+
+  Widget _buildItemRightSection(
+      BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      // color: Colors.green,
+      child: Text(
+        item['price'],
+        style: const TextStyle(
+            fontSize: 14.0,
+            color: Colors.black,
+            fontWeight: FontWeight.w400), // 设置字体大小
+      ),
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(6.0)),
+        boxShadow: [
+          BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+        ],
+      ),
+      child: Column(
+        children: [
+          SizedBox(
+            width: MediaQuery.of(context).size.width - 30,
+            height: 302,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                _buildItemLeftSection(context, ref, item, _vm)
+                // .marginOnly(bottom: 5),
+                // _buildItemRightSection(context, ref, item, _vm),
+              ],
+            ).paddingOnly(left: 20, right: 20),
+          ).constrained(
+            minHeight: 300.5,
+          ),
+        ],
+      ),
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return ListView.builder(
+      itemCount: itemsList.length,
+      itemBuilder: (context, index) {
+        return _buildSaleItem(context, ref, itemsList[index], _vm);
+      },
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsMyUsedVmProvider.notifier);
+
+    return Scaffold(
+      // appBar: AppBar(title: Text("资产")),
+      body: EasyRefresh(
+        // 上拉加载
+        onLoad: () async {
+          Log.d("----onLoad");
+          _vm.onLoadData();
+        },
+        // 下拉刷新
+        onRefresh: () async {
+          Log.d("----onRefresh");
+          _vm.refreshListData();
+        },
+        child: Container(
+            color: ColorUtils.string2Color('#F2F3F6'),
+            padding: const EdgeInsets.only(top: 15),
+            child: _buildSaleList(context, ref, _vm)),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_my_used_state.dart';
+part 'rewards_my_used_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsMyUsedRepository rewardsMyUsedRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsMyUsedRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsMyUsedRepository {
+  DioEngine dioEngine;
+
+  RewardsMyUsedRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsMyUsedState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsMyUsedState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_used_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyUsedRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsMyUsedRepository].
+@ProviderFor(rewardsMyUsedRepository)
+final rewardsMyUsedRepositoryProvider = Provider<RewardsMyUsedRepository>.internal(
+  rewardsMyUsedRepository,
+  name: r'rewardsMyUsedRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsMyUsedRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsMyUsedRepositoryRef = ProviderRef<RewardsMyUsedRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsMyUsedState rewardsMyUsedStateFromJson(String str) => RewardsMyUsedState.fromJson(json.decode(str));
+
+String rewardsMyUsedStateToJson(RewardsMyUsedState data) => json.encode(data.toJson());
+
+class RewardsMyUsedState {
+  RewardsMyUsedState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsMyUsedState.fromJson(Map<dynamic, dynamic> json) => RewardsMyUsedState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsMyUsedState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsMyUsedState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 105 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_vm.dart

@@ -0,0 +1,105 @@
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import './rewards_my_used_state.dart';
+import './rewards_my_used_repository.dart';
+part 'rewards_my_used_vm.g.dart';
+
+@riverpod
+class RewardsMyUsedVm extends _$RewardsMyUsedVm {
+  late RewardsMyUsedRepository rewardsMyUsedRepository;
+  RewardsMyUsedState initState() {
+    return RewardsMyUsedState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsMyUsedState build() {
+    // 引入数据仓库
+    rewardsMyUsedRepository = ref.read(rewardsMyUsedRepositoryProvider);
+    // 初始化状态
+    RewardsMyUsedState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsMyUsedRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_used_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyUsedVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsMyUsedVm].
+@ProviderFor(RewardsMyUsedVm)
+final rewardsMyUsedVmProvider =
+    AutoDisposeNotifierProvider<RewardsMyUsedVm, RewardsMyUsedState>.internal(
+  RewardsMyUsedVm.new,
+  name: r'rewardsMyUsedVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsMyUsedVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsMyUsedVm = AutoDisposeNotifier<RewardsMyUsedState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 93 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_vm.dart

@@ -0,0 +1,93 @@
+
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+
+import './rewards_my_active/rewards_my_active_page.dart';
+import './rewards_my_expired/rewards_my_expired_page.dart';
+import './rewards_my_used/rewards_my_used_page.dart';
+
+part 'rewards_my_vm.g.dart';
+
+
+class RewardsMyVmState {
+  List<Map<String, dynamic>>? topSectionsData;
+  int? curIdx;
+
+  RewardsMyVmState({
+    List<Map<String, dynamic>>? topSectionsData,
+    this.curIdx = 0,
+  }) : topSectionsData = topSectionsData?? [
+    {
+      "title": "Active",
+      "icon": Assets.propertyIoan,
+      "pageStartInstanceFn": RewardsMyActivePage.startInstance,
+      "page": const RewardsMyActivePage(),
+    },
+    {
+      "title": "Expired",
+      "icon": Assets.propertyNews,
+      "pageStartInstanceFn": RewardsMyExpiredPage.startInstance,
+      "page": const RewardsMyExpiredPage(),
+    },
+    {
+      "title": "Used",
+      "icon": Assets.propertySale,
+      "pageStartInstanceFn": RewardsMyUsedPage.startInstance,
+      "page": const RewardsMyUsedPage(),
+    }
+  ];
+
+  RewardsMyVmState copyWith({
+    List<Map<String, dynamic>>? topSectionsData,
+    int? curIdx = 0,
+  }) {
+    return RewardsMyVmState(
+      topSectionsData: topSectionsData ?? this.topSectionsData,
+      curIdx: curIdx ?? 0,
+    );
+  }
+}
+
+@riverpod
+class RewardsMyVm extends _$RewardsMyVm {
+  get topSectionsData => state.topSectionsData;
+
+  RewardsMyVmState initState() {
+    return RewardsMyVmState();
+  }
+
+  @override
+  RewardsMyVmState build(){
+    final state = initState();
+    Log.d("--------------------------build---------------------");
+
+    // 初始时导航到子路由
+    WidgetsBinding.instance.addPostFrameCallback((_) {
+    });
+
+    return state;
+  }
+
+  // 页面切换
+  switchPage(int index,BuildContext? context, [bool? isFirstInitSwitch] ){
+    if(state.curIdx != index){
+      state = state.copyWith(curIdx: index);
+      final List<Map<String, dynamic>>? topSectionsData = state.topSectionsData;
+      // Log.d("当前页面${topSectionsData?[index]['pageStartInstanceFn']}");
+      final pageStartInstanceFn = topSectionsData?[index]['pageStartInstanceFn'] as Function({BuildContext? context});
+      pageStartInstanceFn(context:context);
+    }else {
+      if(isFirstInitSwitch??false){
+        final List<Map<String, dynamic>>? topSectionsData = state.topSectionsData;
+        // Log.d("当前页面${topSectionsData?[index]['pageStartInstanceFn']}");
+        final pageStartInstanceFn = topSectionsData?[index]['pageStartInstanceFn'] as Function({BuildContext? context});
+        pageStartInstanceFn(context:context);
+      }
+    }
+  }
+
+}
+

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_my_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsMyVmHash() => r'9b08b5e83d2b45f67b653daf60bb66bacb9c47ed';
+
+/// See also [RewardsMyVm].
+@ProviderFor(RewardsMyVm)
+final rewardsMyVmProvider =
+    AutoDisposeNotifierProvider<RewardsMyVm, RewardsMyVmState>.internal(
+  RewardsMyVm.new,
+  name: r'rewardsMyVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsMyVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsMyVm = AutoDisposeNotifier<RewardsMyVmState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 322 - 0
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_page.dart

@@ -0,0 +1,322 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_redeem_vm.dart';
+
+@RoutePage()
+class RewardsRedeemPage extends HookConsumerWidget {
+  const RewardsRedeemPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsRedeemPageRoute());
+    } else {
+      appRouter.push(const RewardsRedeemPageRoute());
+    }
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+            decoration: const BoxDecoration(
+              color: Colors.white,
+              borderRadius: BorderRadius.all(Radius.circular(6.0)),
+              boxShadow: [
+                BoxShadow(
+                    color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+              ],
+            ),
+            width: MediaQuery.of(context).size.width - 30,
+            // height: 420,
+            // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                const MyAssetImage(
+                  Assets.rewardsRewardsIndex1,
+                  // width: 110,
+                  height: 150,
+                ),
+                Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  mainAxisAlignment: MainAxisAlignment.start,
+                  children: [
+                    const Text(
+                      maxLines: 1, // 设置最大行数为2
+                      overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                      'Cute children multifunctional umbrella',
+                      style: TextStyle(
+                          fontSize: 17.0,
+                          color: Colors.black,
+                          fontWeight: FontWeight.w500),
+                    ).marginOnly(bottom: 5),
+                    Row(
+                      children: [
+                        const Text(
+                          '300',
+                          style: TextStyle(
+                              fontSize: 19.0,
+                              color: Colors.black,
+                              fontWeight: FontWeight.w500),
+                        ),
+                        Text(
+                          '350',
+                          style: TextStyle(
+                              decoration: TextDecoration.lineThrough,
+                              decorationColor:
+                                  ColorUtils.string2Color('#808DAF'),
+                              decorationStyle: TextDecorationStyle.solid,
+                              fontSize: 12.0,
+                              color: ColorUtils.string2Color('#808DAF'),
+                              fontWeight: FontWeight.w400),
+                        ).marginOnly(left: 5, right: 5),
+                        const Text(
+                          'Points',
+                          style: TextStyle(
+                              fontSize: 13.0,
+                              color: Colors.black,
+                              fontWeight: FontWeight.w400),
+                        ),
+                      ],
+                    ),
+                  ],
+                ).paddingOnly(left: 15, right: 15, top: 10, bottom: 20),
+              ],
+            )),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildPackage(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                mainAxisSize: MainAxisSize.min,
+                mainAxisAlignment: MainAxisAlignment.start,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.rewardsRewardsIconDatd,
+                    width: 25,
+                    height: 25,
+                  ).marginOnly(right: 10),
+                  Text(
+                    'Redeem Date',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#000000'),
+                        fontWeight: FontWeight.w500),
+                  )
+                ],
+              ).marginOnly(bottom: 10),
+              Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  Text(
+                    '21 Jun 2024, 20:18',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#54638C'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                ],
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15, top: 12, bottom: 20),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildFrom(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                mainAxisSize: MainAxisSize.min,
+                mainAxisAlignment: MainAxisAlignment.start,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.rewardsRewardsIconDate,
+                    width: 25,
+                    height: 25,
+                  ).marginOnly(right: 10),
+                  Text(
+                    'Redeem From',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#000000'),
+                        fontWeight: FontWeight.w500),
+                  )
+                ],
+              ).marginOnly(bottom: 10),
+              Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  Text(
+                    '17 Mar 2020 until 15 Jul 2020',
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: ColorUtils.string2Color('#54638C'),
+                        fontWeight: FontWeight.w400),
+                  ),
+                ],
+              ),
+            ],
+          ).paddingOnly(left: 15, right: 15, top: 12, bottom: 20),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildRedeemed(BuildContext context, WidgetRef ref, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                mainAxisSize: MainAxisSize.max,
+                mainAxisAlignment: MainAxisAlignment.start,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.rewardsRewardsSuccess,
+                    width: 17,
+                    height: 17,
+                  ).marginOnly(right: 12),
+                  Expanded(
+                    child: Text(
+                      'You’ve redeemed the following promotion.',
+                      style: TextStyle(
+                          fontSize: 15.0,
+                          color: ColorUtils.string2Color('#4161D0'),
+                          fontWeight: FontWeight.w500),
+                    ),
+                  )
+                ],
+              )
+            ],
+          ).paddingOnly(left: 15, right: 75, top: 22, bottom: 20),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+        width: MediaQuery.of(context).size.width,
+        color: ColorUtils.string2Color('#FFFFFF'),
+        padding: const EdgeInsets.only(top: 15, bottom: 30),
+        child: Column(
+          mainAxisAlignment: MainAxisAlignment.center,
+          crossAxisAlignment: CrossAxisAlignment.center,
+          children: [
+            const MyAssetImage(
+              Assets.rewardsRewardsSuccess,
+              width: 54,
+              height: 54,
+            ),
+            Text(
+              'Congratulations!',
+              style: TextStyle(
+                  fontSize: 18.0,
+                  color: ColorUtils.string2Color('#4161D0'),
+                  fontWeight: FontWeight.w500),
+            ).marginOnly(top: 12, bottom: 15),
+          ],
+        ));
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsRedeemVmProvider.notifier);
+    final state = ref.watch(rewardsRedeemVmProvider);
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "My Rewards Details",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      body: Column(
+        children: [
+          Expanded(
+              child: SingleChildScrollView(
+                  scrollDirection: Axis.vertical,
+                  physics: const BouncingScrollPhysics(),
+                  clipBehavior: Clip.none,
+                  child: Column(
+                    children: [
+                      _buildTop(context, ref, _vm),
+                      Container(
+                          color: ColorUtils.string2Color('#F2F3F6'),
+                          padding: const EdgeInsets.only(top: 15),
+                          child: Column(
+                            children: [
+                              _buildPackage(context, ref, _vm),
+                              _buildRedeemed(context, ref, _vm),
+                              _buildSaleItem(context, ref, _vm),
+                              _buildFrom(context, ref, _vm),
+                            ],
+                          )),
+                    ],
+                  ))),
+        ],
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_redeem_state.dart';
+part 'rewards_redeem_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsRedeemRepository rewardsRedeemRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsRedeemRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsRedeemRepository {
+  DioEngine dioEngine;
+
+RewardsRedeemRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+      final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsRedeemState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsRedeemState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_redeem_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsRedeemRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsRedeemRepository].
+@ProviderFor(rewardsRedeemRepository)
+final rewardsRedeemRepositoryProvider = Provider<RewardsRedeemRepository>.internal(
+  rewardsRedeemRepository,
+  name: r'rewardsRedeemRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsRedeemRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsRedeemRepositoryRef = ProviderRef<RewardsRedeemRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsRedeemState rewardsRedeemStateFromJson(String str) => RewardsRedeemState.fromJson(json.decode(str));
+
+String rewardsRedeemStateToJson(RewardsRedeemState data) => json.encode(data.toJson());
+
+class RewardsRedeemState {
+  RewardsRedeemState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsRedeemState.fromJson(Map<dynamic, dynamic> json) => RewardsRedeemState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsRedeemState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsRedeemState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 110 - 0
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_vm.dart

@@ -0,0 +1,110 @@
+
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_redeem_state.dart';
+import './rewards_redeem_repository.dart';
+part 'rewards_redeem_vm.g.dart';
+
+@riverpod
+class RewardsRedeemVm extends _$RewardsRedeemVm {
+  late RewardsRedeemRepository rewardsRedeemRepository;
+  RewardsRedeemState initState() {
+    return RewardsRedeemState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsRedeemState build() {
+    // 引入数据仓库
+    rewardsRedeemRepository = ref.read(rewardsRedeemRepositoryProvider);
+    // 初始化状态
+    RewardsRedeemState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsRedeem(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsRedeemRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_redeem/rewards_redeem_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_redeem_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsRedeemVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsRedeemVm].
+@ProviderFor(RewardsRedeemVm)
+final rewardsRedeemVmProvider =
+    AutoDisposeNotifierProvider<RewardsRedeemVm, RewardsRedeemState>.internal(
+  RewardsRedeemVm.new,
+  name: r'rewardsRedeemVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsRedeemVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsRedeemVm = AutoDisposeNotifier<RewardsRedeemState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, ]invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 329 - 0
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_page.dart

@@ -0,0 +1,329 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:cs_resources/theme/theme_config.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/shatter/picker_container.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/rewards_page_router.dart';
+import './rewards_search_vm.dart';
+
+@RoutePage()
+class RewardsSearchPage extends HookConsumerWidget {
+  const RewardsSearchPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const RewardsSearchPageRoute());
+    } else {
+      appRouter.push(const RewardsSearchPageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Column(
+          crossAxisAlignment: CrossAxisAlignment.center,
+          mainAxisAlignment: MainAxisAlignment.center,
+          children: [
+            const Center(
+              child: Text(
+                'SHOW THE VERIFICATION CODE TO YOUR MERCHANT',
+                textAlign: TextAlign.center,
+                style: TextStyle(
+                    fontSize: 20.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w500),
+              ),
+            ),
+            Text(
+              'VERIFICATION CODE',
+              style: TextStyle(
+                  fontSize: 18.0,
+                  color: ColorUtils.string2Color('#54638C'),
+                  fontWeight: FontWeight.w500),
+            ).marginOnly(top: 35, bottom: 20),
+            Text(
+              '778890',
+              style: TextStyle(
+                  fontSize: 36.0,
+                  color: ColorUtils.string2Color('#4161D0'),
+                  fontWeight: FontWeight.w500),
+            ),
+          ],
+        ),
+      ],
+    );
+  }
+
+  // listitem
+  Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
+    return Column(
+      children: [
+        Container(
+          decoration: const BoxDecoration(
+            color: Colors.white,
+            borderRadius: BorderRadius.all(Radius.circular(6.0)),
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
+          ),
+          width: MediaQuery.of(context).size.width - 30,
+          height: 250,
+          // margin: const EdgeInsets.only(left: 15, right: 15, top: 12.5),
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            mainAxisAlignment: MainAxisAlignment.start,
+            children: [_buildItemLeftSection(context, ref, item, _vm)],
+          ).paddingOnly(left: 26, right: 26, top: 40),
+        ),
+      ],
+    ).marginOnly(left: 15, bottom: 15, right: 15);
+  }
+
+  // list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return _buildSaleItem(context, ref, itemsList[0], _vm);
+  }
+
+  // SearchOf
+  Widget _buildSearchOf(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        _buildSearchRecent(context, ref, _vm),
+        _buildSearchTrending(context, ref, _vm),
+        _buildSearchRecently(context, ref, _vm),
+      ],
+    );
+  }
+
+// Recent
+  Widget _buildSearchRecent(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        Text(
+          'Recent Searches',
+          style: TextStyle(
+              fontSize: 16.0,
+              color: ColorUtils.string2Color('#000000'),
+              fontWeight: FontWeight.w500),
+        ).marginOnly(bottom: 20),
+        Wrap(
+            direction: Axis.horizontal, // 水平方向排列
+            spacing: 10.0, // 子组件之间的间距
+            runSpacing: 15.0, // 子组件行与行之间的间距
+            children: List.generate(4, (index) {
+              return _buildSearchRecentItem(context, ref, _vm);
+            }))
+      ],
+    ).marginOnly(bottom: 20);
+  }
+
+  Widget _buildSearchRecentItem(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(3.0)),
+      ),
+      padding: const EdgeInsets.all(10),
+      child: Text(
+        'Dragon bowl',
+        style: TextStyle(
+            fontSize: 14.0,
+            color: ColorUtils.string2Color('#969696'),
+            fontWeight: FontWeight.w400),
+      ),
+    );
+  }
+
+  // Trending
+  Widget _buildSearchTrending(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        Text(
+          'Trending Searches',
+          style: TextStyle(
+              fontSize: 16.0,
+              color: ColorUtils.string2Color('#000000'),
+              fontWeight: FontWeight.w500),
+        ).marginOnly(bottom: 20),
+        Wrap(
+            direction: Axis.horizontal, // 水平方向排列
+            spacing: 10.0, // 子组件之间的间距
+            runSpacing: 15.0, // 子组件行与行之间的间距
+            children: List.generate(4, (index) {
+              return _buildSearchTrendingItem(context, ref, _vm);
+            }))
+      ],
+    ).marginOnly(bottom: 20);
+  }
+
+  Widget _buildSearchTrendingItem(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+      decoration: const BoxDecoration(
+        color: Colors.white,
+        borderRadius: BorderRadius.all(Radius.circular(3.0)),
+      ),
+      padding: const EdgeInsets.all(10),
+      child: Row(
+        mainAxisSize: MainAxisSize.min,
+        children: [
+          const MyAssetImage(
+            Assets.rewardsRewardsHost,
+            width: 12,
+            height: 14,
+          ).marginOnly(right: 5),
+          Text(
+            'Dragon bowl',
+            style: TextStyle(
+                fontSize: 14.0,
+                color: ColorUtils.string2Color('#969696'),
+                fontWeight: FontWeight.w400),
+          ),
+        ],
+      ),
+    );
+  }
+
+  // Recently
+  Widget _buildSearchRecently(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        Text(
+          'Recently viewed',
+          style: TextStyle(
+              fontSize: 16.0,
+              color: ColorUtils.string2Color('#000000'),
+              fontWeight: FontWeight.w500),
+        ).marginOnly(bottom: 18),
+        Column(
+            crossAxisAlignment: CrossAxisAlignment.center,
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: List.generate(2, (index) {
+              return _buildSearchItem(context, ref, _vm);
+            }))
+      ],
+    );
+  }
+
+  Widget _buildSearchItem(BuildContext context, WidgetRef ref, _vm) {
+    return Container(
+        // width: MediaQuery.of(context).size.width / 2 - 25,
+        // height: 240,
+        padding: const EdgeInsets.only(bottom: 20),
+        decoration: const BoxDecoration(
+          color: Colors.white,
+          borderRadius: BorderRadius.all(Radius.circular(6.0)),
+          boxShadow: [
+            BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+          ],
+        ),
+        child: Column(
+          children: [
+            const MyAssetImage(
+              Assets.rewardsRewardsIndex1,
+              // width: 110,
+              height: 149,
+            ),
+            Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              children: [
+                const Text(
+                  maxLines: 1, // 设置最大行数为2
+                  overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                  'Cute children multifunctional ……',
+                  style: TextStyle(
+                      fontSize: 15.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w500),
+                ),
+                Text(
+                  maxLines: 1, // 设置最大行数为2
+                  overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                  'Hong Ye Group Co., Ltd',
+                  style: TextStyle(
+                      fontSize: 13.0,
+                      color: ColorUtils.string2Color('#808DAF'),
+                      fontWeight: FontWeight.w400),
+                ).marginOnly(bottom: 5),
+                Row(
+                  children: [
+                    const Text(
+                      '300',
+                      style: TextStyle(
+                          fontSize: 18.0,
+                          color: Colors.black,
+                          fontWeight: FontWeight.w500),
+                    ),
+                    Text(
+                      '350',
+                      style: TextStyle(
+                          decoration: TextDecoration.lineThrough,
+                          decorationColor: ColorUtils.string2Color('#808DAF'),
+                          decorationStyle: TextDecorationStyle.solid,
+                          fontSize: 13.0,
+                          color: ColorUtils.string2Color('#808DAF'),
+                          fontWeight: FontWeight.w400),
+                    ).marginOnly(left: 5, right: 5),
+                    const Text(
+                      'Points',
+                      style: TextStyle(
+                          fontSize: 13.0,
+                          color: Colors.black,
+                          fontWeight: FontWeight.w400),
+                    ),
+                  ],
+                )
+              ],
+            ).paddingOnly(top: 12, left: 12, right: 12)
+          ],
+        )).marginOnly(bottom: 13);
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(rewardsSearchVmProvider.notifier);
+    final state = ref.watch(rewardsSearchVmProvider);
+    return Scaffold(
+      appBar: MyAppBar.searchAppBar(context,
+          backgroundColor: Colors.white,
+          systemUiOverlayStyle:
+              ThemeConfig.systemUiOverlayStyleLightThemeBlack),
+      body: SingleChildScrollView(
+        scrollDirection: Axis.vertical,
+        physics: const BouncingScrollPhysics(),
+        clipBehavior: Clip.none,
+        child: Container(
+            width: MediaQuery.of(context).size.width,
+            color: ColorUtils.string2Color('#F2F3F6'),
+            padding: const EdgeInsets.only(top: 20, left: 15, right: 15),
+            child: _buildSearchOf(context, ref, _vm)),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_repository.dart

@@ -0,0 +1,70 @@
+import 'package:domain/constants/api_constants.dart';
+import 'package:domain/entity/server_time.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:plugin_platform/http/dio_engine.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:plugin_basic/provider/http_provider/http_provider.dart';
+
+import './rewards_search_state.dart';
+part 'rewards_search_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+RewardsSearchRepository rewardsSearchRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return RewardsSearchRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class RewardsSearchRepository {
+  DioEngine dioEngine;
+
+  RewardsSearchRepository({required this.dioEngine});
+
+  Future<HttpResult<Object>> fetchPropertyNewsList(
+      Map<String, dynamic>? data, {
+        CancelToken? cancelToken,
+      }) async {
+    Map<String, dynamic> params = {};
+
+    // if (!Utils.isEmpty(type)) {
+    //   params["type"] = type!;
+    // }
+
+    params = data!;
+
+
+    Map<String, String> headers = {};
+
+    headers["Content-Type"] = "application/x-www-form-urlencoded";
+    headers["Accept"] = "application/x.yyjobs-api.v1+json";
+
+    final result = await dioEngine.requestNetResult(
+      // ApiConstants.apiServerTime, // api 地址
+      '/index.php/api/employee/extra/time', // api 地址
+      params: params,
+      headers: headers,
+      method: HttpMethod.GET,
+      isShowLoadingDialog: true,  //是否展示默认的Loading弹窗
+      networkDebounce: true,   //是否防抖防止重复请求
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = RewardsSearchState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<RewardsSearchState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 27 - 0
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_repository.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_search_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsSearchRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+
+/// See also [rewardsSearchRepository].
+@ProviderFor(rewardsSearchRepository)
+final rewardsSearchRepositoryProvider = Provider<RewardsSearchRepository>.internal(
+  rewardsSearchRepository,
+  name: r'rewardsSearchRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$rewardsSearchRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef RewardsSearchRepositoryRef = ProviderRef<RewardsSearchRepository>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 49 - 0
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+RewardsSearchState rewardsSearchStateFromJson(String str) => RewardsSearchState.fromJson(json.decode(str));
+
+String rewardsSearchStateToJson(RewardsSearchState data) => json.encode(data.toJson());
+
+class RewardsSearchState {
+  RewardsSearchState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory RewardsSearchState.fromJson(Map<dynamic, dynamic> json) => RewardsSearchState(
+    curPage: json["curPage"],
+    pageSize: json["pageSize"],
+    list: List<Map<String, dynamic>>.from(json["list"].map((x) => x)),
+    filterCount: json["filterCount"],
+  );
+
+  Map<dynamic, dynamic> toJson() => {
+    "curPage": curPage,
+    "pageSize": pageSize,
+    "list": List<dynamic>.from(list.map((x) => x)),
+    "filterCount": filterCount,
+  };
+
+  RewardsSearchState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return RewardsSearchState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 109 - 0
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_vm.dart

@@ -0,0 +1,109 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/http/http_result.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import './rewards_search_state.dart';
+import './rewards_search_repository.dart';
+part 'rewards_search_vm.g.dart';
+
+@riverpod
+class RewardsSearchVm extends _$RewardsSearchVm {
+  late RewardsSearchRepository rewardsSearchRepository;
+  RewardsSearchState initState() {
+    return RewardsSearchState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title":
+              "The community will hold the activity of making Zongzi on the Loong Boat ……",
+          "price": "Monday 14 0ct 2024, 15:00 PM~18:00PM",
+        },
+        {
+          "id": 2,
+          "title": "Community basketball competition activities",
+          "price": "Monday 14 Oct 2024, 10:19 AM",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  RewardsSearchState build() {
+    // 引入数据仓库
+    rewardsSearchRepository = ref.read(rewardsSearchRepositoryProvider);
+    // 初始化状态
+    RewardsSearchState state = initState();
+    // 初始化列表数据
+    return state;
+  }
+
+  // 初始化页面数据
+  initPageData() {
+    Log.d("----property_news_vm-----initPageData");
+    refreshListData();
+  }
+
+  // 上拉加载
+  Future onLoadData() async {
+    Log.d("----property_news_vm-----initListData");
+    // await Future.delayed(const Duration(seconds: 2));
+    // if(state.list.length >= state.filterCount){
+    //   return;
+    // }else {
+    //   int curPage = state.curPage + 1;
+    //   state = state.copyWith(curPage: curPage,);
+    //   getListData();
+    // }
+    getListData();
+  }
+
+// 去新闻详情页
+  void goNewsDetail(String item) {
+    Log.d(item);
+    // PropertyPage.startInstance(context: context, item: item);
+  }
+
+  // 获取list 列表数据
+  void getListData<T>() async {
+    Log.d("加载listData数据---------------start-----");
+    try {
+      //请求网络
+      Map<String, dynamic> params = {
+        "curPage": state.curPage,
+        "pageSize": state.pageSize,
+      };
+      Log.d("请求参数------$params");
+      final result = await rewardsSearchRepository.fetchPropertyNewsList(params);
+      Log.d("请求完成结果------${result.data}");
+      //校验成功失败
+      if (result.isSuccess) {
+        // state = state.copyWith(serverTime: result.data);
+        state = state;
+        ToastEngine.show("获取数据成功");
+      } else {
+        ToastEngine.show(result.errorMsg ?? "Network Load Error");
+      }
+    } catch (e) {
+      ToastEngine.show("Error: $e");
+    }
+  }
+
+  // 下拉刷新
+  Future refreshListData() async {
+    Log.d("----property_news_vm-----refreshListData ");
+
+    // await Future.delayed(const Duration(seconds: 2));
+
+    state = state.copyWith(curPage: 1, pageSize: 10);
+    // ref.invalidateSelf();
+    // ref.invalidate(propertyNewsVmProvider);
+    getListData();
+  }
+
+
+}

+ 25 - 0
packages/cpt_rewards/lib/modules/rewards_search/rewards_search_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'rewards_search_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$rewardsSearchVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
+
+/// See also [RewardsSearchVm].
+@ProviderFor(RewardsSearchVm)
+final rewardsSearchVmProvider =
+    AutoDisposeNotifierProvider<RewardsSearchVm, RewardsSearchState>.internal(
+  RewardsSearchVm.new,
+  name: r'rewardsSearchVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$rewardsSearchVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$RewardsSearchVm = AutoDisposeNotifier<RewardsSearchState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 0 - 0
packages/cpt_rewards/lib/modules/rewards_successful/rewards_successful_page.dart


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