glglove 4 months ago
parent
commit
5049afa98b
59 changed files with 405 additions and 48 deletions
  1. 1 1
      app/android/app/build.gradle
  2. 3 0
      app/devtools_options.yaml
  3. 3 0
      packages/cpt_main/devtools_options.yaml
  4. 2 2
      packages/cpt_property/lib/modules/ioan/page/property_ioan_page.dart
  5. 134 2
      packages/cpt_property/lib/modules/news/page/property_news_page.dart
  6. 54 0
      packages/cpt_property/lib/modules/news/page/property_news_state.dart
  7. 27 3
      packages/cpt_property/lib/modules/news/vm/property_news_vm.dart
  8. 3 3
      packages/cpt_property/lib/modules/news/vm/property_news_vm.g.dart
  9. 41 0
      packages/cpt_property/lib/modules/news_detail/property_news_detail_page.dart
  10. 14 0
      packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.dart
  11. 27 0
      packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.g.dart
  12. 12 9
      packages/cpt_property/lib/modules/property/page/property_page.dart
  13. 7 7
      packages/cpt_property/lib/modules/property/vm/property_vm.dart
  14. 1 1
      packages/cpt_property/lib/modules/property/vm/property_vm.g.dart
  15. 7 0
      packages/cpt_property/lib/router/page/property_page_router.dart
  16. 20 0
      packages/cpt_property/lib/router/page/property_page_router.gr.dart
  17. 6 0
      packages/cpt_property/pubspec.yaml
  18. 3 0
      packages/cpt_rewards/devtools_options.yaml
  19. 14 7
      packages/cs_domain/lib/generated/json/base/json_convert_content.dart
  20. BIN
      packages/cs_resources/assets/community/camera.webp
  21. BIN
      packages/cs_resources/assets/community/comments.webp
  22. BIN
      packages/cs_resources/assets/community/follow_add.webp
  23. BIN
      packages/cs_resources/assets/community/garage_sale.webp
  24. BIN
      packages/cs_resources/assets/community/like.webp
  25. BIN
      packages/cs_resources/assets/community/like_active.webp
  26. BIN
      packages/cs_resources/assets/community/nes_feed.webp
  27. BIN
      packages/cs_resources/assets/community/share.webp
  28. BIN
      packages/cs_resources/assets/property/advice_pic.webp
  29. BIN
      packages/cs_resources/assets/property/advice_pic@2x.png
  30. BIN
      packages/cs_resources/assets/property/approval.webp
  31. BIN
      packages/cs_resources/assets/property/approval@2x.png
  32. BIN
      packages/cs_resources/assets/property/collection.webp
  33. BIN
      packages/cs_resources/assets/property/collection_active.webp
  34. BIN
      packages/cs_resources/assets/property/conveyancing_lawyer.webp
  35. BIN
      packages/cs_resources/assets/property/conveyancing_lawyer@2x.png
  36. BIN
      packages/cs_resources/assets/property/home_equity_loans.webp
  37. BIN
      packages/cs_resources/assets/property/home_equity_loans@2x.png
  38. BIN
      packages/cs_resources/assets/property/home_loan_bg.webp
  39. BIN
      packages/cs_resources/assets/property/home_loan_bg@2x.png
  40. BIN
      packages/cs_resources/assets/property/ioan.webp
  41. BIN
      packages/cs_resources/assets/property/ioan@2x.png
  42. BIN
      packages/cs_resources/assets/property/new_home_loans.webp
  43. BIN
      packages/cs_resources/assets/property/new_home_loans@2x.png
  44. BIN
      packages/cs_resources/assets/property/news-item-bg.webp
  45. BIN
      packages/cs_resources/assets/property/news.webp
  46. BIN
      packages/cs_resources/assets/property/news@2x.png
  47. BIN
      packages/cs_resources/assets/property/our_partners.webp
  48. BIN
      packages/cs_resources/assets/property/our_partners@2x.png
  49. BIN
      packages/cs_resources/assets/property/overseas_home_loan.webp
  50. BIN
      packages/cs_resources/assets/property/overseas_home_loan@2x.png
  51. BIN
      packages/cs_resources/assets/property/refinancing.webp
  52. BIN
      packages/cs_resources/assets/property/refinancing@2x.png
  53. BIN
      packages/cs_resources/assets/property/rent.webp
  54. BIN
      packages/cs_resources/assets/property/rent@2x.png
  55. BIN
      packages/cs_resources/assets/property/sale.webp
  56. BIN
      packages/cs_resources/assets/property/sale@2x.png
  57. 24 13
      packages/cs_resources/lib/generated/assets.dart
  58. 1 0
      packages/cs_resources/pubspec.yaml
  59. 1 0
      packages/cs_router/lib/path/router_path.dart

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

@@ -49,7 +49,7 @@ android {
     }
 
     defaultConfig {
-        applicationId "com.hongyegroup.property_management"
+        applicationId "com.hongyegroup.proanperty_management"
         minSdkVersion 21
         targetSdkVersion 34
         versionCode 100          //Android打包上线记得要加固并重新签名再传

+ 3 - 0
app/devtools_options.yaml

@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:

+ 3 - 0
packages/cpt_main/devtools_options.yaml

@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:

+ 2 - 2
packages/cpt_property/lib/modules/ioan/page/property_ioan_page.dart

@@ -29,8 +29,8 @@ class PropertyIoanPage extends HookConsumerWidget {
       // appBar: AppBar(title: Text("资产")),
       body: Column(
         children: [
-          MyAssetImage(
-            Assets.propertyIoan2x,
+           MyAssetImage(
+            Assets.propertyIoan,
             width: 100,
             height: 100,
           ),

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

@@ -1,7 +1,13 @@
+import 'package:cpt_property/modules/property/page/property_page.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/widget_export.dart';
+import 'package:cs_resources/generated/assets.dart';
 
 import '../../../router/page/property_page_router.dart';
 import '../vm/property_news_vm.dart';
@@ -19,14 +25,140 @@ class PropertyNewsPage extends HookConsumerWidget {
     }
   }
 
+  Widget _buildItemLeftSection(BuildContext context,WidgetRef ref, String item, _vm) {
+    return Container(
+      // color: Colors.blue,
+      width: 100,
+      height: 117.5,
+      child: const Center(
+        child: MyAssetImage(
+          Assets.propertyNewsItemBg,
+          width: 60.5,
+          height: 50.5,
+        ),
+      )
+    ).marginOnly(right: 17.5);
+  }
+
+  Widget _buildItemRightSection(BuildContext context,WidgetRef ref, String item, _vm) {
+    return Container(
+      color: Colors.white,
+      padding: EdgeInsets.only(top: 10.5, bottom: 10.5),
+      child: Container(
+        child: Stack(
+          children: [
+            const Column(
+              mainAxisAlignment: MainAxisAlignment.start,
+              crossAxisAlignment: CrossAxisAlignment.start,
+              children: [
+                Row(
+                  children: [
+                    Expanded(
+                      child: Text(
+                        "Developer'snew homesales shrink to lowest forthe",
+                        maxLines: 2, // 设置最大行数为2
+                        overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                        style: TextStyle(fontSize: 16.0, color: Colors.black, fontWeight: FontWeight.w500), // 设置字体大小
+                      ),
+                    )
+                  ],
+                ),
+                SizedBox(height: 10.5),
+                Row(
+                  children: [
+                    Expanded(
+                      child: Text(
+                        'New home sales in August shrank 64% and are downand are downand are downand are down and are down',
+                        maxLines: 2, // 设置最大行数为2
+                        overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                        style: TextStyle(fontSize: 12.0, color: Colors.black), // 设置字体大小
+                      ),
+                    )
+                  ]
+                ),
+                SizedBox(height: 12.5),
+                Row(
+                    children: [
+                      Expanded(
+                        child: Text(
+                          '1H Ago',
+                          maxLines: 1, // 设置最大行数为2
+                          overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                          style: TextStyle(fontSize: 12.0, color: Colors.black), // 设置字体大小
+                        ),
+                      )
+                    ]
+                ),
+              ],
+            ),
+            Positioned(
+              right: 5,
+              bottom: 0,
+              child: const MyAssetImage(Assets.propertyCollection,width:22,height: 20.5,).onTap((){
+                Log.d("点击了收藏按钮");
+              }),
+            ),
+          ],
+        ),
+      ),
+    );
+  }
+
+  // listitem
+  Widget _buildNewsItem(BuildContext context,WidgetRef ref, String item, _vm) {
+    return Row(
+      mainAxisAlignment: MainAxisAlignment.center,
+      crossAxisAlignment: CrossAxisAlignment.center,
+      mainAxisSize: MainAxisSize.max,
+      children: [
+        Container(
+          width: MediaQuery.of(context).size.width - 30,
+          margin: const EdgeInsets.only(left: 15,right: 15,top: 12.5),
+          child: Row(
+            mainAxisAlignment: MainAxisAlignment.start,
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              _buildItemLeftSection(context, ref, item, _vm),
+              Expanded(child: _buildItemRightSection(context, ref, item, _vm)),
+            ],
+          ),
+        ).constrained(
+          minHeight: 117.5,
+        ),
+      ],
+    ).onTap((){
+      // 去详情
+      _vm.goNewsDetail(item);
+    });
+  }
+
+  // list
+  Widget _buildNewsList(BuildContext context, WidgetRef ref, _vm) {
+    List items = List.generate(20, (index) => "Item $index");
+    return ListView.builder(
+      itemCount: items.length,
+      itemBuilder: (context, index) {
+        return _buildNewsItem(context, ref, items[index], _vm);
+      },
+    );
+  }
+
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final _vm = ref.read(propertyNewsVmProvider.notifier);
 
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
-      body: Center(
-        child: Text("房屋news的主页面"),
+      body: Container(
+        child: EasyRefresh(
+          onLoad: () async{
+            _vm.initListData();
+          },
+          onRefresh: () async{
+            _vm.refreshListData();
+          },
+          child: _buildNewsList(context, ref, _vm),
+        )
       ),
     );
   }

+ 54 - 0
packages/cpt_property/lib/modules/news/page/property_news_state.dart

@@ -0,0 +1,54 @@
+class PropertyNewsState {
+  int? id;
+  String? title;
+  String? description;
+  String? time;
+  int? isCollection;
+  String? pic;
+
+  PropertyNewsState(
+      {this.id,
+        this.title,
+        this.description,
+        this.time,
+        this.isCollection,
+        this.pic});
+
+  PropertyNewsState.fromJson(Map<String, dynamic> json) {
+    id = json['id'];
+    title = json['title'];
+    description = json['description'];
+    time = json['time'];
+    isCollection = json['isCollection'];
+    pic = json['pic'];
+  }
+
+  Map<String, dynamic> toJson() {
+    final Map<String, dynamic> data = new Map<String, dynamic>();
+    data['id'] = id;
+    data['title'] = title;
+    data['description'] = description;
+    data['time'] = time;
+    data['isCollection'] = isCollection;
+    data['pic'] = pic;
+    return data;
+  }
+
+  PropertyNewsState CopyWith({
+    required id,
+    required title,
+    required description,
+    required time,
+    required isCollection,
+    required pic,
+  }){
+    return PropertyNewsState(
+      id: id?? this.id,
+      title: title?? this.title,
+      description: description?? this.description,
+      time: time?? this.time,
+      isCollection: isCollection?? this.isCollection,
+      pic: pic?? this.pic,
+    );
+  }
+}

+ 27 - 3
packages/cpt_property/lib/modules/news/vm/property_news_vm.dart

@@ -1,14 +1,38 @@
 
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import '../page/property_news_state.dart';
 
 part 'property_news_vm.g.dart';
 
 @riverpod
 class PropertyNewsVm extends _$PropertyNewsVm {
+    PropertyNewsState initState() {
+      return PropertyNewsState();
+    }
 
-  @override
-  void build(){
+    @override
+    PropertyNewsState build(){
+       PropertyNewsState state = initState();
+       return state;
+    }
 
-  }
+    Future initListData() async {
+      Log.d("initListData");
+      await Future.delayed(const Duration(seconds: 2));
+      // items = List.generate(20, (index) => "Item $index");
+    }
 
+    Future refreshListData() async {
+      await Future.delayed(const Duration(seconds: 2));
+      // setState(() {
+      //   items.addAll(List.generate(20, (index) => "Item ${items.length + index}"));
+      // });
+    }
+
+    // 去新闻详情页
+    void goNewsDetail(String item) {
+      Log.d("goNewsDetail");
+      // PropertyPage.startInstance(context: context, item: item);
+    }
 }

+ 3 - 3
packages/cpt_property/lib/modules/news/vm/property_news_vm.g.dart

@@ -6,12 +6,12 @@ part of 'property_news_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$propertyNewsVmHash() => r'f18922e4ca3d2a59ba6f2504064b9bb073719979';
+String _$propertyNewsVmHash() => r'7aa372ad062545fb05c83ce174d69aaa6c5e1f7a';
 
 /// See also [PropertyNewsVm].
 @ProviderFor(PropertyNewsVm)
 final propertyNewsVmProvider =
-    AutoDisposeNotifierProvider<PropertyNewsVm, void>.internal(
+    AutoDisposeNotifierProvider<PropertyNewsVm, PropertyNewsState>.internal(
   PropertyNewsVm.new,
   name: r'propertyNewsVmProvider',
   debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
@@ -21,6 +21,6 @@ final propertyNewsVmProvider =
   allTransitiveDependencies: null,
 );
 
-typedef _$PropertyNewsVm = AutoDisposeNotifier<void>;
+typedef _$PropertyNewsVm = AutoDisposeNotifier<PropertyNewsState>;
 // 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

+ 41 - 0
packages/cpt_property/lib/modules/news_detail/property_news_detail_page.dart

@@ -0,0 +1,41 @@
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/my_load_image.dart';
+
+import '../../router/page/property_page_router.dart';
+import './property_news_detail_vm.dart';
+
+@RoutePage()
+class PropertyNewsDetailPageRoute extends HookConsumerWidget {
+  const PropertyNewsDetailPageRoute({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const PropertyIoanPageRoute());
+    } else {
+      appRouter.push(const PropertyIoanPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final _vm = ref.read(propertyNewsDetailVmProvider.notifier);
+
+    return Scaffold(
+      appBar: AppBar(title: Text("新闻详情页面")),
+      body: Column(
+        children: [
+          MyAssetImage(
+            Assets.propertyIoan,
+            width: 100,
+            height: 100,
+          ),
+        ],
+      ),
+    );
+  }
+}

+ 14 - 0
packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.dart

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

+ 27 - 0
packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.g.dart

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

+ 12 - 9
packages/cpt_property/lib/modules/property/page/property_page.dart

@@ -33,12 +33,13 @@ class PropertyPage extends HookConsumerWidget {
           crossAxisAlignment: CrossAxisAlignment.center,
           children: List.generate(topSectionsData.length, (index) {
             final item = topSectionsData[index];
-            return Container(
+            return Flexible(
+              flex: 1,
               child: Column(
                 children: [
                   MyAssetImage(
                     item['icon'],
-                    width: 70,
+                    width: MediaQuery.of(context).size.width / topSectionsData.length - 36,
                     height: 70,
                   ).onTap(
                     () {
@@ -46,10 +47,12 @@ class PropertyPage extends HookConsumerWidget {
                     },
                     type: ClickType.throttle,
                   ),
-                  TextButton(
-                    onPressed: () {
-                    },
-                    child: Text(item['title']),
+                  SizedBox.fromSize(size: const Size(0, 9)),
+                  Text(
+                    item['title'],
+                    maxLines: 1, // 设置最大行数为2
+                    overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                    style: const TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w500), // 设置字体大小
                   ),
                 ],
               ),
@@ -67,9 +70,9 @@ class PropertyPage extends HookConsumerWidget {
       length: 4,
       child: Scaffold(
           appBar: AppBar(
-            title: Text("Property"),
+            title: const Text("Property"),
             bottomOpacity: 0.0, // 取消下横线
-            titleTextStyle: TextStyle(color: Colors.black),
+            titleTextStyle: const TextStyle(color: Colors.black),
           ),
           body: Row(
             children: [
@@ -77,7 +80,7 @@ class PropertyPage extends HookConsumerWidget {
                 child: Column(
                   children: [
                     _buildTopSection(context, ref, _vm),
-                    Expanded(
+                    const Expanded(
                       child: AutoRouter(),
                     )
                   ],

+ 7 - 7
packages/cpt_property/lib/modules/property/vm/property_vm.dart

@@ -36,25 +36,25 @@ class PropertyVm extends _$PropertyVm {
       topSectionsData: [
         {
           "title": "Sale",
-          "icon": Assets.propertySale2x,
+          "icon": Assets.propertySale,
           "pageStartInstanceFn": PropertySalePage.startInstance,
           "page": const PropertySalePage(),
         },
         {
           "title": "Rent",
-          "icon": Assets.propertyRent2x,
+          "icon": Assets.propertyRent,
           "pageStartInstanceFn": PropertyRentPage.startInstance,
           "page": const PropertyRentPage(),
         },
         {
           "title": "Ioan",
-          "icon": Assets.propertyIoan2x,
+          "icon": Assets.propertyIoan,
           "pageStartInstanceFn": PropertyIoanPage.startInstance,
           "page": const PropertyIoanPage(),
         },
         {
           "title": "News",
-          "icon": Assets.propertyNews2x,
+          "icon": Assets.propertyNews,
           "pageStartInstanceFn": PropertyNewsPage.startInstance,
           "page": const PropertyNewsPage(),
         }
@@ -70,9 +70,9 @@ class PropertyVm extends _$PropertyVm {
 
   // 页面切换
   switchPage(int index, context){
-    final _topSectionsData = state.topSectionsData;
-    Log.d("当前页面${_topSectionsData[index]['pageStartInstanceFn']}");
-    final pageStartInstanceFn = _topSectionsData[index]['pageStartInstanceFn'] as Function({BuildContext? context});
+    final List<Map<String, dynamic>> topSectionsData = state.topSectionsData;
+    Log.d("当前页面${topSectionsData[index]['pageStartInstanceFn']}");
+    final pageStartInstanceFn = topSectionsData[index]['pageStartInstanceFn'] as Function({BuildContext? context});
     pageStartInstanceFn(context:context);
   }
 

+ 1 - 1
packages/cpt_property/lib/modules/property/vm/property_vm.g.dart

@@ -6,7 +6,7 @@ part of 'property_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$propertyVmHash() => r'f98e7cc04acc4620ceeab7bf45bdc1459648e4b3';
+String _$propertyVmHash() => r'2d8b2322ab1a903277de8ede5fc484003e901dc8';
 
 /// See also [PropertyVm].
 @ProviderFor(PropertyVm)

+ 7 - 0
packages/cpt_property/lib/router/page/property_page_router.dart

@@ -6,6 +6,7 @@ import 'package:router/path/router_path.dart';
 import '../../modules/property/page/property_page.dart';
 import '../../modules/ioan/page/property_ioan_page.dart';
 import '../../modules/news/page/property_news_page.dart';
+import '../../modules/news_detail/property_news_detail_page.dart';
 import '../../modules/sale/page/property_sale_page.dart';
 import '../../modules/rent/page/property_rent_page.dart';
 
@@ -46,5 +47,11 @@ class PropertyPageRouter extends _$PropertyPageRouter {
         ),
       ]
     ),
+    // 新闻详情页面
+    CustomRoute(
+      page: PropertyPageRoute.page,
+      path: RouterPath.propertyNewsDetail,
+      transitionsBuilder: applySlideTransition,
+    ),
   ];
 }

+ 20 - 0
packages/cpt_property/lib/router/page/property_page_router.gr.dart

@@ -21,6 +21,12 @@ abstract class _$PropertyPageRouter extends RootStackRouter {
         child: const PropertyIoanPage(),
       );
     },
+    PropertyNewsDetailPageRouteRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const PropertyNewsDetailPageRoute(),
+      );
+    },
     PropertyNewsPageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
         routeData: routeData,
@@ -63,6 +69,20 @@ class PropertyIoanPageRoute extends PageRouteInfo<void> {
 }
 
 /// generated route for
+/// [PropertyNewsDetailPageRoute]
+class PropertyNewsDetailPageRouteRoute extends PageRouteInfo<void> {
+  const PropertyNewsDetailPageRouteRoute({List<PageRouteInfo>? children})
+      : super(
+          PropertyNewsDetailPageRouteRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'PropertyNewsDetailPageRouteRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}
+
+/// generated route for
 /// [PropertyNewsPage]
 class PropertyNewsPageRoute extends PageRouteInfo<void> {
   const PropertyNewsPageRoute({List<PageRouteInfo>? children})

+ 6 - 0
packages/cpt_property/pubspec.yaml

@@ -48,6 +48,9 @@ dependencies:
   # Hooks 简化 Riverpod 获取
   hooks_riverpod: ^2.5.1
 
+  # freezed 注解
+  freezed_annotation: ^2.2.0
+
 dev_dependencies:
   flutter_test:
     sdk: flutter
@@ -66,6 +69,9 @@ dev_dependencies:
   # AutoRouter 生成代码
   auto_route_generator: ^8.0.0
 
+  # json序列化
+  freezed: ^2.2.0
+
 
 flutter:
   uses-material-design: true

+ 3 - 0
packages/cpt_rewards/devtools_options.yaml

@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:

+ 14 - 7
packages/cs_domain/lib/generated/json/base/json_convert_content.dart

@@ -62,12 +62,14 @@ class JsonConvert {
     }
   }
 
-  List<T?>? convertList<T>(List<dynamic>? value, {EnumConvertFunction? enumConvert}) {
+  List<T?>? convertList<T>(List<dynamic>? value,
+      {EnumConvertFunction? enumConvert}) {
     if (value == null) {
       return null;
     }
     try {
-      return value.map((dynamic e) => _asT<T>(e, enumConvert: enumConvert)).toList();
+      return value.map((dynamic e) => _asT<T>(e, enumConvert: enumConvert))
+          .toList();
     } catch (e, stackTrace) {
       debugPrint('asT<$T> $e $stackTrace');
       if (onError != null) {
@@ -77,12 +79,14 @@ class JsonConvert {
     }
   }
 
-  List<T>? convertListNotNull<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
+  List<T>? convertListNotNull<T>(dynamic value,
+      {EnumConvertFunction? enumConvert}) {
     if (value == null) {
       return null;
     }
     try {
-      return (value as List<dynamic>).map((dynamic e) => _asT<T>(e, enumConvert: enumConvert)!).toList();
+      return (value as List<dynamic>).map((dynamic e) =>
+      _asT<T>(e, enumConvert: enumConvert)!).toList();
     } catch (e, stackTrace) {
       debugPrint('asT<$T> $e $stackTrace');
       if (onError != null) {
@@ -130,7 +134,8 @@ class JsonConvert {
           return covertFunc(Map<String, dynamic>.from(value)) as T;
         }
       } else {
-        throw UnimplementedError('$type unimplemented,you can try running the app again');
+        throw UnimplementedError(
+            '$type unimplemented,you can try running the app again');
       }
     }
   }
@@ -138,7 +143,8 @@ class JsonConvert {
   //list is returned by type
   static M? _getListChildType<M>(List<Map<String, dynamic>> data) {
     if (<ServerTime>[] is M) {
-      return data.map<ServerTime>((Map<String, dynamic> e) => ServerTime.fromJson(e)).toList() as M;
+      return data.map<ServerTime>((Map<String, dynamic> e) =>
+          ServerTime.fromJson(e)).toList() as M;
     }
 
     debugPrint("$M not found");
@@ -151,7 +157,8 @@ class JsonConvert {
       return json;
     }
     if (json is List) {
-      return _getListChildType<M>(json.map((dynamic e) => e as Map<String, dynamic>).toList());
+      return _getListChildType<M>(
+          json.map((dynamic e) => e as Map<String, dynamic>).toList());
     } else {
       return jsonConvert.convert<M>(json);
     }

BIN
packages/cs_resources/assets/community/camera.webp


BIN
packages/cs_resources/assets/community/comments.webp


BIN
packages/cs_resources/assets/community/follow_add.webp


BIN
packages/cs_resources/assets/community/garage_sale.webp


BIN
packages/cs_resources/assets/community/like.webp


BIN
packages/cs_resources/assets/community/like_active.webp


BIN
packages/cs_resources/assets/community/nes_feed.webp


BIN
packages/cs_resources/assets/community/share.webp


BIN
packages/cs_resources/assets/property/advice_pic.webp


BIN
packages/cs_resources/assets/property/advice_pic@2x.png


BIN
packages/cs_resources/assets/property/approval.webp


BIN
packages/cs_resources/assets/property/approval@2x.png


BIN
packages/cs_resources/assets/property/collection.webp


BIN
packages/cs_resources/assets/property/collection_active.webp


BIN
packages/cs_resources/assets/property/conveyancing_lawyer.webp


BIN
packages/cs_resources/assets/property/conveyancing_lawyer@2x.png


BIN
packages/cs_resources/assets/property/home_equity_loans.webp


BIN
packages/cs_resources/assets/property/home_equity_loans@2x.png


BIN
packages/cs_resources/assets/property/home_loan_bg.webp


BIN
packages/cs_resources/assets/property/home_loan_bg@2x.png


BIN
packages/cs_resources/assets/property/ioan.webp


BIN
packages/cs_resources/assets/property/ioan@2x.png


BIN
packages/cs_resources/assets/property/new_home_loans.webp


BIN
packages/cs_resources/assets/property/new_home_loans@2x.png


BIN
packages/cs_resources/assets/property/news-item-bg.webp


BIN
packages/cs_resources/assets/property/news.webp


BIN
packages/cs_resources/assets/property/news@2x.png


BIN
packages/cs_resources/assets/property/our_partners.webp


BIN
packages/cs_resources/assets/property/our_partners@2x.png


BIN
packages/cs_resources/assets/property/overseas_home_loan.webp


BIN
packages/cs_resources/assets/property/overseas_home_loan@2x.png


BIN
packages/cs_resources/assets/property/refinancing.webp


BIN
packages/cs_resources/assets/property/refinancing@2x.png


BIN
packages/cs_resources/assets/property/rent.webp


BIN
packages/cs_resources/assets/property/rent@2x.png


BIN
packages/cs_resources/assets/property/sale.webp


BIN
packages/cs_resources/assets/property/sale@2x.png


+ 24 - 13
packages/cs_resources/lib/generated/assets.dart

@@ -39,18 +39,29 @@ class Assets {
   static const String baseServiceTitleBarFilterIcon = 'assets/base_service/title_bar_filter_icon.webp';
   static const String baseServiceTriangleDropDown = 'assets/base_service/triangle_drop_down.webp';
   static const String baseServiceTriangleDropDownIcon = 'assets/base_service/triangle_drop_down_icon.webp';
-  static const String propertyAdvicePic2x = 'assets/property/advice_pic@2x.png';
-  static const String propertyApproval2x = 'assets/property/approval@2x.png';
-  static const String propertyConveyancingLawyer2x = 'assets/property/conveyancing_lawyer@2x.png';
-  static const String propertyHomeEquityLoans2x = 'assets/property/home_equity_loans@2x.png';
-  static const String propertyHomeLoanBg2x = 'assets/property/home_loan_bg@2x.png';
-  static const String propertyIoan2x = 'assets/property/ioan@2x.png';
-  static const String propertyNewHomeLoans2x = 'assets/property/new_home_loans@2x.png';
-  static const String propertyNews2x = 'assets/property/news@2x.png';
-  static const String propertyOurPartners2x = 'assets/property/our_partners@2x.png';
-  static const String propertyOverseasHomeLoan2x = 'assets/property/overseas_home_loan@2x.png';
-  static const String propertyRefinancing2x = 'assets/property/refinancing@2x.png';
-  static const String propertyRent2x = 'assets/property/rent@2x.png';
-  static const String propertySale2x = 'assets/property/sale@2x.png';
+  static const String communityCamera = 'assets/community/camera.webp';
+  static const String communityComments = 'assets/community/comments.webp';
+  static const String communityFollowAdd = 'assets/community/follow_add.webp';
+  static const String communityGarageSale = 'assets/community/garage_sale.webp';
+  static const String communityLike = 'assets/community/like.webp';
+  static const String communityLikeActive = 'assets/community/like_active.webp';
+  static const String communityNesFeed = 'assets/community/nes_feed.webp';
+  static const String communityShare = 'assets/community/share.webp';
+  static const String propertyAdvicePic = 'assets/property/advice_pic.webp';
+  static const String propertyApproval = 'assets/property/approval.webp';
+  static const String propertyCollection = 'assets/property/collection.webp';
+  static const String propertyCollectionActive = 'assets/property/collection_active.webp';
+  static const String propertyConveyancingLawyer = 'assets/property/conveyancing_lawyer.webp';
+  static const String propertyHomeEquityLoans = 'assets/property/home_equity_loans.webp';
+  static const String propertyHomeLoanBg = 'assets/property/home_loan_bg.webp';
+  static const String propertyIoan = 'assets/property/ioan.webp';
+  static const String propertyNewHomeLoans = 'assets/property/new_home_loans.webp';
+  static const String propertyNews = 'assets/property/news.webp';
+  static const String propertyNewsItemBg = 'assets/property/news-item-bg.webp';
+  static const String propertyOurPartners = 'assets/property/our_partners.webp';
+  static const String propertyOverseasHomeLoan = 'assets/property/overseas_home_loan.webp';
+  static const String propertyRefinancing = 'assets/property/refinancing.webp';
+  static const String propertyRent = 'assets/property/rent.webp';
+  static const String propertySale = 'assets/property/sale.webp';
 
 }

+ 1 - 0
packages/cs_resources/pubspec.yaml

@@ -29,6 +29,7 @@ flutter:
     - assets/base_service/
     - assets/property/
     - assets/auth/
+    - assets/community/
 
 
 flutter_intl:

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

@@ -40,6 +40,7 @@ class RouterPath {
   static const propertyNews = 'property/news';
   static const propertySale = 'property/sale';
   static const propertyRent = 'property/rent';
+  static const propertyNewsDetail = '/property_news_detail';
 
   //奖励
   static const rewards = '/rewards';