glglove 2 months ago
parent
commit
c3fa282dfa

+ 10 - 9
packages/cpt_services/lib/components/chooseVisitTimeContent.dart

@@ -150,11 +150,12 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                     }
                   },
                   text: '$timeText',
+                  padding: const EdgeInsets.only(left: 5, right: 5, top: 5, bottom: 5),
                   textColor: itemIsChecked ?context.appColors.textPrimary: context.appColors.textDarkGray999,
                   enable: enable.value,
                   disabledBackgroundColor: context.appColors.disEnableGray,
                   disabledTextColor: context.appColors.textWhite,
-                  fontSize: 12,
+                  fontSize: 11,
                   fontWeight: FontWeight.w400,
                 )
               ),
@@ -173,14 +174,14 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                   paddingLeft: 5,
                   paddingRight: 5,
                 ).clipRRect(
-                  topLeft: 10,
-                  bottomRight: 10
+                  topLeft: 8,
+                  bottomRight: 8
                 ): const SizedBox.shrink(),
               ),
               // 夜间
               Positioned(
                 left: 0,
-                bottom: 2,
+                bottom: 0,
                 child: night.value? MyTextView(
                   'Night',
                   textColor: ColorUtils.string2Color("#FE4066"),
@@ -192,14 +193,14 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                   paddingLeft: 5,
                   paddingRight: 5,
                 ).clipRRect(
-                    topRight: 10,
-                    bottomLeft: 10
+                    topRight: 8,
+                    bottomLeft: 8
                 ): const SizedBox.shrink(),
               ),
               // 节假日
               Positioned(
                 right: 0,
-                bottom: 2,
+                bottom: 0,
                 child: holiday.value? MyTextView(
                   'Holiday',
                   textColor: ColorUtils.string2Color("#37d7cc"),
@@ -211,8 +212,8 @@ class ChooseVisitTimeContent extends HookConsumerWidget {
                   paddingLeft: 5,
                   paddingRight: 5,
                 ).clipRRect(
-                    topLeft: 10,
-                    bottomRight: 10
+                    topLeft: 8,
+                    bottomRight: 8
                 ): const SizedBox.shrink(),
               ),
             ],

+ 4 - 3
packages/cpt_services/lib/components/user_evaluate_card_item.dart

@@ -89,7 +89,7 @@ class UserEvaluateCardItem extends StatelessWidget {
                 Expanded(
                   child: Container(
                     // color: Colors.yellow,
-                    margin: const EdgeInsets.only(left: 10),
+                    margin: const EdgeInsets.only(left: 5),
                     child: Column(
                       mainAxisAlignment: MainAxisAlignment.start,
                       crossAxisAlignment: CrossAxisAlignment.start,
@@ -128,7 +128,7 @@ class UserEvaluateCardItem extends StatelessWidget {
                                 ),
                                 MyTextView(
                                   '${score!}',
-                                  isFontRegular: true,
+                                  isFontMedium: true,
                                   fontSize: 12,
                                   textColor: ColorUtils.string2Color('#767676'),
                                   maxLines: 1,
@@ -143,7 +143,8 @@ class UserEvaluateCardItem extends StatelessWidget {
                               textColor: ColorUtils.string2Color('#767676'),
                               maxLines: 1,
                               isTextEllipsis: true,
-                            ),
+                              marginLeft: 5,
+                            ).expanded(),
                           ],
                         ),
                       ],

+ 3 - 1
packages/cpt_services/lib/modules/services/homeService/home_service_page.dart

@@ -96,7 +96,8 @@ class HomeServicePage extends HookConsumerWidget {
                           crossAxisCount: 2, // 每行显示两个项目
                           mainAxisSpacing: 15,
                           crossAxisSpacing: 15,
-                          childAspectRatio: 172.5/170, // 宽高比
+                          // childAspectRatio: 172.5/170, // 宽高比
+                          childAspectRatio: 180/220, // 宽高比
                           // childAspectRatio:  172.5/170 * ScreenUtil.getAdapterSizeCtx(context, 172.5/170), // 宽高比
                           // childAspectRatio:  172.5/170 * ((172.5/170).ap), // 宽高比
                         ),
@@ -146,6 +147,7 @@ class HomeServicePage extends HookConsumerWidget {
               Expanded(
                 child: HomeServiceCard(
                     key: UniqueKey(),
+                    cardHeight: 200,
                     itemEntity: item,
                     cleanServiceType: item.category!.type,
                     onClickColleciotn: (dynamic collectionValue) async {

+ 102 - 99
packages/cpt_services/lib/modules/services/homeService/service_card_item.dart

@@ -58,120 +58,123 @@ class HomeServiceCard extends StatelessWidget {
     int card_likes_count = itemEntity.likesCount?? 0;
 
     final company_name = itemEntity.merchant?.name?? "";
-    return Column(
-      children: [
-        // 图片
-        Row(
-          mainAxisAlignment: MainAxisAlignment.center,
-          crossAxisAlignment: CrossAxisAlignment.center,
-          children: [
-            Expanded(
-              child: ClipRRect(
-                borderRadius: const BorderRadius.only(topLeft: Radius.circular(8), topRight: Radius.circular(8),),
-                child: MyLoadImage(
-                  card_img,
-                  width: 172.5,
-                  height: 80.5.ap,
-                  isCircle: false,
-                  fit: BoxFit.cover,
-                ),
-              ),
-            ),
-          ],
-        ),
-        // 标题
-        Padding(
-          padding: const EdgeInsets.only(left: 10, right: 10, top: 10,),
-          child: Row(
+    return Container(
+      height: cardHeight,
+      child: Column(
+        children: [
+          // 图片
+          Row(
             mainAxisAlignment: MainAxisAlignment.center,
+            crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               Expanded(
-                child: SizedBox(
-                  height: 30.ap,
-                  child: MyTextView(
-                    card_name,
-                    maxLines: 2,
-                    isTextEllipsis: true,
-                    textAlign: TextAlign.left,
-                    textColor: context.appColors.textBlack,
-                    fontSize: 15,
-                    isFontRegular: true,
+                child: ClipRRect(
+                  borderRadius: const BorderRadius.only(topLeft: Radius.circular(8), topRight: Radius.circular(8),),
+                  child: MyLoadImage(
+                    card_img,
+                    width: 172.5,
+                    height: 80.5.ap,
+                    isCircle: false,
+                    fit: BoxFit.cover,
                   ),
                 ),
               ),
             ],
           ),
-        ),
-        // 价格 及 收藏
-        Padding(
-          padding: const EdgeInsets.only(left: 10, right: 10,top: 0, bottom: 0),
-          child: Row(
-            mainAxisAlignment: MainAxisAlignment.spaceAround,
-            crossAxisAlignment: CrossAxisAlignment.center,
-            children: [
-              Expanded(
-                child: Row(
-                  mainAxisAlignment: MainAxisAlignment.start,
-                  crossAxisAlignment: CrossAxisAlignment.center,
-                  children: [
-                    MyTextView(
-                      'from',
-                      maxLines: 1,
+          // 标题
+          Padding(
+            padding: const EdgeInsets.only(left: 10, right: 10, top: 10,),
+            child: Row(
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: [
+                Expanded(
+                  child: SizedBox(
+                    height: 40.ap,
+                    child: MyTextView(
+                      card_name,
+                      maxLines: 2,
                       isTextEllipsis: true,
-                      textAlign: TextAlign.start,
-                      textColor: ColorUtils.string2Color('#666666'),
-                      fontSize: 11,
-                      isFontMedium: true,
-                    ),
-                    MyTextView(
-                      '\$$card_price',
-                      maxLines: 1,
-                      isTextEllipsis: true,
-                      textAlign: TextAlign.start,
-                      textColor: ColorUtils.string2Color('#4161D0'),
+                      textAlign: TextAlign.left,
+                      textColor: context.appColors.textBlack,
                       fontSize: 15,
-                      isFontMedium: true,
-                      marginLeft: 2,
+                      isFontRegular: true,
                     ),
-                    // MyTextView(
-                    //   '$',
-                    //   maxLines: 1,
-                    //   isTextEllipsis: true,
-                    //   textAlign: TextAlign.start,
-                    //   textColor: ColorUtils.string2Color('#666666'),
-                    //   fontSize: 11,
-                    //   isFontMedium: true,
-                    // ),
-                  ],
+                  ),
                 ),
-              ),
-              // 动态的 收藏数
-              CollectionWidget(
-                collectionNum: card_likes_count,
-                isCollection: card_liked,
-                onClickColleciotn: onClickColleciotn,
-              ),
-            ],
+              ],
+            ),
           ),
-        ),
-        // 公司名称
-        Expanded(
-          child: Padding(
-            padding: const EdgeInsets.only(bottom: 5),
-            child: MyTextView(
-              company_name,
-              maxLines: 1,
-              isTextEllipsis: true,
-              textAlign: TextAlign.start,
-              marginLeft: 13,
-              fontSize: 11,
-              textColor: ColorUtils.string2Color('#666666'),
-              alignment: Alignment.centerLeft,
-              isFontRegular: true,
+          // 价格 及 收藏
+          Padding(
+            padding: const EdgeInsets.only(left: 10, right: 10,top: 0, bottom: 0),
+            child: Row(
+              mainAxisAlignment: MainAxisAlignment.spaceAround,
+              crossAxisAlignment: CrossAxisAlignment.center,
+              children: [
+                Expanded(
+                  child: Row(
+                    mainAxisAlignment: MainAxisAlignment.start,
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    children: [
+                      MyTextView(
+                        'from',
+                        maxLines: 1,
+                        isTextEllipsis: true,
+                        textAlign: TextAlign.start,
+                        textColor: ColorUtils.string2Color('#666666'),
+                        fontSize: 11,
+                        isFontMedium: true,
+                      ),
+                      MyTextView(
+                        '\$$card_price',
+                        maxLines: 1,
+                        isTextEllipsis: true,
+                        textAlign: TextAlign.start,
+                        textColor: ColorUtils.string2Color('#4161D0'),
+                        fontSize: 15,
+                        isFontMedium: true,
+                        marginLeft: 2,
+                      ),
+                      // MyTextView(
+                      //   '$',
+                      //   maxLines: 1,
+                      //   isTextEllipsis: true,
+                      //   textAlign: TextAlign.start,
+                      //   textColor: ColorUtils.string2Color('#666666'),
+                      //   fontSize: 11,
+                      //   isFontMedium: true,
+                      // ),
+                    ],
+                  ),
+                ),
+                // 动态的 收藏数
+                CollectionWidget(
+                  collectionNum: card_likes_count,
+                  isCollection: card_liked,
+                  onClickColleciotn: onClickColleciotn,
+                ),
+              ],
             ),
           ),
-        )
-      ],
+          // 公司名称
+          Expanded(
+            child: Padding(
+              padding: const EdgeInsets.only(bottom: 0),
+              child: MyTextView(
+                company_name,
+                maxLines: 1,
+                isTextEllipsis: true,
+                textAlign: TextAlign.start,
+                marginLeft: 13,
+                fontSize: 11,
+                textColor: ColorUtils.string2Color('#666666'),
+                alignment: Alignment.centerLeft,
+                isFontRegular: true,
+              ),
+            ),
+          )
+        ],
+      ),
     );
   }
 }

+ 2 - 1
packages/cpt_services/lib/modules/services/repair_homeService/home_service_page.dart

@@ -96,7 +96,8 @@ class RepairHomeServicePage extends HookConsumerWidget {
                           crossAxisCount: 2, // 每行显示两个项目
                           mainAxisSpacing: 15,
                           crossAxisSpacing: 15,
-                          childAspectRatio: 172.5/170, // 宽高比
+                          // childAspectRatio: 172.5/170, // 宽高比
+                          childAspectRatio: 180/200, // 宽高比
                           // childAspectRatio:  172.5/170 * ScreenUtil.getAdapterSizeCtx(context, 172.5/170), // 宽高比
                           // childAspectRatio:  172.5/170 * ((172.5/170).ap), // 宽高比
                         ),

+ 3 - 1
packages/cpt_services/lib/modules/services/service_clean_detail/service_clean_detail_page.dart

@@ -192,9 +192,11 @@ class ServiceCleanDetailPage extends HookConsumerWidget {
                       hilightStr,
                       fontSize: 13,
                       isFontRegular: true,
+                      isTextEllipsis: true,
+                      maxLines: 2,
                       textColor: context.appColors.textDarkGray,
                       marginLeft: 5,
-                    ):const SizedBox.shrink(),
+                    ).expanded():const SizedBox.shrink(),
                   ],
                 ),
               ),

+ 3 - 6
packages/cpt_services/lib/modules/services/services_main_page.dart

@@ -21,9 +21,6 @@ import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:widgets/widget_export.dart';
 
 import '../../router/page/services_page_router.dart';
-import 'inProgress/in_progress_page.dart';
-import 'repair/repair_page.dart';
-import 'services_page.dart';
 
 enum ServicesType {
   paid,
@@ -134,8 +131,8 @@ class ServicesMainPage extends HookConsumerWidget {
           ServicesType.inquiry,
           Assets.serviceMaintenance,
           "Maintenance",
-          129,
-          107.5
+          102.5,
+          82.5
         );
     }else {
       return _buildServiceCard(
@@ -187,7 +184,7 @@ class ServicesMainPage extends HookConsumerWidget {
             child: Container(
               child: MyLoadImage(
                 imagePath,
-                fit: BoxFit.cover,
+                fit: BoxFit.fitWidth,
                 width: iconWidth,
                 height: iconHeight,
               ),