glglove 3 months ago
parent
commit
079763de25
29 changed files with 179 additions and 59 deletions
  1. 3 4
      packages/cpt_community/lib/components/newsfeed_card_content.dart
  2. 1 1
      packages/cpt_community/lib/modules/community/community_vm.g.dart
  3. 1 1
      packages/cpt_community/lib/modules/community/following/following_vm.g.dart
  4. 1 1
      packages/cpt_community/lib/modules/community/foryou/foryou_vm.g.dart
  5. 1 1
      packages/cpt_community/lib/modules/community/news/news_vm.g.dart
  6. 24 2
      packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_page.dart
  7. 9 2
      packages/cpt_community/lib/modules/garage/for_rent/for_rent_page.dart
  8. 1 1
      packages/cpt_community/lib/modules/garage/for_rent/for_rent_vm.g.dart
  9. 9 2
      packages/cpt_community/lib/modules/garage/for_sale/for_sale_page.dart
  10. 1 1
      packages/cpt_community/lib/modules/garage/for_sale/for_sale_vm.g.dart
  11. 1 1
      packages/cpt_community/lib/modules/garage/garagesale_detail/garagesale_detail_vm.g.dart
  12. 1 1
      packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_vm.g.dart
  13. 1 1
      packages/cpt_community/lib/modules/my_following/my_follow/my_follow_vm.g.dart
  14. 1 1
      packages/cpt_community/lib/modules/my_following/my_follower/my_follower_vm.g.dart
  15. 1 1
      packages/cpt_community/lib/modules/my_following/my_following_vm.g.dart
  16. 1 1
      packages/cpt_community/lib/modules/my_posts/my_posts_forrent/my_posts_forrent_vm.g.dart
  17. 1 1
      packages/cpt_community/lib/modules/my_posts/my_posts_forsale/my_posts_forsale_vm.g.dart
  18. 1 1
      packages/cpt_community/lib/modules/my_posts/my_posts_newsfeed/my_posts_newsfeed_vm.g.dart
  19. 1 1
      packages/cpt_community/lib/modules/my_posts/my_posts_vm.g.dart
  20. 2 2
      packages/cpt_property/lib/modules/ioan/property_ioan_page.dart
  21. 1 1
      packages/cpt_property/lib/modules/ioan/property_ioan_vm.g.dart
  22. 1 1
      packages/cpt_property/lib/modules/news/vm/property_news_vm.g.dart
  23. 26 18
      packages/cpt_property/lib/modules/news_detail/property_news_detail_page.dart
  24. 19 0
      packages/cpt_property/lib/modules/news_detail/property_news_detail_state.dart
  25. 26 1
      packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.dart
  26. 4 4
      packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.g.dart
  27. 1 1
      packages/cpt_property/lib/modules/rent/vm/property_rent_vm.g.dart
  28. 1 1
      packages/cpt_property/lib/modules/sale/vm/property_sale_vm.g.dart
  29. 38 5
      packages/cpt_property/lib/router/page/property_page_router.gr.dart

+ 3 - 4
packages/cpt_community/lib/components/newsfeed_card_content.dart

@@ -57,6 +57,7 @@ class NewsFeedCardContent extends StatelessWidget {
           Log.d("---maxHeight-----$maxHeight-- $minHeight  $maxWidth--");
           return Container(
             width: double.infinity,
+            // color: Colors.red,
             padding: const EdgeInsets.symmetric(horizontal: 15),
             child: Column(
                 children: [
@@ -85,20 +86,18 @@ class NewsFeedCardContent extends StatelessWidget {
         width: maxWidth,
         height: 87,
         child: Row(
-          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+          mainAxisAlignment: MainAxisAlignment.start,
           children: List.generate(
               imageUrls.length,
               (index) => Container(
                 height: 87,
-                width: maxWidth/imageCount - 16 * (imageCount-1),
+                width: maxWidth/imageCount - 16,
                 margin: EdgeInsets.only(right: (index!=imageCount-1) ? 16 : 0 ),
                 color: ColorUtils.string2Color("#F2F3F6"),
-                // color: Colors.red,
                 child:Stack(
                     children: [
                       MyLoadImage(
                         imageUrls[index],
-                        width: maxWidth/imageCount - (16 * imageCount-1),
                         height: 87,
                         fit: BoxFit.cover,
                         cornerRadius: 5,

+ 1 - 1
packages/cpt_community/lib/modules/community/community_vm.g.dart

@@ -6,7 +6,7 @@ part of 'community_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$communityVmHash() => r'c80426bfe35642b01862d16ebbd363a98137135f';
+String _$communityVmHash() => r'9d2a5247072e1a6032db058cc0f21591bc739d07';
 
 /// See also [CommunityVm].
 @ProviderFor(CommunityVm)

+ 1 - 1
packages/cpt_community/lib/modules/community/following/following_vm.g.dart

@@ -6,7 +6,7 @@ part of 'following_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$followingVmHash() => r'836966b8501ded3f2ab058ef269e5fe3f2fd7db4';
+String _$followingVmHash() => r'd1095a72d4591c463b6a6ef58602c117149075cb';
 
 /// See also [FollowingVm].
 @ProviderFor(FollowingVm)

+ 1 - 1
packages/cpt_community/lib/modules/community/foryou/foryou_vm.g.dart

@@ -6,7 +6,7 @@ part of 'foryou_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$foryouVmHash() => r'f240ad571cf30541e4f6b79295d40a08aef7e750';
+String _$foryouVmHash() => r'af8a4c5962dea938d82be432aa28ec4e704971ad';
 
 /// See also [ForyouVm].
 @ProviderFor(ForyouVm)

+ 1 - 1
packages/cpt_community/lib/modules/community/news/news_vm.g.dart

@@ -6,7 +6,7 @@ part of 'news_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$newsVmHash() => r'197df6ca3ce539149cb063cf70eecb32f94ae96a';
+String _$newsVmHash() => r'ce792a3814b2a3da4d164c030346eca5e9d77798';
 
 /// See also [NewsVm].
 @ProviderFor(NewsVm)

+ 24 - 2
packages/cpt_community/lib/modules/community/newsfeed_detail/newsfeed_detail_page.dart

@@ -116,8 +116,19 @@ class NewsfeedDetailPage extends HookConsumerWidget {
       children: [
         Container(
           margin: const EdgeInsets.only(left: 15, right: 15,top: 14,bottom: 14),
-          color: Colors.white,
           padding: const EdgeInsets.only(left: 15, right: 15,top: 17,bottom: 17),
+          decoration: BoxDecoration(
+              color: context.appColors.textWhite,
+              borderRadius: BorderRadius.circular(10),
+              boxShadow: [
+                BoxShadow(
+                  color: ColorUtils.string2Color("#E4E7EB").withOpacity(0.5),
+                  spreadRadius: 0,
+                  blurRadius: 4,
+                  offset: const Offset(0, 4), // changes position of shadow
+                ),
+              ]
+          ),
           child: Column(
               mainAxisAlignment: MainAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.start,
@@ -178,9 +189,20 @@ class NewsfeedDetailPage extends HookConsumerWidget {
   Widget _buildCommentListCard(BuildContext context,  WidgetRef ref){
     final vm = ref.read(newsfeedDetailVmProvider.notifier);
     return Container(
-      color: Colors.white,
       margin: const EdgeInsets.only(left: 15, right: 15,top: 18,bottom: 18),
       padding: const EdgeInsets.only(bottom: 30),
+      decoration: BoxDecoration(
+          color: context.appColors.textWhite,
+          borderRadius: BorderRadius.circular(10),
+          boxShadow: [
+            BoxShadow(
+              color: ColorUtils.string2Color("#E4E7EB").withOpacity(0.5),
+              spreadRadius: 0,
+              blurRadius: 4,
+              offset: const Offset(0, 4), // changes position of shadow
+            ),
+          ]
+      ),
       child: Column(
         crossAxisAlignment: CrossAxisAlignment.start,
         mainAxisAlignment: MainAxisAlignment.start,

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

@@ -4,9 +4,12 @@ import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_basic/provider/app_config/app_config_service.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/color_utils.dart';
+import 'package:shared/utils/ext_dart.dart';
 import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/screen_util.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
@@ -34,10 +37,13 @@ class ForrentPage extends HookConsumerWidget {
     }
   }
 
+
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final vm = ref.read(forrentVmProvider.notifier);
     final state = ref.watch(forrentVmProvider);
+    // final appConfigState = ref.watch(appConfigServiceProvider);
+
     useEffect(() {
       // 组件挂载时执行 - 执行接口请求
       Future.microtask(() => vm.initPageData());
@@ -76,11 +82,12 @@ class ForrentPage extends HookConsumerWidget {
               },
               successSliverWidget:[
                 SliverGrid(
-                  gridDelegate:  const SliverGridDelegateWithFixedCrossAxisCount(
+                  gridDelegate:  SliverGridDelegateWithFixedCrossAxisCount(
                     crossAxisCount: 2, // 每行显示两个项目
                     mainAxisSpacing: 15,
                     crossAxisSpacing: 15,
-                    childAspectRatio: 0.78, // 宽高比
+                    // childAspectRatio: 166.5/214, // 宽高比
+                    childAspectRatio:  166.5/214 * ScreenUtil.getAdapterSizeCtx(context, 166.5/214), // 宽高比
                   ),
                   delegate: SliverChildBuilderDelegate(
                         (context, index) {

+ 1 - 1
packages/cpt_community/lib/modules/garage/for_rent/for_rent_vm.g.dart

@@ -6,7 +6,7 @@ part of 'for_rent_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$forrentVmHash() => r'ead572c32c80262c0e4220328d537689f466acb8';
+String _$forrentVmHash() => r'057fddba190bba20681aadf8965195e6ec1c54be';
 
 /// See also [ForrentVm].
 @ProviderFor(ForrentVm)

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

@@ -4,9 +4,11 @@ import 'package:auto_route/auto_route.dart';
 import 'package:flutter/rendering.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_basic/provider/app_config/app_config_service.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/screen_util.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
@@ -34,10 +36,14 @@ class ForsalePage extends HookConsumerWidget {
     }
   }
 
+
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final vm = ref.read(forsaleVmProvider.notifier);
     final state = ref.watch(forsaleVmProvider);
+    // final appConfigState = ref.watch(appConfigServiceProvider)
+
+
     useEffect(() {
       // 组件挂载时执行 - 执行接口请求
       Future.microtask(() => vm.initPageData());
@@ -77,11 +83,12 @@ class ForsalePage extends HookConsumerWidget {
             },
             successSliverWidget:[
               SliverGrid(
-                gridDelegate:  const SliverGridDelegateWithFixedCrossAxisCount(
+                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                   crossAxisCount: 2, // 每行显示两个项目
                   mainAxisSpacing: 15,
                   crossAxisSpacing: 15,
-                  childAspectRatio: 0.78, // 宽高比
+                  // childAspectRatio: 166.5/214, // 宽高比
+                  childAspectRatio:  166.5/214 * ScreenUtil.getAdapterSizeCtx(context, 166.5/214), // 宽高比
                 ),
                 delegate: SliverChildBuilderDelegate(
                       (context, index) {

+ 1 - 1
packages/cpt_community/lib/modules/garage/for_sale/for_sale_vm.g.dart

@@ -6,7 +6,7 @@ part of 'for_sale_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$forsaleVmHash() => r'8c0f414fe06c15283d9147864e04d1532064fe2b';
+String _$forsaleVmHash() => r'bbbdd29799a5d2bf561b9a247ec85768c3fc607b';
 
 /// See also [ForsaleVm].
 @ProviderFor(ForsaleVm)

+ 1 - 1
packages/cpt_community/lib/modules/garage/garagesale_detail/garagesale_detail_vm.g.dart

@@ -7,7 +7,7 @@ part of 'garagesale_detail_vm.dart';
 // **************************************************************************
 
 String _$garagesaleDetailVmHash() =>
-    r'2d97be095d9ff7a9db8554acb084e5b005595e2d';
+    r'7ee0bd467ff952716fbe9a949c6bf072969c3932';
 
 /// See also [GaragesaleDetailVm].
 @ProviderFor(GaragesaleDetailVm)

+ 1 - 1
packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_vm.g.dart

@@ -6,7 +6,7 @@ part of 'garagesale_post_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$garagesalePostVmHash() => r'fb025048ae4a1e025cf3fb3e788ec4ac63811009';
+String _$garagesalePostVmHash() => r'cabc484eddab1b8e5322750ea9eee463dd6d2290';
 
 /// See also [GaragesalePostVm].
 @ProviderFor(GaragesalePostVm)

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

@@ -6,7 +6,7 @@ part of 'my_follow_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myFollowVmHash() => r'c3a6e5047a72ec1315e4cf10a24c0925ef9b9223';
+String _$myFollowVmHash() => r'8c6f9fbf7a522cfd47ee34c5de7cf24916587c36';
 
 /// See also [MyFollowVm].
 @ProviderFor(MyFollowVm)

+ 1 - 1
packages/cpt_community/lib/modules/my_following/my_follower/my_follower_vm.g.dart

@@ -6,7 +6,7 @@ part of 'my_follower_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myFollowerVmHash() => r'68d8164b29974ce64dd0be2f989f83b9445b74e9';
+String _$myFollowerVmHash() => r'3069f27c5676bb740990ead2ddf9041bec412ca0';
 
 /// See also [MyFollowerVm].
 @ProviderFor(MyFollowerVm)

+ 1 - 1
packages/cpt_community/lib/modules/my_following/my_following_vm.g.dart

@@ -6,7 +6,7 @@ part of 'my_following_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myFollowingVmHash() => r'25a5afa320dc906371f23c97e9b23131fa686a70';
+String _$myFollowingVmHash() => r'062ebd721a307fa49519a8aedffa645d04a4ce68';
 
 /// See also [MyFollowingVm].
 @ProviderFor(MyFollowingVm)

+ 1 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_forrent/my_posts_forrent_vm.g.dart

@@ -6,7 +6,7 @@ part of 'my_posts_forrent_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myPostsForRentVmHash() => r'1c21b636795250178ca2877dd0dd495474061ef2';
+String _$myPostsForRentVmHash() => r'e5a687e67c0d47f3fa8bc0929154c1583ab5532c';
 
 /// See also [MyPostsForRentVm].
 @ProviderFor(MyPostsForRentVm)

+ 1 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_forsale/my_posts_forsale_vm.g.dart

@@ -6,7 +6,7 @@ part of 'my_posts_forsale_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myPostsForSaleVmHash() => r'6894e45314a1131fd4ff967a031aebd29614ec40';
+String _$myPostsForSaleVmHash() => r'a46ff1edb66dfc73747a68946d6607dd0b5a3998';
 
 /// See also [MyPostsForSaleVm].
 @ProviderFor(MyPostsForSaleVm)

+ 1 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_newsfeed/my_posts_newsfeed_vm.g.dart

@@ -6,7 +6,7 @@ part of 'my_posts_newsfeed_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myPostsNewsfeedVmHash() => r'32b47069385f7b1b66e69bc9f28c0186799dbf85';
+String _$myPostsNewsfeedVmHash() => r'2af8142a67de591d78b46987ead439a13c0e04a6';
 
 /// See also [MyPostsNewsfeedVm].
 @ProviderFor(MyPostsNewsfeedVm)

+ 1 - 1
packages/cpt_community/lib/modules/my_posts/my_posts_vm.g.dart

@@ -6,7 +6,7 @@ part of 'my_posts_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$myPostsVmHash() => r'3bc495c4d4180bbc0081b607a2ffa3c2e172ba91';
+String _$myPostsVmHash() => r'd082a849c83a9339b9bba3b172fa2b5f1b00d4b7';
 
 /// See also [MyPostsVm].
 @ProviderFor(MyPostsVm)

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

@@ -153,7 +153,7 @@ class PropertyIoanPage extends HookConsumerWidget {
             Expanded(
               child: Container(
                 // color: Colors.red,
-                padding: const EdgeInsets.only(left: 50,right: 20),
+                padding: const EdgeInsets.only(left: 20,right: 20),
                 child: Column(
                   // mainAxisAlignment: MainAxisAlignment.end,
                   crossAxisAlignment: CrossAxisAlignment.start,
@@ -298,7 +298,7 @@ class PropertyIoanPage extends HookConsumerWidget {
           Wrap(
             children: List.generate(offerTextInfoList.length, (index){
               return Container(
-                width: MediaQuery.of(context).size.width / 2 - 100,
+                width: MediaQuery.of(context).size.width / 2 - 30,
                 margin: const EdgeInsets.only(right: 15,bottom: 15),
                 padding: const EdgeInsets.only(left: 15,right: 15,top:15,bottom:15,),
                 // decoration: BoxDecoration(

+ 1 - 1
packages/cpt_property/lib/modules/ioan/property_ioan_vm.g.dart

@@ -6,7 +6,7 @@ part of 'property_ioan_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$propertyIoanVmHash() => r'5b9c77252ac662163649b28c4d9ddaa2c793c344';
+String _$propertyIoanVmHash() => r'61a0481b76a62bfc7c1a3a6be8949c9f057ec64e';
 
 /// See also [PropertyIoanVm].
 @ProviderFor(PropertyIoanVm)

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

@@ -6,7 +6,7 @@ part of 'property_news_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$propertyNewsVmHash() => r'81b5062b3ed866c4747a88c2e45a138fa9f5b1ef';
+String _$propertyNewsVmHash() => r'0a31694e75c48792b56b3e8bf7fbf442af24659a';
 
 /// See also [PropertyNewsVm].
 @ProviderFor(PropertyNewsVm)

+ 26 - 18
packages/cpt_property/lib/modules/news_detail/property_news_detail_page.dart

@@ -1,19 +1,24 @@
-import 'package:cs_resources/generated/assets.dart';
+
+import 'package:cpt_property/modules/news_detail/property_news_detail_vm.dart';
+import 'package:cs_resources/generated/l10n.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:plugin_basic/widget/webview_page.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 PropertyNewsDetailPage extends HookConsumerWidget {
-  const PropertyNewsDetailPage({Key? key}) : super(key: key);
+  final String type;
+
+  const PropertyNewsDetailPage({Key? key, @PathParam() required this.type}) : super(key: key);
 
   //启动当前页面
-  static void startInstance({BuildContext? context}) {
+  static void startInstance({BuildContext? context, required String formType}) {
     if (context != null) {
       context.router.push(const PropertyNewsPageRoute());
     } else {
@@ -23,19 +28,22 @@ class PropertyNewsDetailPage extends HookConsumerWidget {
 
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    final _vm = ref.read(propertyNewsDetailVmProvider.notifier);
+    final vm = ref.read(propertyNewsDetailVmProvider.notifier);
+    final state = ref.watch(propertyNewsDetailVmProvider);
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => vm.initPageData());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
 
-    return Scaffold(
-      appBar: AppBar(title: Text("新闻详情页面")),
-      body: Column(
-        children: [
-          MyAssetImage(
-            Assets.propertyIoan,
-            width: 100,
-            height: 100,
-          ),
-        ],
-      ),
-    );
+    return state.detailData != null
+        ? WebViewPage(
+      showAppbar: true,
+      initialUrl: state.detailData?['detail_url'],
+      arguments: {'title': state.detailData?['title']},
+    ): const SizedBox.shrink();
   }
 }

+ 19 - 0
packages/cpt_property/lib/modules/news_detail/property_news_detail_state.dart

@@ -0,0 +1,19 @@
+class PropertyNewsDetailState {
+  final String? title;
+  Map<String, dynamic>? detailData;
+
+  PropertyNewsDetailState({
+    this.title,
+    this.detailData,
+  });
+
+  PropertyNewsDetailState copyWith({
+    String? title,
+    Map<String, dynamic>? detailData,
+  }) {
+    return PropertyNewsDetailState(
+      title: title ?? this.title,
+      detailData: detailData ?? this.detailData,
+    );
+  }
+}

+ 26 - 1
packages/cpt_property/lib/modules/news_detail/property_news_detail_vm.dart

@@ -1,14 +1,39 @@
 
+import 'package:cpt_property/modules/news_detail/property_news_detail_state.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
 
 part 'property_news_detail_vm.g.dart';
 
 @riverpod
 class PropertyNewsDetailVm extends _$PropertyNewsDetailVm {
 
+  PropertyNewsDetailState initState() {
+    return PropertyNewsDetailState(
+        detailData: {
+          "detail_url": "https://www.baidu.com",
+          "title": "详情"
+        }
+    );
+  }
+
   @override
-  void build(){
+  PropertyNewsDetailState build(){
+    // 引入数据仓库
+    // NewsRepositoryInstance = ref.read(newsRepositoryProvider);
+    final state = initState();
+    Log.d("--------------------------build---------------------");
 
+    return state;
   }
 
+
+  // 初始化页面数据
+  initPageData() {
+  }
+
+  getDetailData(String id) async {
+    Log.d("getDetailData");
+
+  }
 }

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

@@ -7,12 +7,12 @@ part of 'property_news_detail_vm.dart';
 // **************************************************************************
 
 String _$propertyNewsDetailVmHash() =>
-    r'd98d5adf806094583866cf55bd2f3d339ae2e837';
+    r'5e8df693146169ab97ebc3952f33cc2118b0f35e';
 
 /// See also [PropertyNewsDetailVm].
 @ProviderFor(PropertyNewsDetailVm)
-final propertyNewsDetailVmProvider =
-    AutoDisposeNotifierProvider<PropertyNewsDetailVm, void>.internal(
+final propertyNewsDetailVmProvider = AutoDisposeNotifierProvider<
+    PropertyNewsDetailVm, PropertyNewsDetailState>.internal(
   PropertyNewsDetailVm.new,
   name: r'propertyNewsDetailVmProvider',
   debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
@@ -22,6 +22,6 @@ final propertyNewsDetailVmProvider =
   allTransitiveDependencies: null,
 );
 
-typedef _$PropertyNewsDetailVm = AutoDisposeNotifier<void>;
+typedef _$PropertyNewsDetailVm = AutoDisposeNotifier<PropertyNewsDetailState>;
 // 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_property/lib/modules/rent/vm/property_rent_vm.g.dart

@@ -6,7 +6,7 @@ part of 'property_rent_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$propertyRentVmHash() => r'5ba5583143e18939b38d3e8e843f65b8cbd90328';
+String _$propertyRentVmHash() => r'bc707e343a4e5db430176e316ff8ae3a0cfe4477';
 
 /// See also [PropertyRentVm].
 @ProviderFor(PropertyRentVm)

+ 1 - 1
packages/cpt_property/lib/modules/sale/vm/property_sale_vm.g.dart

@@ -6,7 +6,7 @@ part of 'property_sale_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$propertySaleVmHash() => r'54b18e906a735fe1089fed70b3b31ad58cd84037';
+String _$propertySaleVmHash() => r'19d1b7d65dc326d454df74af5fd9d7632d795811';
 
 /// See also [PropertySaleVm].
 @ProviderFor(PropertySaleVm)

+ 38 - 5
packages/cpt_property/lib/router/page/property_page_router.gr.dart

@@ -22,9 +22,16 @@ abstract class _$PropertyPageRouter extends RootStackRouter {
       );
     },
     PropertyNewsDetailPageRoute.name: (routeData) {
+      final pathParams = routeData.inheritedPathParams;
+      final args = routeData.argsAs<PropertyNewsDetailPageRouteArgs>(
+          orElse: () => PropertyNewsDetailPageRouteArgs(
+              type: pathParams.getString('type')));
       return AutoRoutePage<dynamic>(
         routeData: routeData,
-        child: const PropertyNewsDetailPage(),
+        child: PropertyNewsDetailPage(
+          key: args.key,
+          type: args.type,
+        ),
       );
     },
     PropertyNewsPageRoute.name: (routeData) {
@@ -70,16 +77,42 @@ class PropertyIoanPageRoute extends PageRouteInfo<void> {
 
 /// generated route for
 /// [PropertyNewsDetailPage]
-class PropertyNewsDetailPageRoute extends PageRouteInfo<void> {
-  const PropertyNewsDetailPageRoute({List<PageRouteInfo>? children})
-      : super(
+class PropertyNewsDetailPageRoute
+    extends PageRouteInfo<PropertyNewsDetailPageRouteArgs> {
+  PropertyNewsDetailPageRoute({
+    Key? key,
+    required String type,
+    List<PageRouteInfo>? children,
+  }) : super(
           PropertyNewsDetailPageRoute.name,
+          args: PropertyNewsDetailPageRouteArgs(
+            key: key,
+            type: type,
+          ),
+          rawPathParams: {'type': type},
           initialChildren: children,
         );
 
   static const String name = 'PropertyNewsDetailPageRoute';
 
-  static const PageInfo<void> page = PageInfo<void>(name);
+  static const PageInfo<PropertyNewsDetailPageRouteArgs> page =
+      PageInfo<PropertyNewsDetailPageRouteArgs>(name);
+}
+
+class PropertyNewsDetailPageRouteArgs {
+  const PropertyNewsDetailPageRouteArgs({
+    this.key,
+    required this.type,
+  });
+
+  final Key? key;
+
+  final String type;
+
+  @override
+  String toString() {
+    return 'PropertyNewsDetailPageRouteArgs{key: $key, type: $type}';
+  }
 }
 
 /// generated route for