glglove 3 months ago
parent
commit
82f9408b28

+ 1 - 1
packages/cpt_community/lib/modules/community/community_page.dart

@@ -183,7 +183,7 @@ class CommunityPage extends HookConsumerWidget {
                     MyTextView(
                       item['title'],
                       fontSize: 15,
-                      textColor: index == curTagIdx ? ColorUtils.string2Color('#4161D0'):Colors.black,
+                      textColor: index == curTagIdx ? ColorUtils.string2Color('#4161D0'): context.appColors.textBlack,
                       textAlign: TextAlign.center,
                       isFontMedium: true,
                     ),

+ 1 - 2
packages/cpt_community/lib/modules/garage/garagesale_post/garagesale_post_page.dart

@@ -36,7 +36,6 @@ class GaragesalePostPage extends HookConsumerWidget {
   Widget build(BuildContext context, WidgetRef ref) {
     final vm = ref.watch(garagesalePostVmProvider.notifier);
     final state = ref.watch(garagesalePostVmProvider);
-    // print("9999999999999999999 ${state.titleErrorText}");
 
     return Scaffold(
       appBar: MyAppBar.appBar(
@@ -107,7 +106,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                                       crossAxisAlignment: CrossAxisAlignment.center,
                                       children: [
                                         SizedBox(
-                                          width: 160,
+                                          width: 205,
                                           child: _buildContactTypeSelectCmp(context, ref),
                                         ),
                                         const SizedBox(width: 15),

+ 103 - 71
packages/cpt_property/lib/modules/news/page/property_news_page.dart

@@ -1,9 +1,12 @@
+import 'package:cpt_property/components/bottomDialog.dart';
 import 'package:cpt_property/modules/property/page/property_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: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:shared/utils/log_utils.dart';
 import 'package:shared/utils/util.dart';
 import 'package:widgets/ext/ex_widget.dart';
@@ -29,21 +32,33 @@ class PropertyNewsPage extends HookConsumerWidget {
     }
   }
 
+  static double cardHeight = 117.5 + 50;
+  static double cardLeftWidth = 125;
+
   Widget _buildItemLeftSection(BuildContext context,WidgetRef ref, item, _vm) {
+    final imageHeight = item['pic']!.isNotEmpty? cardHeight + 15 : cardHeight;
     return Container(
-      // color: Colors.blue,
-      width: 100,
-      // height: 117.5,
-      child: Center(
-        child: MyLoadImage(
-          item['pic'],
-          placeholderPath: Assets.propertyNewsItemBg,
-          width: 60.5,
-          height: 50.5,
+        height: imageHeight,
+        width: cardLeftWidth,
+        decoration: BoxDecoration(
+          color: ColorUtils.string2Color('#F2F3F6'),
+          // color: Colors.red,
+          borderRadius: const BorderRadius.only(
+            topLeft: Radius.circular(8),
+            bottomLeft: Radius.circular(8),
+          ),
         ),
-      )
-    ).marginOnly(right: 17.5).constrained(
-      minHeight: 117.5,
+        child: Center(
+          child: MyLoadImage(
+            item['pic'],
+            placeholderPath: Assets.propertyNewsItemBg,
+            height: item['pic']!.isNotEmpty? imageHeight : 60.5,
+            width: item['pic']!.isNotEmpty? cardLeftWidth : 50.5,
+            // fit: BoxFit.cover,
+            fit: BoxFit.cover,
+            cornerRadius: 8,
+          ),
+        )
     );
   }
 
@@ -58,74 +73,78 @@ class PropertyNewsPage extends HookConsumerWidget {
     }));
 
     return Container(
-      color: Colors.white,
-      padding: const EdgeInsets.only(left:5, top: 10.5, bottom: 10.5),
-      child: Container(
-        child: Stack(
-          children: [
-            Column(
-              mainAxisAlignment: MainAxisAlignment.start,
-              crossAxisAlignment: CrossAxisAlignment.start,
-              children: [
-                Row(
-                  children: [
-                    Expanded(
-                      child: MyTextView(
-                        item['title'],
-                        maxLines: 2, // 设置最大行数为2
-                        isTextEllipsis: true, // 超出部分用省略号表示
-                        fontSize: 16,
-                        textColor: Colors.black,
-                        isFontMedium: true,
-                      ),
+      padding: const EdgeInsets.only(left:17.5,right: 17.5,top: 13, bottom: 13),
+      decoration: BoxDecoration(
+        color: context.appColors.backgroundWhite,
+        borderRadius: const BorderRadius.only(
+          topRight: Radius.circular(8),
+          bottomRight: Radius.circular(8),
+        ),
+      ),
+      child: Stack(
+        children: [
+          Column(
+            mainAxisAlignment: MainAxisAlignment.start,
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Row(
+                children: [
+                  Expanded(
+                    child: MyTextView(
+                      item['title'],
+                      maxLines: 2, // 设置最大行数为2
+                      isTextEllipsis: true, // 超出部分用省略号表示
+                      fontSize: 16,
+                      textColor: context.appColors.textBlack,
+                      isFontMedium: true,
+                    ),
+                  )
+                ],
+              ),
+              const SizedBox(height: 10.5),
+              Row(
+                children: [
+                  Expanded(
+                    child: MyTextView(
+                      item['description'],
+                      maxLines: 2, // 设置最大行数为2
+                      isTextEllipsis: true, // 超出部分用省略号表示
+                      fontSize: 12,
+                      textColor: context.appColors.textBlack,
+                      isFontRegular: true,
                     )
-                  ],
-                ),
-                const SizedBox(height: 10.5),
-                Row(
+                  )
+                ]
+              ),
+              const SizedBox(height: 12.5),
+              Row(
                   children: [
                     Expanded(
                       child: MyTextView(
-                        item['description'],
-                        maxLines: 2, // 设置最大行数为2
+                        Utils.getTimeAgo(item['time']),
+                        maxLines: 1, // 设置最大行数为1
                         isTextEllipsis: true, // 超出部分用省略号表示
                         fontSize: 12,
-                        textColor: Colors.black,
+                        textColor: context.appColors.textBlack,
                         isFontRegular: true,
-                      )
+                      ),
                     )
                   ]
-                ),
-                const SizedBox(height: 12.5),
-                Row(
-                    children: [
-                      Expanded(
-                        child: MyTextView(
-                          Utils.getTimeAgo(item['time']),
-                          maxLines: 1, // 设置最大行数为2
-                          isTextEllipsis: true, // 超出部分用省略号表示
-                          fontSize: 12,
-                          textColor: Colors.black,
-                          isFontRegular: true,
-                        ),
-                      )
-                    ]
-                ),
-              ],
-            ),
-            Positioned(
-              right: 5,
-              bottom: 0,
-              child: MyAssetImage(isCollection? Assets.propertyCollectionActive:Assets.propertyCollection,width:22,height: 20.5,).onTap((){
-                Log.d("点击了收藏按钮");
-                _vm.handlerCollection(item, isCollection);
-              }),
-            ),
-          ],
-        ).constrained(
-          minHeight: 96.5,
-        ),
+              ),
+            ],
+          ),
+          Positioned(
+            right: 5,
+            bottom: 0,
+            child: MyAssetImage(isCollection? Assets.propertyCollectionActive:Assets.propertyCollection,width:22,height: 20.5,).onTap((){
+              Log.d("点击了收藏按钮");
+              _vm.handlerCollection(item, isCollection);
+            }),
+          ),
+        ],
       ),
+    ).constrained(
+      minHeight: cardHeight
     );
   }
 
@@ -139,6 +158,17 @@ class PropertyNewsPage extends HookConsumerWidget {
         Container(
           width: MediaQuery.of(context).size.width - 30,
           margin: const EdgeInsets.only(left: 15,right: 15,top: 12.5),
+          decoration: BoxDecoration(
+            borderRadius: BorderRadius.circular(10),
+            boxShadow: [
+              BoxShadow(
+                color: ColorUtils.string2Color('#000000').withOpacity(0.05),
+                offset: const Offset(0, 0),
+                blurRadius: 10,
+                spreadRadius: 0,
+              ),
+            ]
+          ),
           child: Row(
             mainAxisAlignment: MainAxisAlignment.start,
             crossAxisAlignment: CrossAxisAlignment.start,
@@ -153,7 +183,7 @@ class PropertyNewsPage extends HookConsumerWidget {
       ],
     ).onTap((){
       // 去详情
-      _vm.goNewsDetail(item);
+      // _vm.goNewsDetail(item);
     });
   }
 
@@ -173,6 +203,8 @@ class PropertyNewsPage extends HookConsumerWidget {
 
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
+      // backgroundColor: context.appColors.backgroundDefault,
+      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
       body: SizedBox(
         width: double.infinity,
         height: double.infinity,

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

@@ -121,11 +121,11 @@ class PropertyNewsVm extends _$PropertyNewsVm {
     final List<Map<String, dynamic>> listData = [
       {
         "id": 1,
-        "title": "fkladsfk fldask fldsakfllfkaslsd",
-        "description": "fsklfdsk罚款乱收费上课了发送卡",
+        "title": "法国进口高档国家的看过艰苦奋斗是感觉扣税的房价过快岁的法国艰苦奋斗是架构开发更加开放的国际法的是",
+        "description": "fsklfdsk罚款乱收费上课了发送卡fsklfdsk罚款乱收费上课了发送卡fsklfdsk罚款乱收费上课了发送卡fsklfdsk罚款乱收费上课了发送卡fsklfdsk罚款乱收费上课了发送卡",
         "time": "2024-02-15 12:00:00",
         "isCollection": true,
-        "pic": ""
+        "pic": "https://img1.baidu.com/it/u=2500825327,873404587&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"
       },
       {
         "id": 2,

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

@@ -77,7 +77,7 @@ class PropertyPage extends HookConsumerWidget {
                     maxLines: 1, // 设置最大行数为2
                     isTextEllipsis: true, // 超出部分用省略号表示
                     fontSize: 13,
-                    textColor: currentTabIdx == index ? ColorUtils.string2Color('#4161D0'):Colors.black,
+                    textColor: currentTabIdx == index ? ColorUtils.string2Color('#4161D0'):context.appColors.textBlack,
                     isFontMedium: true,
                   ),
                 ],

+ 9 - 6
packages/cpt_property/lib/modules/rent/page/property_rent_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_property/modules/property/page/property_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:flutter_hooks/flutter_hooks.dart';
@@ -37,7 +38,7 @@ class PropertyRentPage extends HookConsumerWidget {
         maxLines: 1, // 设置最大行数为2
         isTextEllipsis: true, // 超出部分用省略号表示
         fontSize: 16,
-        textColor: Colors.black,
+        textColor: context.appColors.textBlack,
         isFontMedium: true,
       )
     ).marginOnly(right: 17.5);
@@ -50,7 +51,7 @@ class PropertyRentPage extends HookConsumerWidget {
       child: TextButton(
         onPressed: (){},
         style: TextButton.styleFrom(
-          foregroundColor: Colors.black,
+          foregroundColor: context.appColors.textBlack,
           backgroundColor: ColorUtils.string2Color('#EFF3FF'), // 背景颜色
           // minimumSize: const Size(71, 30), // 最小宽度和高度
           padding: const EdgeInsets.symmetric(horizontal: 17.5, vertical: 7.5), // 内边距
@@ -86,7 +87,10 @@ class PropertyRentPage extends HookConsumerWidget {
   // listitem
   Widget _buildRentItem(BuildContext context,WidgetRef ref, item, _vm) {
     return Container(
-      // color: Colors.red,
+      decoration: BoxDecoration(
+        color: context.appColors.backgroundWhite,
+        // borderRadius: BorderRadius.circular(5),
+      ),
       child: Row(
         mainAxisAlignment: MainAxisAlignment.center,
         crossAxisAlignment: CrossAxisAlignment.center,
@@ -107,15 +111,13 @@ class PropertyRentPage extends HookConsumerWidget {
                 ),
               ],
             ),
-          ).constrained(
-            minHeight: 117.5,
           ),
         ],
       ).onTap((){
         // 去详情
         _vm.goNewsDetail(item);
       }),
-    ).border(color: ColorUtils.string2Color('C9C9C9FF'), bottom: 0.5);
+    ).border(color: context.appColors.dividerDefault, bottom: 0.5);
   }
 
 
@@ -133,6 +135,7 @@ class PropertyRentPage extends HookConsumerWidget {
     }, []);
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
+      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
       body: SizedBox(
           width: double.infinity,
           height: double.infinity,

+ 10 - 7
packages/cpt_property/lib/modules/sale/page/property_sale_page.dart

@@ -1,4 +1,5 @@
 import 'package:cpt_property/modules/property/page/property_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:flutter_hooks/flutter_hooks.dart';
@@ -36,7 +37,7 @@ class PropertySalePage extends HookConsumerWidget {
           MyTextView(
             item['title'],
             fontSize: 16,
-            textColor: Colors.black,
+            textColor: context.appColors.textBlack,
             isFontMedium: true,
           ),
     ).marginOnly(right: 17.5);
@@ -49,7 +50,7 @@ class PropertySalePage extends HookConsumerWidget {
       child: TextButton(
         onPressed: (){},
         style: TextButton.styleFrom(
-          foregroundColor: Colors.black,
+          foregroundColor: context.appColors.textBlack,
           backgroundColor: ColorUtils.string2Color('#EFF3FF'), // 背景颜色
           minimumSize: const Size(91.5, 44), // 最小宽度和高度
           padding: const EdgeInsets.symmetric(horizontal: 11.0, vertical: 14), // 内边距
@@ -64,7 +65,7 @@ class PropertySalePage extends HookConsumerWidget {
         child:MyTextView(
           item['price'],
           fontSize: 17,
-          textColor: Colors.black,
+          textColor: context.appColors.textBlack,
           isFontMedium: true,
         ),
       ),
@@ -74,7 +75,10 @@ class PropertySalePage extends HookConsumerWidget {
   // listitem
   Widget _buildSaleItem(BuildContext context,WidgetRef ref, item, _vm) {
     return Container(
-      // color: Colors.red,
+      decoration: BoxDecoration(
+        color: context.appColors.backgroundWhite,
+        // borderRadius: BorderRadius.circular(5),
+      ),
       child: Row(
         mainAxisAlignment: MainAxisAlignment.center,
         crossAxisAlignment: CrossAxisAlignment.center,
@@ -95,15 +99,13 @@ class PropertySalePage extends HookConsumerWidget {
                 ),
               ],
             ),
-          ).constrained(
-            minHeight: 117.5,
           ),
         ],
       ).onTap((){
         // 去详情
         _vm.goNewsDetail(item);
       }),
-    ).border(color: ColorUtils.string2Color('C9C9C9FF'), bottom: 0.5);
+    ).border(color: context.appColors.dividerDefault, bottom: 0.5);
   }
 
   @override
@@ -121,6 +123,7 @@ class PropertySalePage extends HookConsumerWidget {
 
     return Scaffold(
       // appBar: AppBar(title: Text("资产")),
+      backgroundColor: ColorUtils.string2Color("#F2F3F6"),
       body: EasyRefresh(
         controller: _vm.refreshController,
         // 上拉加载