Browse Source

反馈问题处理

“shanwenxin” 4 days ago
parent
commit
a00f552ebc

+ 37 - 15
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_page.dart

@@ -122,34 +122,56 @@ class RewardsDetailPage extends HookConsumerWidget {
                           fontWeight: FontWeight.w400),
                     ).marginOnly(bottom: 10, top: 10),
                     Container(
-                        height: 28,
+                        height: 68,
                         decoration: BoxDecoration(
                           color: ColorUtils.string2Color('#F2F3F6'),
                           borderRadius:
                               const BorderRadius.all(Radius.circular(6.0)),
                         ),
-                        child: Row(
-                          mainAxisSize: MainAxisSize.min,
-                          mainAxisAlignment: MainAxisAlignment.start,
-                          crossAxisAlignment: CrossAxisAlignment.center,
+                        child: Column(
                           children: [
-                             MyAssetImage(
-                              Assets.rewardsRewardsDetailDay,
-                              width: 25,
-                              height: 25,
-                               color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
-                            ).marginOnly(right: 5),
+                            Row(
+                              mainAxisSize: MainAxisSize.min,
+                              mainAxisAlignment: MainAxisAlignment.start,
+                              crossAxisAlignment: CrossAxisAlignment.center,
+                              children: [
+                                 MyAssetImage(
+                                  Assets.rewardsRewardsDetailDay,
+                                  width: 25,
+                                  height: 25,
+                                   color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                                ).marginOnly(right: 5),
+                                Text(
+                                  maxLines: 1, // 设置最大行数为2
+                                  overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                                   '$redeemedStart',
+                                  style: TextStyle(
+                                      fontSize: 14.0,
+                                      color: ColorUtils.string2Color('#808DAF'),
+                                      fontWeight: FontWeight.w400),
+                                )
+                              ],
+                            ).paddingOnly(left: 7, right: 12),
+                            Text(
+                              maxLines: 1, // 设置最大行数为2
+                              overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
+                              '|',
+                              style: TextStyle(
+                                  fontSize: 14.0,
+                                  color: ColorUtils.string2Color('#808DAF'),
+                                  fontWeight: FontWeight.w400),
+                            ),
                             Text(
                               maxLines: 1, // 设置最大行数为2
                               overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-                              redeemedDate,
+                               '$redeemedEnd',
                               style: TextStyle(
-                                  fontSize: 12.0,
+                                  fontSize: 14.0,
                                   color: ColorUtils.string2Color('#808DAF'),
                                   fontWeight: FontWeight.w400),
-                            )
+                            ).marginOnly(left: 30)
                           ],
-                        ).paddingOnly(left: 7, right: 12)),
+                        )),
                     Container(
                             height: 28,
                             decoration: BoxDecoration(

+ 2 - 2
packages/cpt_rewards/lib/modules/rewards_history/rewards_history_page.dart

@@ -80,10 +80,10 @@ class RewardsHistoryPage extends HookConsumerWidget {
                   ),
                 ],
               ),
-            ).marginOnly(left: 20, right: 0, top: 15, bottom: 5);
+            );
           }),
         ),
-      ),
+      ).marginOnly(left: 18, right: 18, top: 15, bottom: 5),
     );
   }
 

+ 30 - 18
packages/cpt_rewards/lib/modules/rewards_home/rewards_home_page.dart

@@ -209,8 +209,7 @@ class RewardsHomePage extends HookConsumerWidget {
   }
 
   Widget _buildRecommend(BuildContext context, WidgetRef ref, _vm, list) {
-    return list['rewards'].length > 0
-        ? Container(
+    return  Container(
             child: Column(
               children: [
                 Row(
@@ -229,7 +228,8 @@ class RewardsHomePage extends HookConsumerWidget {
                     }),
                   ],
                 ).marginOnly(bottom: 15),
-                Row(
+                list['rewards'].length > 0
+              ? Row(
                     crossAxisAlignment: CrossAxisAlignment.center,
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     children: List.generate(list['rewards'].length, (index) {
@@ -245,11 +245,15 @@ class RewardsHomePage extends HookConsumerWidget {
                           child: ClipRRect(
                               borderRadius: const BorderRadius.all(Radius.circular(6.0)),
                               child: _buildItem(context, ref, _vm, hg, list['rewards'][index])));
-                    }))
+                    })):
+                    const MyAssetImage(
+                                  Assets.baseServicePageNoData,
+                                  width: 185,
+                                  height: 173,
+                                ),
               ],
             ),
-          ).paddingOnly(left: 15, right: 15, top: 10)
-        : Container();
+          ).paddingOnly(left: 15, right: 15, top: 10);
   }
 
   Widget _buildHottest(BuildContext context, WidgetRef ref, _vm) {
@@ -345,8 +349,7 @@ class RewardsHomePage extends HookConsumerWidget {
   }
 
   Widget _buildFood(BuildContext context, WidgetRef ref, _vm, list) {
-    return list['rewards'].length > 0
-        ? Container(
+    return  Container(
             child: Column(
               children: [
                 Row(
@@ -365,7 +368,8 @@ class RewardsHomePage extends HookConsumerWidget {
                     }),
                   ],
                 ).marginOnly(bottom: 15),
-                Row(
+               list['rewards'].length > 0
+              ? Row(
                     crossAxisAlignment: CrossAxisAlignment.center,
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     children: List.generate(list['rewards'].length, (index) {
@@ -380,16 +384,19 @@ class RewardsHomePage extends HookConsumerWidget {
                           ),
                           child: ClipRRect(
                               borderRadius: const BorderRadius.all(Radius.circular(6.0)), child: _buildItem(context, ref, _vm, hg, list['rewards'][index])));
-                    }))
+                    })):
+                    const MyAssetImage(
+                                  Assets.baseServicePageNoData,
+                                  width: 185,
+                                  height: 173,
+                                ),
               ],
             ),
-          ).paddingOnly(left: 15, right: 15, top: 10)
-        : Container();
+          ).paddingOnly(left: 15, right: 15, top: 10);
   }
 
   Widget _buildBest(BuildContext context, WidgetRef ref, _vm, list) {
-    return list['rewards'].length > 0
-        ? Container(
+    return  Container(
             child: Column(
               children: [
                 Row(
@@ -406,7 +413,8 @@ class RewardsHomePage extends HookConsumerWidget {
                     ),
                   ],
                 ).marginOnly(bottom: 15),
-                Column(
+                list['rewards'].length > 0
+              ? Column(
                     crossAxisAlignment: CrossAxisAlignment.center,
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     children: List.generate(list['rewards'].length, (index) {
@@ -422,11 +430,15 @@ class RewardsHomePage extends HookConsumerWidget {
                               child: ClipRRect(
                                   borderRadius: const BorderRadius.all(Radius.circular(6.0)), child: _buildItem(context, ref, _vm, hg, list['rewards'][index])))
                           .marginOnly(bottom: 13);
-                    }))
+                    })):
+                    const MyAssetImage(
+                                  Assets.baseServicePageNoData,
+                                  width: 185,
+                                  height: 173,
+                                ),
               ],
             ),
-          ).paddingOnly(left: 15, right: 15, top: 10)
-        : Container();
+          ).paddingOnly(left: 15, right: 15, top: 10);
   }
 
   @override

+ 3 - 3
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_active/rewards_my_active_page.dart

@@ -104,13 +104,13 @@ class RewardsMyActivePage extends HookConsumerWidget {
                   color: context.appColors.btnBgDefaultDark,
                   borderRadius: BorderRadius.circular(8), // 圆角
                 ),
-                child: Expanded(
-                    child: Container(
+                child:
+                    Container(
                         alignment: Alignment.center,
                         child: Text(
                           S.current.redeem_now,
                           style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w500),
-                        )))).marginOnly(top: 10, bottom: 10).onTap(() {
+                        ))).marginOnly(top: 10, bottom: 10).onTap(() {
               RewardsCodePage.startInstance(code: code);
             }),
           ],

+ 2 - 2
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_page.dart

@@ -76,10 +76,10 @@ class RewardsMyPage extends HookConsumerWidget {
                   ),
                 ],
               ),
-            ).marginOnly(left: 20, right: 0, top: 10, bottom: 10);
+            );
           }),
         ),
-      ),
+      ).marginOnly(left: 18, right: 18, top: 10, bottom: 10),
     );
   }
 

+ 2 - 3
packages/cpt_rewards/lib/modules/rewards_my/rewards_my_used/rewards_my_used_page.dart

@@ -121,13 +121,12 @@ class RewardsMyUsedPage extends HookConsumerWidget {
                   color: context.appColors.btnBgDefaultDark,
                   borderRadius: BorderRadius.circular(8), // 圆角
                 ),
-                child: Expanded(
-                    child: Container(
+                child: Container(
                         alignment: Alignment.center,
                         child: Text(
                           S.current.view,
                           style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w500),
-                        )))).marginOnly(top: 10, bottom: 5).onTap(() {
+                        ))).marginOnly(top: 10, bottom: 5).onTap(() {
               RewardsTransactionPage.startInstance(id: id);
             }),
           ],