2 次代碼提交 4d4dd50b48 ... ec3ec51fb9

作者 SHA1 備註 提交日期
  “shanwenxin” ec3ec51fb9 Merge branch 'dev' of http://git.wmzhubo.com/guadoutech/YYHome into dev 2 周之前
  “shanwenxin” b0409b832e notice_board页面 2 周之前
共有 19 個文件被更改,包括 554 次插入46 次删除
  1. 8 1
      packages/cpt_notice_board/lib/modules/announ/page/announ_page.dart
  2. 1 1
      packages/cpt_notice_board/lib/modules/announ/repository/announ_repository.g.dart
  3. 3 4
      packages/cpt_notice_board/lib/modules/announ/vm/announ_vm.g.dart
  4. 167 0
      packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_page.dart
  5. 49 0
      packages/cpt_notice_board/lib/modules/announcement_detail/page/announcement_detail_state.dart
  6. 70 0
      packages/cpt_notice_board/lib/modules/announcement_detail/repository/announcement_detail_repository.dart
  7. 30 0
      packages/cpt_notice_board/lib/modules/announcement_detail/repository/announcement_detail_repository.g.dart
  8. 105 0
      packages/cpt_notice_board/lib/modules/announcement_detail/vm/announcement_detail_vm.dart
  9. 27 0
      packages/cpt_notice_board/lib/modules/announcement_detail/vm/announcement_detail_vm.g.dart
  10. 1 1
      packages/cpt_notice_board/lib/modules/documents/vm/documents_vm.g.dart
  11. 1 1
      packages/cpt_notice_board/lib/modules/event/vm/event_vm.g.dart
  12. 62 38
      packages/cpt_notice_board/lib/modules/notice_board/page/notice_board_page.dart
  13. 6 0
      packages/cpt_notice_board/lib/router/page/notice_board_page_router.dart
  14. 20 0
      packages/cpt_notice_board/lib/router/page/notice_board_page_router.gr.dart
  15. 二進制
      packages/cs_resources/assets/notice_board/announcement_detail_date.png
  16. 二進制
      packages/cs_resources/assets/notice_board/announcement_detail_our.png
  17. 二進制
      packages/cs_resources/assets/notice_board/announcement_detail_to.png
  18. 3 0
      packages/cs_resources/lib/generated/assets.dart
  19. 1 0
      packages/cs_router/lib/path/router_path.dart

+ 8 - 1
packages/cpt_notice_board/lib/modules/announ/page/announ_page.dart

@@ -13,6 +13,8 @@ import 'package:cs_resources/generated/assets.dart';
 import '../../../router/page/notice_board_page_router.dart';
 import '../vm/announ_vm.dart';
 
+import '../../announcement_detail/page/announcement_detail_page.dart';
+
 @RoutePage()
 class AnnounPage extends HookConsumerWidget {
   const AnnounPage({Key? key}) : super(key: key);
@@ -82,7 +84,12 @@ class AnnounPage extends HookConsumerWidget {
         ],
       ).onTap(() {
         // 去详情
-        _vm.goNewsDetail(item['title']);
+        // Navigator.push(
+        //   context,
+        //   MaterialPageRoute(builder: (context) => AnnouncementDetailPage()),
+        // );
+        AnnouncementDetailPage.startInstance(context: context);
+        // _vm.goNewsDetail(item['title']);
       }),
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }

+ 1 - 1
packages/cpt_notice_board/lib/modules/announ/repository/announ_repository.g.dart

@@ -6,7 +6,7 @@ part of 'announ_repository.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$announRepositoryHash() => r'e91b26e60af186a007cb785effb50c16b4967969';
+String _$announRepositoryHash() => r'19c24aa5206c63ae40bba0d5f8f7913128cb4f3f';
 
 /// See also [announRepository].
 @ProviderFor(announRepository)

+ 3 - 4
packages/cpt_notice_board/lib/modules/announ/vm/announ_vm.g.dart

@@ -6,7 +6,7 @@ part of 'announ_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$announVmHash() => r'0defb16297b46b5b878b71beb69b7640bb35025c';
+String _$announVmHash() => r'532e6a60c8389d15d513b26c545492ef82041d63';
 
 /// See also [AnnounVm].
 @ProviderFor(AnnounVm)
@@ -14,9 +14,8 @@ final announVmProvider =
     AutoDisposeNotifierProvider<AnnounVm, AnnounState>.internal(
   AnnounVm.new,
   name: r'announVmProvider',
-  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
-      ? null
-      : _$announVmHash,
+  debugGetCreateSourceHash:
+      const bool.fromEnvironment('dart.vm.product') ? null : _$announVmHash,
   dependencies: null,
   allTransitiveDependencies: null,
 );

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

@@ -0,0 +1,167 @@
+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/announcement_detail_vm.dart';
+
+@RoutePage()
+class AnnouncementDetailPage extends HookConsumerWidget {
+  const AnnouncementDetailPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const AnnouncementDetailPageRoute());
+    } else {
+      appRouter.push(const AnnouncementDetailPageRoute());
+    }
+  }
+
+
+  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),
+          Row(
+            mainAxisAlignment: MainAxisAlignment.start,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              const MyAssetImage(
+                Assets.noticeBoardAnnouncementDetailDate,
+                width: 15,
+                height: 15,
+              ).marginOnly(right: 8),
+              const Text(
+                'Date: ',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w700), // 设置字体大小
+              ),
+              const Text(
+                '31 July 2024',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w400), // 设置字体大小
+              ),
+            ],
+          ).marginOnly(top: 15),
+          Row(
+            mainAxisAlignment: MainAxisAlignment.start,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              const MyAssetImage(
+                Assets.noticeBoardAnnouncementDetailTo,
+                width: 15,
+                height: 15,
+              ).marginOnly(right: 8),
+              const Text(
+                'To: ',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w700), // 设置字体大小
+              ),
+              const Text(
+                'All Residents',
+                style: TextStyle(
+                    fontSize: 15.0,
+                    color: Colors.black,
+                    fontWeight: FontWeight.w400), // 设置字体大小
+              ),
+            ],
+          ).marginOnly(top: 15),
+        ]).paddingOnly(bottom: 25).border(bottom: 1,color: ColorUtils.string2Color('#F2F3F6')),
+         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(announcementDetailVmProvider.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/announcement_detail/page/announcement_detail_state.dart

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

+ 70 - 0
packages/cpt_notice_board/lib/modules/announcement_detail/repository/announcement_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/announcement_detail_state.dart';
+part 'announcement_detail_repository.g.dart';
+
+@Riverpod(keepAlive: true)
+AnnouncementDetailRepository announcementDetailRepository(Ref ref) {
+  final dioEngine = ref.watch(dioEngineProvider);
+  return AnnouncementDetailRepository(dioEngine: dioEngine);
+}
+
+/*
+ * 数据仓库
+ */
+class AnnouncementDetailRepository {
+  DioEngine dioEngine;
+
+  AnnouncementDetailRepository({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 = AnnouncementDetailState.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<AnnouncementDetailState>(data: data);
+    }
+    return result.convert();
+  }
+
+
+}

+ 30 - 0
packages/cpt_notice_board/lib/modules/announcement_detail/repository/announcement_detail_repository.g.dart

@@ -0,0 +1,30 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'announcement_detail_repository.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$announcementDetailRepositoryHash() =>
+    r'8350d6909d710f533400f2fe92ca93de18b7bfed';
+
+/// See also [announcementDetailRepository].
+@ProviderFor(announcementDetailRepository)
+final announcementDetailRepositoryProvider =
+    Provider<AnnouncementDetailRepository>.internal(
+  announcementDetailRepository,
+  name: r'announcementDetailRepositoryProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$announcementDetailRepositoryHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef AnnouncementDetailRepositoryRef
+    = ProviderRef<AnnouncementDetailRepository>;
+// 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/announcement_detail/vm/announcement_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/announcement_detail_state.dart';
+import '../repository/announcement_detail_repository.dart';
+part 'announcement_detail_vm.g.dart';
+
+@riverpod
+class AnnouncementDetailVm extends _$AnnouncementDetailVm {
+  late AnnouncementDetailRepository announcementDetailRepository;
+  AnnouncementDetailState initState() {
+    return AnnouncementDetailState(
+      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
+  AnnouncementDetailState build() {
+    // 引入数据仓库
+    announcementDetailRepository = ref.read(announcementDetailRepositoryProvider);
+    // 初始化状态
+    AnnouncementDetailState 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 announcementDetailRepository.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();
+  }
+}

+ 27 - 0
packages/cpt_notice_board/lib/modules/announcement_detail/vm/announcement_detail_vm.g.dart

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

+ 1 - 1
packages/cpt_notice_board/lib/modules/documents/vm/documents_vm.g.dart

@@ -6,7 +6,7 @@ part of 'documents_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$documentsVmHash() => r'17fac5225fa9da020cd0a78c745412eb3ded2770';
+String _$documentsVmHash() => r'066315b56e78a801d048576f75f1e30b4816dbf5';
 
 /// See also [DocumentsVm].
 @ProviderFor(DocumentsVm)

+ 1 - 1
packages/cpt_notice_board/lib/modules/event/vm/event_vm.g.dart

@@ -6,7 +6,7 @@ part of 'event_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$eventVmHash() => r'49b73a9a511244c2542f2d4d831070a7996484ff';
+String _$eventVmHash() => r'e773ac50dffaf8bb4d820118ee89a83aed303a76';
 
 /// See also [EventVm].
 @ProviderFor(EventVm)

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

@@ -1,3 +1,4 @@
+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';
@@ -27,8 +28,10 @@ class NoticeBoardPage extends HookConsumerWidget {
   }
 
   // 顶部tab 切换
-  Widget _buildTopSection(BuildContext context, WidgetRef ref, _vm) {
+  Widget _buildTopSection(
+      BuildContext context, WidgetRef ref, _vm, tabsRouter) {
     final topSectionsData = _vm.topSectionsData;
+    final currentTabIdx = tabsRouter.activeIndex;
     // 监听 curIdx 的变化
     final curIdx =
         ref.watch(noticeBoardVmProvider.select((value) => value.curIdx));
@@ -44,29 +47,49 @@ class NoticeBoardPage extends HookConsumerWidget {
               flex: 1,
               child: Column(
                 children: [
-                  MyAssetImage(
-                    item['icon'],
+                  Container(
                     width: MediaQuery.of(context).size.width /
                             topSectionsData.length -
                         36,
                     height: 70,
-                  ).onTap(
-                    () {
-                      _vm.switchPage(index, context);
-                    },
-                    type: ClickType.throttle,
+                    decoration: BoxDecoration(
+                      // color: currentTabIdx == index ? ColorUtils.string2Color('#E6F2FF') : Colors.white,
+                      shape: BoxShape.circle, // 设置为圆形
+                      boxShadow: tabsRouter.activeIndex == index
+                          ? [
+                              BoxShadow(
+                                color: context
+                                    .appColors.tabLightBlueShadow, // 设置阴影颜色
+                                blurRadius: 5, // 设置模糊半径
+                                spreadRadius: 0.05, // 控制阴影扩散
+                                offset: const Offset(0, 4), // 设置阴影偏移量
+                              ),
+                            ]
+                          : [], // 未选中时无阴影,
+                    ),
+                    child: MyAssetImage(
+                      item['icon'],
+                      width: MediaQuery.of(context).size.width /
+                              topSectionsData.length -
+                          36,
+                      height: 70,
+                    ).onTap(
+                      () {
+                        tabsRouter.setActiveIndex(index);
+                      },
+                      type: ClickType.throttle,
+                    ),
                   ),
                   SizedBox.fromSize(size: const Size(0, 9)),
-                  Text(
+                  MyTextView(
                     item['title'],
                     maxLines: 1, // 设置最大行数为2
-                    overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-                    style: TextStyle(
-                        fontSize: 13.0,
-                        color: curIdx == index
-                            ? ColorUtils.string2Color('#4161D0')
-                            : Colors.black,
-                        fontWeight: FontWeight.w500), // 设置字体大小
+                    isTextEllipsis: true, // 超出部分用省略号表示
+                    fontSize: 13,
+                    textColor: currentTabIdx == index
+                        ? ColorUtils.string2Color('#4161D0')
+                        : Colors.black,
+                    isFontMedium: true,
                   ),
                 ],
               ),
@@ -80,29 +103,30 @@ class NoticeBoardPage extends HookConsumerWidget {
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final _vm = ref.read(noticeBoardVmProvider.notifier);
-    return DefaultTabController(
-      length: 4,
-      child: Scaffold(
-          appBar: AppBar(
-            title: const Text("Property"),
-            bottomOpacity: 0.0, // 取消下横线
-            titleTextStyle: const TextStyle(color: Colors.black),
-          ),
-          body: Row(
-            children: [
-              Expanded(
-                child: Column(
-                  children: [
-                    _buildTopSection(context, ref, _vm),
-                    const Expanded(
-                      child: AutoRouter(),
-                    )
-                  ],
+    return Scaffold(
+        appBar: MyAppBar.appBar(
+          context,
+          "Property",
+          backgroundColor: context.appColors.whiteBG,
+        ),
+        body: AutoTabsRouter.pageView(
+          routes: const [
+            AnnounPageRoute(),
+            EventPageRoute(),
+            DocumentsPageRoute(),
+          ],
+          builder: (context, child, pageController) {
+            final tabsRouter = AutoTabsRouter.of(context);
+            return Column(
+              children: [
+                _buildTopSection(context, ref, _vm, tabsRouter),
+                Expanded(
+                  child: child,
                 ),
-              )
-            ],
-          )),
-    );
+              ],
+            );
+          },
+        ));
   }
   // @override
   // Widget build(BuildContext context, WidgetRef ref) {

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

@@ -7,6 +7,7 @@ import '../../modules/notice_board/page/notice_board_page.dart';
 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';
 
 part 'notice_board_page_router.gr.dart';
 
@@ -38,5 +39,10 @@ class NoticeBoardPageRouter extends _$NoticeBoardPageRouter {
                 transitionsBuilder: applySlideTransition,
               ),
             ]),
+            CustomRoute(
+            page: AnnouncementDetailPageRoute.page,
+            path: RouterPath.announcementDetail,
+            transitionsBuilder: applySlideTransition,
+            children: []),
       ];
 }

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

@@ -21,6 +21,12 @@ abstract class _$NoticeBoardPageRouter extends RootStackRouter {
         child: const AnnounPage(),
       );
     },
+    AnnouncementDetailPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const AnnouncementDetailPage(),
+      );
+    },
     DocumentsPageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
         routeData: routeData,
@@ -57,6 +63,20 @@ class AnnounPageRoute extends PageRouteInfo<void> {
 }
 
 /// generated route for
+/// [AnnouncementDetailPage]
+class AnnouncementDetailPageRoute extends PageRouteInfo<void> {
+  const AnnouncementDetailPageRoute({List<PageRouteInfo>? children})
+      : super(
+          AnnouncementDetailPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'AnnouncementDetailPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
 /// [DocumentsPage]
 class DocumentsPageRoute extends PageRouteInfo<void> {
   const DocumentsPageRoute({List<PageRouteInfo>? children})

二進制
packages/cs_resources/assets/notice_board/announcement_detail_date.png


二進制
packages/cs_resources/assets/notice_board/announcement_detail_our.png


二進制
packages/cs_resources/assets/notice_board/announcement_detail_to.png


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

@@ -96,6 +96,9 @@ class Assets {
   static const String mainVisitorNow = 'assets/main/visitor_now.webp';
   static const String mainVisitorNowImg = 'assets/main/visitor_now_img.webp';
   static const String mainVisitorRegisterDate = 'assets/main/visitor_register_date.webp';
+  static const String noticeBoardAnnouncementDetailDate = 'assets/notice_board/announcement_detail_date.png';
+  static const String noticeBoardAnnouncementDetailOur = 'assets/notice_board/announcement_detail_our.png';
+  static const String noticeBoardAnnouncementDetailTo = 'assets/notice_board/announcement_detail_to.png';
   static const String noticeBoardAnnouncementIcon = 'assets/notice_board/announcement_icon.png';
   static const String noticeBoardDocumentsIcon = 'assets/notice_board/documents_icon.png';
   static const String noticeBoardEventIcon = 'assets/notice_board/event_icon.png';

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

@@ -60,6 +60,7 @@ 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';  
   
 
   //支付