2 Commits 9511318070 ... 7b6936683b

Author SHA1 Message Date
  “shanwenxin” 7b6936683b Merge branch 'dev' of http://git.wmzhubo.com/guadoutech/YYHome into dev 2 weeks ago
  “shanwenxin” 99669ad5ce services部分 2 weeks ago
47 changed files with 1573 additions and 135 deletions
  1. 3 1
      packages/cpt_notice_board/lib/modules/documents/page/documents_page.dart
  2. 154 0
      packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_page.dart
  3. 49 0
      packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_state.dart
  4. 70 0
      packages/cpt_notice_board/lib/modules/documents_list/repository/documents_list_repository.dart
  5. 28 0
      packages/cpt_notice_board/lib/modules/documents_list/repository/documents_list_repository.g.dart
  6. 105 0
      packages/cpt_notice_board/lib/modules/documents_list/vm/documents_list_vm.dart
  7. 25 0
      packages/cpt_notice_board/lib/modules/documents_list/vm/documents_list_vm.g.dart
  8. 6 1
      packages/cpt_notice_board/lib/modules/event/page/event_page.dart
  9. 121 0
      packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_page.dart
  10. 49 0
      packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_state.dart
  11. 70 0
      packages/cpt_notice_board/lib/modules/event_detail/repository/event_detail_repository.dart
  12. 28 0
      packages/cpt_notice_board/lib/modules/event_detail/repository/event_detail_repository.g.dart
  13. 105 0
      packages/cpt_notice_board/lib/modules/event_detail/vm/event_detail_vm.dart
  14. 10 10
      packages/cpt_services/lib/modules/services/vm/services_view_model.g.dart
  15. 0 71
      packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart
  16. 1 1
      packages/cpt_notice_board/lib/modules/notice_board/vm/notice_board_view_model.dart
  17. 1 1
      packages/cpt_notice_board/lib/modules/notice_board/vm/notice_board_view_model.g.dart
  18. 12 0
      packages/cpt_notice_board/lib/router/page/notice_board_page_router.dart
  19. 40 0
      packages/cpt_notice_board/lib/router/page/notice_board_page_router.gr.dart
  20. 122 0
      packages/cpt_services/lib/modules/services/dialog/account_deactivation_dialog.dart
  21. 0 33
      packages/cpt_services/lib/modules/services/page/services_page.dart
  22. 206 0
      packages/cpt_services/lib/modules/services/services_page.dart
  23. 70 0
      packages/cpt_services/lib/modules/services/services_repository.dart
  24. 28 0
      packages/cpt_services/lib/modules/services/services_repository.g.dart
  25. 50 0
      packages/cpt_services/lib/modules/services/services_state.dart
  26. 175 0
      packages/cpt_services/lib/modules/services/services_view_model.dart
  27. 25 0
      packages/cpt_services/lib/modules/services/services_view_model.g.dart
  28. 0 14
      packages/cpt_services/lib/modules/services/vm/services_view_model.dart
  29. 1 1
      packages/cpt_services/lib/router/component/services_component_service.dart
  30. 1 1
      packages/cpt_services/lib/router/page/services_page_router.dart
  31. BIN
      packages/cs_resources/assets/service/service_icon_1.png
  32. BIN
      packages/cs_resources/assets/service/service_icon_10.png
  33. BIN
      packages/cs_resources/assets/service/service_icon_11.png
  34. BIN
      packages/cs_resources/assets/service/service_icon_12.png
  35. BIN
      packages/cs_resources/assets/service/service_icon_13.png
  36. BIN
      packages/cs_resources/assets/service/service_icon_14.png
  37. BIN
      packages/cs_resources/assets/service/service_icon_2.png
  38. BIN
      packages/cs_resources/assets/service/service_icon_3.png
  39. BIN
      packages/cs_resources/assets/service/service_icon_4.png
  40. BIN
      packages/cs_resources/assets/service/service_icon_5.png
  41. BIN
      packages/cs_resources/assets/service/service_icon_6.png
  42. BIN
      packages/cs_resources/assets/service/service_icon_7.png
  43. BIN
      packages/cs_resources/assets/service/service_icon_8.png
  44. BIN
      packages/cs_resources/assets/service/service_icon_9.png
  45. 14 0
      packages/cs_resources/lib/generated/assets.dart
  46. 1 0
      packages/cs_resources/pubspec.yaml
  47. 3 1
      packages/cs_router/lib/path/router_path.dart

+ 3 - 1
packages/cpt_notice_board/lib/modules/documents/page/documents_page.dart

@@ -11,6 +11,7 @@ import 'package:widgets/widget_export.dart';
 import 'package:cs_resources/generated/assets.dart';
 
 import '../../../router/page/notice_board_page_router.dart';
+import '../../documents_list/page/documents_list_page.dart';
 import '../vm/documents_vm.dart';
 
 @RoutePage()
@@ -104,7 +105,8 @@ class DocumentsPage extends HookConsumerWidget {
         ],
       ).onTap(() {
         // 去详情
-        _vm.goNewsDetail(item);
+        // _vm.goNewsDetail(item);
+        DocumentsListPage.startInstance(context: context);
       }),
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }

+ 154 - 0
packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_page.dart

@@ -0,0 +1,154 @@
+import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package: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/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/notice_board_page_router.dart';
+import '../vm/documents_list_vm.dart';
+
+@RoutePage()
+class DocumentsListPage extends HookConsumerWidget {
+  const DocumentsListPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const DocumentsListPageRoute());
+    } else {
+      appRouter.push(const DocumentsListPageRoute());
+    }
+  }
+
+  Widget _buildItemLeftSection(BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      // color: Colors.blue,
+      child: Text(
+        item['title'],
+        maxLines: 2, // 设置最大行数为2
+        overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+        style: const TextStyle(
+            fontSize: 16.0,
+            color: Colors.black,
+            fontWeight: FontWeight.w700), // 设置字体大小
+      ),
+    ).marginOnly(right: 17.5);
+  }
+
+  Widget _buildItemRightSection(
+      BuildContext context, WidgetRef ref, item, _vm) {
+    return Container(
+      color: Colors.white,
+      child: TextButton(
+        onPressed: () {},
+        style: TextButton.styleFrom(
+          foregroundColor: Colors.black,
+          backgroundColor: ColorUtils.string2Color('#4161D0'), // 背景颜色
+          minimumSize: const Size(91.5, 30), // 最小宽度和高度
+          padding:
+              const EdgeInsets.symmetric(horizontal: 11.0, vertical: 9), // 内边距
+          shape: RoundedRectangleBorder(
+            borderRadius: BorderRadius.circular(5), // 圆角
+            side: BorderSide(
+              color: ColorUtils.string2Color('#4161D0'),
+              width: 1.0,
+            ), // 边框
+          ),
+        ),
+        child: const Text('Open Folder',
+          style: const TextStyle(color: Colors.white,),
+        ),
+      ),
+    );
+  }
+
+  // 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: Row(
+        mainAxisAlignment: MainAxisAlignment.center,
+        crossAxisAlignment: CrossAxisAlignment.center,
+        mainAxisSize: MainAxisSize.max,
+        children: [
+          Container(
+            width: MediaQuery.of(context).size.width - 30,
+            height: 70,
+            child: Row(
+              mainAxisAlignment: MainAxisAlignment.start,
+              crossAxisAlignment: CrossAxisAlignment.center,
+              children: [
+                Expanded(child: _buildItemLeftSection(context, ref, item, _vm)),
+                Container(
+                  // width: 120,
+                  // child: _buildItemRightSection(context, ref, item, _vm),
+                  // child: TextButton(onPressed: (){}, child: Text("fdsfds")),
+                ),
+              ],
+            ).paddingOnly(left: 20,right: 20),
+          ).constrained(
+            minHeight: 70,
+          ),
+        ],
+      ).onTap(() {
+        // 去详情
+        _vm.goNewsDetail(item);
+      }),
+    ).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(documentsListVmProvider.notifier);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Documents",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      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)),
+      )),
+    );
+  }
+}

+ 49 - 0
packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+DocumentsListState documentsListStateFromJson(String str) => DocumentsListState.fromJson(json.decode(str));
+
+String documentsListStateToJson(DocumentsListState data) => json.encode(data.toJson());
+
+class DocumentsListState {
+  DocumentsListState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory DocumentsListState.fromJson(Map<dynamic, dynamic> json) => DocumentsListState(
+    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,
+  };
+
+  DocumentsListState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return DocumentsListState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 70 - 0
packages/cpt_notice_board/lib/modules/documents_list/repository/documents_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 '../page/documents_list_state.dart';
+part 'documents_list_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+DocumentsListRepository documentsListRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return DocumentsListRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class DocumentsListRepository {
+  DioEngine dioEngine;
+
+  DocumentsListRepository({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 = DocumentsListState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<DocumentsListState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 28 - 0
packages/cpt_notice_board/lib/modules/documents_list/repository/documents_list_repository.g.dart

@@ -0,0 +1,28 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'documents_list_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$documentsListRepositoryHash() =>
+    r'68370656250ee691445b4293c3b30568d4ebf20b';
+
+/// See also [documentsListRepository].
+@ProviderFor(documentsListRepository)
+final documentsListRepositoryProvider = Provider<DocumentsListRepository>.internal(
+  documentsListRepository,
+  name: r'documentsListRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$documentsListRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef DocumentsListRepositoryRef = ProviderRef<DocumentsListRepository>;
+// 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

+ 105 - 0
packages/cpt_notice_board/lib/modules/documents_list/vm/documents_list_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 '../page/documents_list_state.dart';
+import '../repository/documents_list_repository.dart';
+part 'documents_list_vm.g.dart';
+
+@riverpod
+class DocumentsListVm extends _$DocumentsListVm {
+  late DocumentsListRepository documentsListRepository;
+  DocumentsListState initState() {
+    return DocumentsListState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title": "18 Sep 2024 BIK 39#09-XX 1337 psd 1001 sqft 39#09-XX 1337 psd 1001",
+          "price": "\$1.338 M",
+        },  
+        {
+          "id": 2,
+          "title": "18 Sep 2024 BIK 39#09-XX 1337 psd 1001 sqft",
+          "price": "\$1.338 M",
+        },
+      ],
+      filterCount: 2,
+    );
+  }
+
+  @override
+  DocumentsListState build() {
+    // 引入数据仓库
+    documentsListRepository = ref.read(documentsListRepositoryProvider);
+    // 初始化状态
+    DocumentsListState 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 documentsListRepository.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_notice_board/lib/modules/documents_list/vm/documents_list_vm.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'documents_list_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$documentsListVmHash() => r'066315b56e78a801d048576f75f1e30b4816dbf5';
+
+/// See also [DocumentsListVm].
+@ProviderFor(DocumentsListVm)
+final documentsListVmProvider =
+    AutoDisposeNotifierProvider<DocumentsListVm, DocumentsListState>.internal(
+  DocumentsListVm.new,
+  name: r'documentsListVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$documentsListVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$DocumentsListVm = AutoDisposeNotifier<DocumentsListState>;
+// 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

+ 6 - 1
packages/cpt_notice_board/lib/modules/event/page/event_page.dart

@@ -1,3 +1,4 @@
+import 'package:cpt_notice_board/modules/event_detail/page/event_detail_page.dart';
 import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -86,7 +87,11 @@ class EventPage extends HookConsumerWidget {
         ],
       ).onTap(() {
         // 去详情
-        _vm.goNewsDetail(item['title']);
+        // _vm.goNewsDetail(item['title']);
+        Navigator.push(
+          context,
+          MaterialPageRoute(builder: (context) => const EventDetailPage()),
+        );
       }),
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }

+ 121 - 0
packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_page.dart

@@ -0,0 +1,121 @@
+import 'package:cpt_notice_board/modules/notice_board/page/notice_board_page.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package: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/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
+
+import '../../../router/page/notice_board_page_router.dart';
+import '../vm/event_detail_vm.dart';
+
+@RoutePage()
+class EventDetailPage extends HookConsumerWidget {
+  const EventDetailPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const EventDetailPageRoute());
+    } else {
+      appRouter.push(const EventDetailPageRoute());
+    }
+  }
+
+  Widget _buildDetailTop(BuildContext context, WidgetRef ref, _vm) {
+    // List itemsList = _vm.state.list.toList();
+    return Column(
+      children: [
+        Column(children: [
+          const Text(
+            'STANDARD OPERATING PROCEDURE FOR REPLACEMENT VEHICLES AND OVERNICHT PARKING VEHICLES(REMINDER)',
+            style: TextStyle(
+                fontSize: 18.0,
+                color: Colors.black,
+                fontWeight: FontWeight.w700), // 设置字体大小
+          ),
+          Row(
+            mainAxisAlignment: MainAxisAlignment.start,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              const MyAssetImage(
+                Assets.noticeBoardAnnouncementDetailOur,
+                width: 15,
+                height: 15,
+              ).marginOnly(right: 8),
+              const Text(
+                'Our ref: ',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w700), // 设置字体大小
+              ),
+              const Text(
+                '2024/CORR/CIR/112.V5',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w400), // 设置字体大小
+              ),
+            ],
+          ).marginOnly(top: 15),
+          const MyAssetImage(
+            Assets.propertyHomeLoanBg,
+            // width: 15,
+            // height: 15,
+          ).marginOnly(top: 25),
+        ]).paddingOnly(bottom: 25),
+        Column(
+          children: [
+            const Column(
+              mainAxisAlignment: MainAxisAlignment.center,
+              crossAxisAlignment: CrossAxisAlignment.center,
+              children: [
+                Text(
+                  'IMPORTANT',
+                  style: TextStyle(
+                      fontSize: 18.0,
+                      color: Colors.black,
+                      fontWeight: FontWeight.w700), // 设置字体大小
+                )
+              ],
+            ).marginOnly(bottom: 25),
+            const Text(
+              'Dear Residents,STANDARD OPERATING PROCEDURE FORREPLACEMENT VEHICLES ANDOVERNICHT PARKING VEHICLES',
+              style: TextStyle(
+                  fontSize: 15.0,
+                  color: Colors.black,
+                  fontWeight: FontWeight.w400), // 设置字体大小
+            ),
+          ],
+        ).paddingOnly(top: 25, bottom: 50),
+      ],
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(eventDetailVmProvider.notifier);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Lift Padding",
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      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)),
+      )),
+    );
+  }
+}

+ 49 - 0
packages/cpt_notice_board/lib/modules/event_detail/page/event_detail_state.dart

@@ -0,0 +1,49 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+EventDetailState eventDetailStateFromJson(String str) => EventDetailState.fromJson(json.decode(str));
+
+String eventDetailStateToJson(EventDetailState data) => json.encode(data.toJson());
+
+class EventDetailState {
+  EventDetailState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory EventDetailState.fromJson(Map<dynamic, dynamic> json) => EventDetailState(
+    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,
+  };
+
+  EventDetailState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return EventDetailState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 70 - 0
packages/cpt_notice_board/lib/modules/event_detail/repository/event_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 '../page/event_detail_state.dart';
+part 'event_detail_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+EventDetailRepository eventDetailRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return EventDetailRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class EventDetailRepository {
+  DioEngine dioEngine;
+
+  EventDetailRepository({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 = EventDetailState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<EventDetailState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 28 - 0
packages/cpt_notice_board/lib/modules/event_detail/repository/event_detail_repository.g.dart

@@ -0,0 +1,28 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'event_detail_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$eventDetailRepositoryHash() =>
+    r'73919ad1420beb9634eb70952bebb29e6b8f21d7';
+
+/// See also [eventDetailRepository].
+@ProviderFor(eventDetailRepository)
+final eventDetailRepositoryProvider = Provider<EventDetailRepository>.internal(
+  eventDetailRepository,
+  name: r'eventDetailRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$eventDetailRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef EventDetailRepositoryRef = ProviderRef<EventDetailRepository>;
+// 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

+ 105 - 0
packages/cpt_notice_board/lib/modules/event_detail/vm/event_detail_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 '../page/event_detail_state.dart';
+import '../repository/event_detail_repository.dart';
+part 'event_detail_vm.g.dart';
+
+@riverpod
+class EventDetailVm extends _$EventDetailVm {
+  late EventDetailRepository eventDetailRepository;
+  EventDetailState initState() {
+    return EventDetailState(
+      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
+  EventDetailState build() {
+    // 引入数据仓库
+    eventDetailRepository = ref.read(eventDetailRepositoryProvider);
+    // 初始化状态
+    EventDetailState 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 eventDetailRepository.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();
+  }
+}

+ 10 - 10
packages/cpt_services/lib/modules/services/vm/services_view_model.g.dart

@@ -1,26 +1,26 @@
 // GENERATED CODE - DO NOT MODIFY BY HAND
 
-part of 'services_view_model.dart';
+part of 'event_detail_vm.dart';
 
 // **************************************************************************
 // RiverpodGenerator
 // **************************************************************************
 
-String _$servicesViewModelHash() => r'f2f28efe8edb9b152be0a1a4de4563d8d50cee29';
+String _$eventDetailVmHash() => r'7fe0ebbd7df15c661751f2b01a9d2efe53f975c7';
 
-/// See also [ServicesViewModel].
-@ProviderFor(ServicesViewModel)
-final servicesViewModelProvider =
-    AutoDisposeNotifierProvider<ServicesViewModel, void>.internal(
-  ServicesViewModel.new,
-  name: r'servicesViewModelProvider',
+/// See also [EventDetailVm].
+@ProviderFor(EventDetailVm)
+final eventDetailVmProvider =
+    AutoDisposeNotifierProvider<EventDetailVm, EventDetailState>.internal(
+  EventDetailVm.new,
+  name: r'eventDetailVmProvider',
   debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
       ? null
-      : _$servicesViewModelHash,
+      : _$eventDetailVmHash,
   dependencies: null,
   allTransitiveDependencies: null,
 );
 
-typedef _$ServicesViewModel = AutoDisposeNotifier<void>;
+typedef _$EventDetailVm = AutoDisposeNotifier<EventDetailState>;
 // 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 - 71
packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart

@@ -128,75 +128,4 @@ class NoticeBoardPage extends HookConsumerWidget {
           },
         ));
   }
-  // @override
-  // Widget build(BuildContext context, WidgetRef ref) {
-  //   final _viewModel = ref.read(noticeBoardVmProvider.notifier);
-  //   return Scaffold(
-  //     // appBar: MyAppBar.titleBar(context, "Test Title"),
-  //     body: Container(
-  //       child: Column(
-  //         children: [
-
-  //           MyAppBar.titleBar(context, "Test Title"),
-  //           const Padding(
-  //             padding: EdgeInsets.fromLTRB(15, 0, 15, 30),
-  //             child: Row(
-  //               mainAxisAlignment: MainAxisAlignment.spaceBetween,
-  //               children: [
-  //                 Column(children: [
-  //                   MyAssetImage(
-  //                     Assets.noticeBoardAnnouncementIcon,
-  //                     height: 70,
-  //                     width: 70,
-  //                   ),
-  //                   Text(
-  //                     "Announcement",
-  //                     style: TextStyle(
-  //                       color: Colors.black,
-  //                       fontSize: 15,
-  //                       fontWeight: FontWeight.bold,
-  //                       height: 1.5,
-  //                     ),
-  //                   )
-  //                 ]),
-  //                 Column(children: [
-  //                   MyAssetImage(
-  //                     Assets.noticeBoardEventIcon,
-  //                     height: 70,
-  //                     width: 70,
-  //                   ),
-  //                   Text(
-  //                     "Event",
-  //                     style: TextStyle(
-  //                       color: Colors.black,
-  //                       fontSize: 15,
-  //                       fontWeight: FontWeight.bold,
-  //                       height: 1.5,
-  //                     ),
-  //                   )
-  //                 ]),
-  //                 Column(children: [
-  //                   MyAssetImage(
-  //                     Assets.noticeBoardDocumentsIcon,
-  //                     height: 70,
-  //                     width: 70,
-  //                   ),
-  //                   Text(
-  //                     "Documents",
-  //                     style: TextStyle(
-  //                       color: Colors.black,
-  //                       fontSize: 15,
-  //                       fontWeight: FontWeight.bold,
-  //                       height: 1.5,
-  //                     ),
-  //                   )
-  //                 ]),
-  //               ],
-  //             ),
-  //           ),
-  //         ],
-  //       ),
-  //     ),
-  //   );
-  // }
 }

+ 1 - 1
packages/cpt_notice_board/lib/modules/notice_board/vm/notice_board_view_model.dart

@@ -82,7 +82,7 @@ class NoticeBoardVm extends _$NoticeBoardVm {
 
     // 初始时导航到子路由
     WidgetsBinding.instance.addPostFrameCallback((_) {
-      switchPage(state.curIdx ?? 0, null, true);
+      // switchPage(state.curIdx ?? 0, null, true);
     });
 
     return state;

+ 1 - 1
packages/cpt_notice_board/lib/modules/notice_board/vm/notice_board_view_model.g.dart

@@ -6,7 +6,7 @@ part of 'notice_board_view_model.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$noticeBoardVmHash() => r'35dfbf4845c7dca80ef6f737fbc529cb1f232a4f';
+String _$noticeBoardVmHash() => r'6692916d5cff8146096cd702bc90d2e5a53b355d';
 
 /// See also [NoticeBoardVm].
 @ProviderFor(NoticeBoardVm)

+ 12 - 0
packages/cpt_notice_board/lib/router/page/notice_board_page_router.dart

@@ -8,6 +8,8 @@ import '../../modules/announ/page/announ_page.dart';
 import '../../modules/event/page/event_page.dart';
 import '../../modules/documents/page/documents_page.dart';
 import '../../modules/announcement_detail/page/announcement_detail_page.dart';
+import '../../modules/event_detail/page/event_detail_page.dart';
+import '../../modules/documents_list/page/documents_list_page.dart';
 
 part 'notice_board_page_router.gr.dart';
 
@@ -44,5 +46,15 @@ class NoticeBoardPageRouter extends _$NoticeBoardPageRouter {
             path: RouterPath.announcementDetail,
             transitionsBuilder: applySlideTransition,
             children: []),
+            CustomRoute(
+            page: EventDetailPageRoute.page,
+            path: RouterPath.eventDetail,
+            transitionsBuilder: applySlideTransition,
+            children: []),
+            CustomRoute(
+            page: DocumentsListPageRoute.page,
+            path: RouterPath.documentsList,
+            transitionsBuilder: applySlideTransition,
+            children: []),
       ];
 }

+ 40 - 0
packages/cpt_notice_board/lib/router/page/notice_board_page_router.gr.dart

@@ -33,6 +33,18 @@ abstract class _$NoticeBoardPageRouter extends RootStackRouter {
         child: const DocumentsPage(),
       );
     },
+    EventDetailPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const EventDetailPage(),
+      );
+    },
+    DocumentsListPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const DocumentsListPage(),
+      );
+    },
     EventPageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
         routeData: routeData,
@@ -91,6 +103,34 @@ class DocumentsPageRoute extends PageRouteInfo<void> {
 }
 
 /// generated route for
+/// [EventDetailPage]
+class EventDetailPageRoute extends PageRouteInfo<void> {
+  const EventDetailPageRoute({List<PageRouteInfo>? children})
+      : super(
+          EventDetailPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'EventDetailPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
+/// [DocumentsListPage]
+class DocumentsListPageRoute extends PageRouteInfo<void> {
+  const DocumentsListPageRoute({List<PageRouteInfo>? children})
+      : super(
+          DocumentsListPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'DocumentsListPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
 /// [EventPage]
 class EventPageRoute extends PageRouteInfo<void> {
   const EventPageRoute({List<PageRouteInfo>? children})

+ 122 - 0
packages/cpt_services/lib/modules/services/dialog/account_deactivation_dialog.dart

@@ -0,0 +1,122 @@
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+
+class AccountDeactivationDialog extends StatelessWidget {
+  VoidCallback confirmAction;
+
+  AccountDeactivationDialog({
+    required this.confirmAction,
+  });
+  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) {
+              selections[index] = val!;
+            },
+            title: Text(items[index]),
+          ),
+        );
+      },
+    )
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.center,
+      mainAxisAlignment: MainAxisAlignment.center,
+      children: [
+        Container(
+          width: double.infinity,
+          height: 55,
+          decoration: BoxDecoration(
+            color: context.appColors.btnBgDefault,
+            borderRadius: const BorderRadius.only(
+              topRight: Radius.circular(15),
+              topLeft: Radius.circular(15),
+            ),
+          ),
+          child: Row(
+            children: [
+              const SizedBox(width: 45),
+              MyTextView(
+                'Choose a Category',
+                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: [
+              CheckboxList(context),
+              Row(
+                children: [
+                  const SizedBox(width: 18),
+                  Expanded(
+                      flex: 1,
+                      child: InkWell(
+                        onTap: () async {
+                          onCancel();
+                          confirmAction();
+                        },
+                        child: MyTextView(
+                          'Ok',
+                          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();
+  }
+}

+ 0 - 33
packages/cpt_services/lib/modules/services/page/services_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/services_page_router.dart';
-import '../../services/vm/services_view_model.dart';
-
-@RoutePage()
-class ServicesPage extends HookConsumerWidget {
-  const ServicesPage({Key? key}) : super(key: key);
-
-  //启动当前页面
-  static void startInstance({BuildContext? context}) {
-    if (context != null) {
-      context.router.push(const ServicesPageRoute());
-    } else {
-      appRouter.push(const ServicesPageRoute());
-    }
-  }
-
-  @override
-  Widget build(BuildContext context, WidgetRef ref) {
-    final _viewModel = ref.read(servicesViewModelProvider.notifier);
-
-    return Scaffold(
-      appBar: AppBar(title: Text("广告服务")),
-      body: Center(
-        child: Text("广告服务的主页面"),
-      ),
-    );
-  }
-}

+ 206 - 0
packages/cpt_services/lib/modules/services/services_page.dart

@@ -0,0 +1,206 @@
+import 'package:shared/utils/log_utils.dart';
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/color_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+
+import '../../../router/page/services_page_router.dart';
+import 'services_view_model.dart';
+
+@RoutePage()
+class ServicesPage extends HookConsumerWidget {
+  const ServicesPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const ServicesPageRoute());
+    } else {
+      appRouter.push(const ServicesPageRoute());
+    }
+  }
+
+  Widget _buildTop(BuildContext context, WidgetRef ref, _vm) {
+    // List itemsList = _vm.state.list.toList();
+    return Container(
+        color: ColorUtils.string2Color('#FFFFFF'),
+        child: Column(children: [
+          Container(
+            width: double.infinity,
+            height: 160,
+            decoration: const BoxDecoration(
+              image: DecorationImage(
+                image: AssetImage(
+                    'packages/cs_resources/${Assets.propertyHomeLoanBg}'),
+                fit: BoxFit.fill, // 设置图片平铺
+              ),
+            ),
+          ).marginOnly(bottom: 15),
+          Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              const Text(
+                'Home Services!',
+                style: TextStyle(
+                    fontSize: 16.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w400), // 设置字体大小
+              ),
+              TextButton(
+                onPressed: () {
+                  _vm.doDeleteAccount();
+                },
+                style: TextButton.styleFrom(
+                  foregroundColor: Colors.black,
+                  backgroundColor: ColorUtils.string2Color('#4161D0'), // 背景颜色
+                  minimumSize: const Size(70, 30), // 最小宽度和高度
+                  padding: const EdgeInsets.symmetric(
+                      horizontal: 11.0, vertical: 9), // 内边距
+                  shape: RoundedRectangleBorder(
+                    borderRadius: BorderRadius.circular(5), // 圆角
+                    side: BorderSide(
+                      color: ColorUtils.string2Color('#4161D0'),
+                      width: 1.0,
+                    ), // 边框
+                  ),
+                ),
+                child: const Text(
+                  'Filter',
+                  style: const TextStyle(
+                    color: Colors.white,
+                  ),
+                ),
+              ),
+            ],
+          ),
+        ])).paddingOnly(top: 10, left: 15, right: 15);
+  }
+
+  Widget _buildItem(BuildContext context, WidgetRef ref, _vm, item) {
+    return Container(
+            width: MediaQuery.of(context).size.width / 2 - 25,
+            height: 146,
+            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(
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Row(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  children: [
+                    Expanded(
+                      child: Text(
+                        maxLines: 2, // 设置最大行数为2
+                        overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                        item['title'],
+                        style: const TextStyle(
+                            fontSize: 16.0,
+                            color: Colors.black,
+                            fontWeight: FontWeight.w700),
+                      ),
+                    )
+                  ],
+                ),
+                Row(
+                  mainAxisAlignment: MainAxisAlignment.end,
+                  children: [
+                    MyAssetImage(
+                      item['price'],
+                      width: 110,
+                      height: 80,
+                    )
+                  ],
+                ),
+              ],
+            ).paddingOnly(top: 15, left: 15))
+        .marginOnly(bottom: 15);
+  }
+
+// list
+  Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
+    List itemsList = _vm.state.list.toList();
+    return ListView.builder(
+      itemCount: itemsList.length,
+      itemBuilder: (context, index) {
+        bool noLast = !(index == itemsList.length - 1);
+        bool isLast = index == itemsList.length - 1;
+        if (index % 2 == 0 && noLast) {
+          return Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              _buildItem(context, ref, _vm, itemsList[index]),
+              _buildItem(context, ref, _vm, itemsList[index + 1]),
+            ],
+          );
+        } else if (index % 2 != 0 && noLast) {
+          return Row();
+        } else if (index % 2 != 0 && isLast) {
+          return Row();
+        } else {
+          return Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              _buildItem(context, ref, _vm, itemsList[index]),
+            ],
+          );
+        }
+        // _buildSaleItem(context, ref, itemsList[index], _vm);
+      },
+    );
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final state = ref.watch(servicesVmProvider);
+    final _vm = ref.read(servicesVmProvider.notifier);
+    return Scaffold(
+      appBar: MyAppBar.appBar(
+        context,
+        "Service",
+        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(
+                        bottom: 15, left: 15, right: 15, top: 15),
+                    child: _buildSaleList(context, ref, _vm)),
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 70 - 0
packages/cpt_services/lib/modules/services/services_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 'services_state.dart';
+part 'services_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+ServicesRepository servicesRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return ServicesRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class ServicesRepository {
+  DioEngine dioEngine;
+
+  ServicesRepository({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 = ServicesState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<ServicesState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 28 - 0
packages/cpt_services/lib/modules/services/services_repository.g.dart

@@ -0,0 +1,28 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'services_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$servicesRepositoryHash() =>
+    r'68370656250ee691445b4293c3b30568d4ebf20b';
+
+/// See also [servicesRepository].
+@ProviderFor(servicesRepository)
+final servicesRepositoryProvider = Provider<ServicesRepository>.internal(
+  servicesRepository,
+  name: r'servicesRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$servicesRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef ServicesRepositoryRef = ProviderRef<ServicesRepository>;
+// 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

+ 50 - 0
packages/cpt_services/lib/modules/services/services_state.dart

@@ -0,0 +1,50 @@
+/// YApi QuickType插件生成,具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation
+
+import 'dart:convert';
+
+ServicesState servicesStateFromJson(String str) =>
+    ServicesState.fromJson(json.decode(str));
+
+String servicesStateToJson(ServicesState data) => json.encode(data.toJson());
+
+class ServicesState {
+  ServicesState({
+    required this.curPage,
+    required this.pageSize,
+    required this.list,
+    required this.filterCount,
+  });
+
+  int curPage;
+  int pageSize;
+  List<Map<String, dynamic>> list;
+  int filterCount;
+
+  factory ServicesState.fromJson(Map<dynamic, dynamic> json) => ServicesState(
+        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,
+      };
+
+  ServicesState copyWith({
+    int? curPage,
+    int? pageSize,
+    List<Map<String, dynamic>>? list,
+    int? filterCount,
+  }) {
+    return ServicesState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      list: list ?? this.list,
+      filterCount: filterCount ?? this.filterCount,
+    );
+  }
+}

+ 175 - 0
packages/cpt_services/lib/modules/services/services_view_model.dart

@@ -0,0 +1,175 @@
+import 'package:cpt_services/modules/services/dialog/account_deactivation_dialog.dart';
+import 'package:cs_resources/generated/assets.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 'services_state.dart';
+import 'services_repository.dart';
+part 'services_view_model.g.dart';
+
+@riverpod
+class ServicesVm extends _$ServicesVm {
+  late ServicesRepository servicesRepository;
+  ServicesState initState() {
+    return ServicesState(
+      curPage: 1,
+      pageSize: 10,
+      list: [
+        {
+          "id": 1,
+          "title": "Part-TimeCleaning",
+          "price": Assets.serviceServiceIcon1,
+        },
+        {
+          "id": 2,
+          "title": "Move in/outcleaning",
+          "price": Assets.serviceServiceIcon2,
+        },
+        {
+          "id": 3,
+          "title": "Laundry AnddryCleaning",
+          "price": Assets.serviceServiceIcon3,
+        },
+        {
+          "id": 4,
+          "title": "SofaCleaning",
+          "price": Assets.serviceServiceIcon4,
+        },
+        {
+          "id": 5,
+          "title": "MattressCleaning",
+          "price": Assets.serviceServiceIcon5,
+        },
+         {
+          "id": 5,
+          "title": "MarbleCleaning",
+          "price": Assets.serviceServiceIcon6,
+        },
+        {
+          "id": 6,
+          "title": "ParquetCleaning",
+          "price": Assets.serviceServiceIcon7,
+        },
+        {
+          "id": 6,
+          "title": "Removalist",
+          "price": Assets.serviceServiceIcon8,
+        },
+         {
+          "id": 7,
+          "title": "CarpetCleaning",
+          "price": Assets.serviceServiceIcon9,
+        },
+        {
+          "id": 7,
+          "title": "InteriorDesign",
+          "price": Assets.serviceServiceIcon10,
+        },
+        {
+          "id": 7,
+          "title": "DomesticHelper agency",
+          "price": Assets.serviceServiceIcon11,
+        },
+        {
+          "id": 7,
+          "title": "Recycling AndDisposal Service",
+          "price": Assets.serviceServiceIcon12,
+        },
+        {
+          "id": 7,
+          "title": "Sell YourPre-Loved Items",
+          "price": Assets.serviceServiceIcon13,
+        },
+        {
+          "id": 7,
+          "title": "UpholsteryCleaning",
+          "price": Assets.serviceServiceIcon14,
+        },
+      ],
+      filterCount: 6,
+    );
+  }
+
+  @override
+  ServicesState build() {
+    // 引入数据仓库
+    servicesRepository = ref.read(servicesRepositoryProvider);
+    // 初始化状态
+    ServicesState 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 servicesRepository.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_services/lib/modules/services/services_view_model.g.dart

@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'services_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$servicesVmHash() => r'066315b56e78a801d048576f75f1e30b4816dbf5';
+
+/// See also [ServicesVm].
+@ProviderFor(ServicesVm)
+final servicesVmProvider =
+    AutoDisposeNotifierProvider<ServicesVm, ServicesState>.internal(
+  ServicesVm.new,
+  name: r'servicesVmProvider',
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$servicesVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$ServicesVm = AutoDisposeNotifier<ServicesState>;
+// 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_services/lib/modules/services/vm/services_view_model.dart

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

+ 1 - 1
packages/cpt_services/lib/router/component/services_component_service.dart

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 
-import '../../modules/services/page/services_page.dart';
+import '../../modules/services/services_page.dart';
 
 part 'services_component_service.g.dart';
 

+ 1 - 1
packages/cpt_services/lib/router/page/services_page_router.dart

@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/path/router_path.dart';
 
-import '../../modules/services/page/services_page.dart';
+import '../../modules/services/services_page.dart';
 
 
 part 'services_page_router.gr.dart';

BIN
packages/cs_resources/assets/service/service_icon_1.png


BIN
packages/cs_resources/assets/service/service_icon_10.png


BIN
packages/cs_resources/assets/service/service_icon_11.png


BIN
packages/cs_resources/assets/service/service_icon_12.png


BIN
packages/cs_resources/assets/service/service_icon_13.png


BIN
packages/cs_resources/assets/service/service_icon_14.png


BIN
packages/cs_resources/assets/service/service_icon_2.png


BIN
packages/cs_resources/assets/service/service_icon_3.png


BIN
packages/cs_resources/assets/service/service_icon_4.png


BIN
packages/cs_resources/assets/service/service_icon_5.png


BIN
packages/cs_resources/assets/service/service_icon_6.png


BIN
packages/cs_resources/assets/service/service_icon_7.png


BIN
packages/cs_resources/assets/service/service_icon_8.png


BIN
packages/cs_resources/assets/service/service_icon_9.png


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

@@ -143,5 +143,19 @@ class Assets {
   static const String propertyRefinancing = 'assets/property/refinancing.webp';
   static const String propertyRent = 'assets/property/rent.webp';
   static const String propertySale = 'assets/property/sale.webp';
+  static const String serviceServiceIcon1 = 'assets/service/service_icon_1.png';
+  static const String serviceServiceIcon10 = 'assets/service/service_icon_10.png';
+  static const String serviceServiceIcon11 = 'assets/service/service_icon_11.png';
+  static const String serviceServiceIcon12 = 'assets/service/service_icon_12.png';
+  static const String serviceServiceIcon13 = 'assets/service/service_icon_13.png';
+  static const String serviceServiceIcon14 = 'assets/service/service_icon_14.png';
+  static const String serviceServiceIcon2 = 'assets/service/service_icon_2.png';
+  static const String serviceServiceIcon3 = 'assets/service/service_icon_3.png';
+  static const String serviceServiceIcon4 = 'assets/service/service_icon_4.png';
+  static const String serviceServiceIcon5 = 'assets/service/service_icon_5.png';
+  static const String serviceServiceIcon6 = 'assets/service/service_icon_6.png';
+  static const String serviceServiceIcon7 = 'assets/service/service_icon_7.png';
+  static const String serviceServiceIcon8 = 'assets/service/service_icon_8.png';
+  static const String serviceServiceIcon9 = 'assets/service/service_icon_9.png';
 
 }

+ 1 - 0
packages/cs_resources/pubspec.yaml

@@ -33,6 +33,7 @@ flutter:
     - assets/main/
     - assets/profile/
     - assets/facility/
+    - assets/service/
 
 
 flutter_intl:

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

@@ -67,7 +67,9 @@ class RouterPath {
   static const announ = 'notice_board/announ';
   static const event = 'notice_board/event';
   static const documents = 'notice_board/documents';
-  static const announcementDetail = '/notice_board/announcement_detail';  
+  static const announcementDetail = '/notice_board/announcement_detail';
+  static const eventDetail = '/notice_board/event_detail';  
+  static const documentsList = '/notice_board/documents_list';
   
 
   //支付