Browse Source

Merge branch 'dev' of http://git.wmzhubo.com/guadoutech/YYHome into dev

glglove 1 day ago
parent
commit
5afbfc3584

+ 7 - 3
packages/cpt_main/lib/modules/main/main_page.dart

@@ -21,10 +21,14 @@ class MainPage extends HookConsumerWidget {
   static void startInstance({BuildContext? context}) {
     if (context != null) {
       context.router.popUntilRoot();
-      context.router.replace(const MainPageRoute());
+      if (context.router.current.name != 'MainPageRoute') {
+        context.router.replace(const MainPageRoute());
+      }
     } else {
       appRouter.popUntilRoot();
-      appRouter.replace(const MainPageRoute());
+      if (appRouter.current.name != 'MainPageRoute') {
+        appRouter.replace(const MainPageRoute());
+      }
     }
   }
 
@@ -52,7 +56,7 @@ class MainPage extends HookConsumerWidget {
           currentIndex: tabsRouter.activeIndex,
           onTap: tabsRouter.setActiveIndex,
           unselectedLabelStyle: const TextStyle(color: AppColorsTheme.color666666, fontWeight: FontWeight.w400),
-          selectedLabelStyle:  TextStyle(color: context.appColors.textPrimary, fontWeight: FontWeight.w400),
+          selectedLabelStyle: TextStyle(color: context.appColors.textPrimary, fontWeight: FontWeight.w400),
           unselectedFontSize: 12,
           selectedFontSize: 12,
           items: () {

+ 2 - 1
packages/cpt_main/lib/modules/visitor/register/visitor_register_view_model.dart

@@ -6,6 +6,7 @@ import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/engine/notify/notify_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/date_time_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/util.dart';
@@ -99,7 +100,7 @@ class VisitorRegisterViewModel extends _$VisitorRegisterViewModel with DioCancel
     if (result.isSuccess) {
       NotifyEngine.showSuccess(S.current.successful);
       //去首页
-      MainPage.startInstance();
+      appRouter.maybePop();
     } else {
       ToastEngine.show(result.errorMsg ?? "UnKnow Error");
     }

+ 2 - 2
packages/cpt_payment/lib/modules/payment/payment_page.dart

@@ -59,8 +59,8 @@ class PaymentPage extends HookConsumerWidget {
                     _buildTopCategory(
                       context,
                       Assets.paymentInfoIcon,
-                      50.0,
-                      50.0,
+                      65.0,
+                      65.0,
                       S.current.info,
                       tabsRouter.activeIndex == 0,
                     ).onTap(

+ 28 - 19
packages/cpt_profile/lib/modules/setting/setting_view_model.dart

@@ -18,7 +18,7 @@ import 'package:widgets/dialog/app_default_dialog.dart';
 part 'setting_view_model.g.dart';
 
 @riverpod
-class SettingViewModel extends _$SettingViewModel with DioCancelableMixin{
+class SettingViewModel extends _$SettingViewModel with DioCancelableMixin {
   late final AuthRepository _authRepository;
 
   @override
@@ -51,42 +51,51 @@ class SettingViewModel extends _$SettingViewModel with DioCancelableMixin{
     ));
   }
 
-  /// 调用接口注册FCM
+  /// 调用接口注退出登录
   void _requestLogout() async {
     final result = await _authRepository.authLogout(cancelToken: cancelToken);
-
     //请求成功去首页
     if (result.isSuccess) {
       //清除用户登录信息
-      UserConfigService.getInstance().handleLogoutParams();
-      // 清除 garagesale category 缓存
-      SPUtil.remove(AppConstant.storageGarageCategoryList);
-      // 清除 servives category 缓存
-      SPUtil.remove(AppConstant.storagePaidServiceCategoryList);
-      SPUtil.remove(AppConstant.storageRepairServiceCategoryList);
-      //清除全部页面栈去登录页面
-      ComponentServiceManager().authService.startAndPopAllLoginPage();
+      _gotoLoginPage();
     } else {
       ToastEngine.show(result.errorMsg ?? "UnKnow Error");
     }
   }
 
+  void _gotoLoginPage() {
+    UserConfigService.getInstance().handleLogoutParams();
+    // 清除 garagesale category 缓存
+    SPUtil.remove(AppConstant.storageGarageCategoryList);
+    // 清除 servives category 缓存
+    SPUtil.remove(AppConstant.storagePaidServiceCategoryList);
+    SPUtil.remove(AppConstant.storageRepairServiceCategoryList);
+    //清除全部页面栈去登录页面
+    ComponentServiceManager().authService.startAndPopAllLoginPage();
+  }
+
   //删除账号的提示弹窗
   void doDeleteAccount() {
     DialogEngine.show(widget: AccountDeactivationDialog(
       confirmAction: () {
         //请求接口删除账号
-
-        //清除用户登录信息
-        UserConfigService.getInstance().handleLogoutParams();
-        //清除全部页面栈去登录页面
-        ComponentServiceManager().authService.startAndPopAllLoginPage();
+        _requestAccountDeactivate();
       },
     ));
   }
 
-  //评价我们,跳转到各平台的应用商城
-  void rateUs() {
-
+  //请求删除账号
+  void _requestAccountDeactivate() async {
+    final result = await _authRepository.accountDeactivate(cancelToken: cancelToken);
+    //请求成功去首页
+    if (result.isSuccess) {
+      //清除用户登录信息
+      _gotoLoginPage();
+    } else {
+      ToastEngine.show(result.errorMsg ?? "UnKnow Error");
+    }
   }
+
+  //评价我们,跳转到各平台的应用商城
+  void rateUs() {}
 }

+ 177 - 77
packages/cpt_rewards/lib/modules/rewards_detail/rewards_detail_page.dart

@@ -8,6 +8,7 @@ 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/date_time_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/color_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
@@ -27,7 +28,8 @@ import './rewards_detail_vm.dart';
 class RewardsDetailPage extends HookConsumerWidget {
   final int? id;
 
-  const RewardsDetailPage({Key? key, @PathParam('id') required this.id}) : super(key: key);
+  const RewardsDetailPage({Key? key, @PathParam('id') required this.id})
+      : super(key: key);
 
   //启动当前页面
   static void startInstance({
@@ -53,6 +55,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     String redeemedStart = detailInfo.redeemedStart ?? "";
     String redeemedEnd = detailInfo.redeemedEnd ?? "";
     String redeemedDate = '$redeemedStart-$redeemedEnd';
+    String? createAt = '${redeemedStart.split(" at ")[0]} ${redeemedStart.split(" at ")[1]}';
+    String? createEnd =
+        '${redeemedEnd.split(" at ")[0]} ${redeemedEnd.split(" at ")[1]}';
+        String cretaeDate = '$createAt-$createEnd';
     return Column(
       children: [
         Container(
@@ -81,7 +87,10 @@ class RewardsDetailPage extends HookConsumerWidget {
                       maxLines: 1, // 设置最大行数为2
                       overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                       title,
-                      style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
+                      style: TextStyle(
+                          fontSize: 16.0,
+                          color: context.appColors.textBlack,
+                          fontWeight: FontWeight.w500),
                     ),
                     Text(
                       maxLines: 1, // 设置最大行数为2
@@ -89,20 +98,27 @@ class RewardsDetailPage extends HookConsumerWidget {
                       '${S.current.published_date}: $createdAt',
                       style: TextStyle(
                           fontSize: 13.0,
-                          color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
+                          color: DarkThemeUtil.multiColors(
+                              context, ColorUtils.string2Color('#808DAF'),
+                              darkColor: Colors.white),
                           fontWeight: FontWeight.w400),
                     ).marginOnly(bottom: 5),
                     Row(
                       children: [
                         Text(
                           '$point',
-                          style: TextStyle(fontSize: 19.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500),
+                          style: TextStyle(
+                              fontSize: 19.0,
+                              color: context.appColors.textBlack,
+                              fontWeight: FontWeight.w500),
                         ),
                         Text(
                           '$originalPoint',
                           style: TextStyle(
                               decoration: TextDecoration.lineThrough,
-                              decorationColor: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
+                              decorationColor: DarkThemeUtil.multiColors(
+                                  context, ColorUtils.string2Color('#808DAF'),
+                                  darkColor: Colors.white),
                               decorationStyle: TextDecorationStyle.solid,
                               fontSize: 12.0,
                               color: ColorUtils.string2Color('#808DAF'),
@@ -110,7 +126,10 @@ class RewardsDetailPage extends HookConsumerWidget {
                         ).marginOnly(left: 5, right: 5),
                         Text(
                           S.current.points,
-                          style: TextStyle(fontSize: 13.0, color: context.appColors.textBlack, fontWeight: FontWeight.w400),
+                          style: TextStyle(
+                              fontSize: 13.0,
+                              color: context.appColors.textBlack,
+                              fontWeight: FontWeight.w400),
                         ),
                       ],
                     ),
@@ -118,11 +137,13 @@ class RewardsDetailPage extends HookConsumerWidget {
                       description,
                       style: TextStyle(
                           fontSize: 13.0,
-                          color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
+                          color: DarkThemeUtil.multiColors(
+                              context, ColorUtils.string2Color('#808DAF'),
+                              darkColor: Colors.white),
                           fontWeight: FontWeight.w400),
                     ).marginOnly(bottom: 10, top: 10),
                     Container(
-                        height: 68,
+                        height: 28,
                         decoration: BoxDecoration(
                           color: ColorUtils.string2Color('#F2F3F6'),
                           borderRadius:
@@ -135,16 +156,18 @@ class RewardsDetailPage extends HookConsumerWidget {
                               mainAxisAlignment: MainAxisAlignment.start,
                               crossAxisAlignment: CrossAxisAlignment.center,
                               children: [
-                                 MyAssetImage(
+                                MyAssetImage(
                                   Assets.rewardsRewardsDetailDay,
                                   width: 25,
                                   height: 25,
-                                   color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
-                                ).marginOnly(right: 5),
+                                  color: DarkThemeUtil.multiColors(
+                                      context, AppColorsTheme.colorPrimary,
+                                      darkColor: Colors.white),
+                                ),
                                 Text(
                                   maxLines: 1, // 设置最大行数为2
                                   overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-                                   '$redeemedStart',
+                                  '$cretaeDate',
                                   style: TextStyle(
                                       fontSize: 14.0,
                                       color: ColorUtils.string2Color('#808DAF'),
@@ -152,47 +175,52 @@ class RewardsDetailPage extends HookConsumerWidget {
                                 )
                               ],
                             ).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, // 超出部分用省略号表示
-                               '$redeemedEnd',
-                              style: TextStyle(
-                                  fontSize: 14.0,
-                                  color: ColorUtils.string2Color('#808DAF'),
-                                  fontWeight: FontWeight.w400),
-                            ).marginOnly(left: 30)
+                            // 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, // 超出部分用省略号表示
+                            //   '$redeemedEnd',
+                            //   style: TextStyle(
+                            //       fontSize: 14.0,
+                            //       color: ColorUtils.string2Color('#808DAF'),
+                            //       fontWeight: FontWeight.w400),
+                            // ).marginOnly(left: 30)
                           ],
                         )),
                     Container(
                             height: 28,
                             decoration: BoxDecoration(
                               color: ColorUtils.string2Color('#F2F3F6'),
-                              borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                              borderRadius:
+                                  const BorderRadius.all(Radius.circular(6.0)),
                             ),
                             child: Row(
                               mainAxisSize: MainAxisSize.min,
                               mainAxisAlignment: MainAxisAlignment.start,
                               crossAxisAlignment: CrossAxisAlignment.center,
                               children: [
-                                 MyAssetImage(
+                                MyAssetImage(
                                   Assets.rewardsRewardsDetailRequired,
                                   width: 25,
                                   height: 25,
-                                   color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
-                                ).marginOnly(right: 5),
+                                  color: DarkThemeUtil.multiColors(
+                                      context, AppColorsTheme.colorPrimary,
+                                      darkColor: Colors.white),
+                                ),
                                 Text(
                                   maxLines: 1, // 设置最大行数为2
                                   overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-                                  reservation ? S.current.reservation_required : S.current.no_reservation_required,
+                                  reservation
+                                      ? S.current.reservation_required
+                                      : S.current.no_reservation_required,
                                   style: TextStyle(
                                       fontSize: 14.0,
                                       color: ColorUtils.string2Color('#808DAF'),
@@ -216,7 +244,10 @@ class RewardsDetailPage extends HookConsumerWidget {
           decoration: const BoxDecoration(
             color: Colors.white,
             borderRadius: BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [BoxShadow(color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)],
+            boxShadow: [
+              BoxShadow(
+                  color: Color.fromRGBO(184, 191, 217, 0.3), blurRadius: 6)
+            ],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -227,34 +258,44 @@ class RewardsDetailPage extends HookConsumerWidget {
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.rewardsRewardsDetailDeal,
                     width: 25,
                     height: 25,
-                    color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                    color: DarkThemeUtil.multiColors(
+                        context, AppColorsTheme.colorPrimary,
+                        darkColor: Colors.white),
                   ).marginOnly(right: 10),
                   Text(
                     S.current.redeem_deal_at,
-                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack   , fontWeight: FontWeight.w500),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: context.appColors.textBlack,
+                        fontWeight: FontWeight.w500),
                   )
                 ],
               ),
               Container(
                       height: 77,
                       decoration: BoxDecoration(
-                        color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#F2F3F6'),darkColor: Colors.white),
-                        borderRadius: const BorderRadius.all(Radius.circular(6.0)),
+                        color: DarkThemeUtil.multiColors(
+                            context, ColorUtils.string2Color('#F2F3F6'),
+                            darkColor: Colors.white),
+                        borderRadius:
+                            const BorderRadius.all(Radius.circular(6.0)),
                       ),
                       child: Row(
                         mainAxisSize: MainAxisSize.max,
                         mainAxisAlignment: MainAxisAlignment.start,
                         crossAxisAlignment: CrossAxisAlignment.center,
                         children: [
-                           MyAssetImage(
+                          MyAssetImage(
                             Assets.rewardsRewardsIndex1,
                             width: 60,
                             height: 60,
-                            color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                            color: DarkThemeUtil.multiColors(
+                                context, AppColorsTheme.colorPrimary,
+                                darkColor: Colors.white),
                           ).marginOnly(right: 15),
                           Column(
                             crossAxisAlignment: CrossAxisAlignment.start,
@@ -263,13 +304,23 @@ class RewardsDetailPage extends HookConsumerWidget {
                                 maxLines: 1, // 设置最大行数为2
                                 overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                                 'Delibowl Group',
-                                style: TextStyle(fontSize: 15.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w500),
+                                style: TextStyle(
+                                    fontSize: 15.0,
+                                    color: DarkThemeUtil.multiColors(context,
+                                        ColorUtils.string2Color('#54638C'),
+                                        darkColor: Colors.white),
+                                    fontWeight: FontWeight.w500),
                               ).marginOnly(bottom: 8),
                               Text(
                                 maxLines: 1, // 设置最大行数为2
                                 overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
                                 '#01-136, SingPost Center, 408600',
-                                style: TextStyle(fontSize: 14.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
+                                style: TextStyle(
+                                    fontSize: 14.0,
+                                    color: DarkThemeUtil.multiColors(context,
+                                        ColorUtils.string2Color('#54638C'),
+                                        darkColor: Colors.white),
+                                    fontWeight: FontWeight.w400),
                               )
                             ],
                           ).paddingOnly(
@@ -284,13 +335,20 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     'Also redeemable in 1 more location',
-                    style: TextStyle(fontSize: 15.0, color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: DarkThemeUtil.multiColors(
+                            context, ColorUtils.string2Color('#54638C'),
+                            darkColor: Colors.white),
+                        fontWeight: FontWeight.w400),
                   ),
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.rewardsRewardsRight,
                     width: 12,
                     height: 16,
-                    color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                    color: DarkThemeUtil.multiColors(
+                        context, AppColorsTheme.colorPrimary,
+                        darkColor: Colors.white),
                   ),
                 ],
               ),
@@ -306,10 +364,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration:  BoxDecoration(
-            color:context.appColors.whiteBG ,
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
             borderRadius: const BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow )],
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -320,15 +378,20 @@ class RewardsDetailPage extends HookConsumerWidget {
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.rewardsRewardsDetailPackage,
                     width: 25,
                     height: 25,
-                    color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                    color: DarkThemeUtil.multiColors(
+                        context, AppColorsTheme.colorPrimary,
+                        darkColor: Colors.white),
                   ).marginOnly(right: 10),
                   Text(
                     'What’s In The Package',
-                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack  , fontWeight: FontWeight.w500),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: context.appColors.textBlack,
+                        fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -337,7 +400,12 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     package,
-                    style: TextStyle(fontSize: 15.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: DarkThemeUtil.multiColors(
+                            context, ColorUtils.string2Color('#54638C'),
+                            darkColor: Colors.white),
+                        fontWeight: FontWeight.w400),
                   ),
                 ],
               ),
@@ -353,10 +421,10 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration:  BoxDecoration(
-            color:context.appColors.whiteBG   ,
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
             borderRadius: const BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow   )],
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -367,15 +435,20 @@ class RewardsDetailPage extends HookConsumerWidget {
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.rewardsRewardsDetailNotice,
                     width: 25,
                     height: 25,
-                    color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                    color: DarkThemeUtil.multiColors(
+                        context, AppColorsTheme.colorPrimary,
+                        darkColor: Colors.white),
                   ).marginOnly(right: 10),
                   Text(
                     S.current.redemption_notice,
-                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack   , fontWeight: FontWeight.w500),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: context.appColors.textBlack,
+                        fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -384,7 +457,12 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     notice,
-                    style: TextStyle(fontSize: 15.0, color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: DarkThemeUtil.multiColors(
+                            context, ColorUtils.string2Color('#54638C'),
+                            darkColor: Colors.white),
+                        fontWeight: FontWeight.w400),
                   ),
                 ],
               ),
@@ -399,8 +477,8 @@ class RewardsDetailPage extends HookConsumerWidget {
     return Column(
       children: [
         Container(
-          decoration:  BoxDecoration(
-            color: context.appColors.whiteBG ,
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
             borderRadius: BorderRadius.all(Radius.circular(6.0)),
             boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
@@ -413,15 +491,20 @@ class RewardsDetailPage extends HookConsumerWidget {
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.rewardsRewardsDetailInstructions,
                     width: 25,
                     height: 25,
-                     color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                    color: DarkThemeUtil.multiColors(
+                        context, AppColorsTheme.colorPrimary,
+                        darkColor: Colors.white),
                   ).marginOnly(right: 10),
                   Text(
                     S.current.redemption_instructions,
-                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack , fontWeight: FontWeight.w500),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: context.appColors.textBlack,
+                        fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -430,7 +513,12 @@ class RewardsDetailPage extends HookConsumerWidget {
                 children: [
                   Text(
                     S.current.redemption_reservation_txt,
-                    style: TextStyle(fontSize: 15.0, color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: DarkThemeUtil.multiColors(
+                            context, ColorUtils.string2Color('#54638C'),
+                            darkColor: Colors.white),
+                        fontWeight: FontWeight.w400),
                   ),
                 ],
               ),
@@ -441,15 +529,16 @@ class RewardsDetailPage extends HookConsumerWidget {
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }
 
-  Widget _buildRedeemable(BuildContext context, WidgetRef ref, _vm, detailInfo) {
+  Widget _buildRedeemable(
+      BuildContext context, WidgetRef ref, _vm, detailInfo) {
     List? redeemable = detailInfo!.redeemable ?? [];
     return Column(
       children: [
         Container(
-          decoration:  BoxDecoration(
-            color: context.appColors.whiteBG    ,
+          decoration: BoxDecoration(
+            color: context.appColors.whiteBG,
             borderRadius: const BorderRadius.all(Radius.circular(6.0)),
-            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow    )],
+            boxShadow: [BoxShadow(color: context.appColors.itemBGShadow)],
           ),
           width: MediaQuery.of(context).size.width - 30,
           child: Column(
@@ -460,15 +549,20 @@ class RewardsDetailPage extends HookConsumerWidget {
                 mainAxisAlignment: MainAxisAlignment.start,
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.rewardsRewardsDetailNotice,
                     width: 25,
                     height: 25,
-                    color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                    color: DarkThemeUtil.multiColors(
+                        context, AppColorsTheme.colorPrimary,
+                        darkColor: Colors.white),
                   ).marginOnly(right: 10),
                   Text(
                     S.current.redeemable_on,
-                    style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack    , fontWeight: FontWeight.w500),
+                    style: TextStyle(
+                        fontSize: 15.0,
+                        color: context.appColors.textBlack,
+                        fontWeight: FontWeight.w500),
                   )
                 ],
               ).marginOnly(bottom: 10),
@@ -480,7 +574,12 @@ class RewardsDetailPage extends HookConsumerWidget {
                     final item = redeemable[index];
                     return Text(
                       '${item.day}: ${item.time}',
-                      style: TextStyle(fontSize: 15.0, color:DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#54638C'),darkColor: Colors.white), fontWeight: FontWeight.w400),
+                      style: TextStyle(
+                          fontSize: 15.0,
+                          color: DarkThemeUtil.multiColors(
+                              context, ColorUtils.string2Color('#54638C'),
+                              darkColor: Colors.white),
+                          fontWeight: FontWeight.w400),
                     );
                   },
                 ),
@@ -536,7 +635,8 @@ class RewardsDetailPage extends HookConsumerWidget {
                                   _buildPackage(context, ref, _vm, detailInfo),
                                   _buildNotice(context, ref, _vm, detailInfo),
                                   // _buildInstructions(context, ref, _vm),
-                                  _buildRedeemable(context, ref, _vm, detailInfo),
+                                  _buildRedeemable(
+                                      context, ref, _vm, detailInfo),
                                 ],
                               )),
                         ],

+ 1 - 1
packages/cs_domain/lib/constants/api_constants.dart

@@ -31,7 +31,7 @@ class ApiConstants {
   static const apiUserLogout = "/api/v1/user/auth/logout";
 
   //用户注销
-  static const apiAuthDeactivate = "/index.php/api/v1/hotel/deactivate";
+  static const apiAuthDeactivate = "/api/v1/user/auth/deactivation";
 
   //注册Token
   static const apiFCMToken = "/api/v1/user/auth/fcm-token";

+ 19 - 0
packages/cs_domain/lib/repository/auth_repository.dart

@@ -254,4 +254,23 @@ class AuthRepository {
     }
     return result.convert();
   }
+
+  /// 删除账号
+  Future<HttpResult> accountDeactivate({
+    CancelToken? cancelToken,
+  }) async {
+
+    final result = await dioEngine.requestNetResult(
+      ApiConstants.apiAuthDeactivate,
+      method: HttpMethod.POST,
+      isShowLoadingDialog: true,
+      networkDebounce: true,
+      cancelToken: cancelToken,
+    );
+
+    if (result.isSuccess) {
+      return result.convert();
+    }
+    return result.convert();
+  }
 }

+ 2 - 2
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -70,9 +70,9 @@ class MessageLookup extends MessageLookupByLibrary {
             "Kindly attach a copy of owner\'s authorisation letter"),
         "access_date": MessageLookupByLibrary.simpleMessage("Access Date"),
         "account_deactivate_alert": MessageLookupByLibrary.simpleMessage(
-            "Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request."),
+            "This action will permanently delete your account and all associated data. This cannot be undone. Are you sure you want to proceed?"),
         "account_deactivation":
-            MessageLookupByLibrary.simpleMessage("Account Deactivation"),
+            MessageLookupByLibrary.simpleMessage("Delete Account"),
         "active": MessageLookupByLibrary.simpleMessage("ACTIVE"),
         "add": MessageLookupByLibrary.simpleMessage("Add"),
         "add_card": MessageLookupByLibrary.simpleMessage("Add Card"),

+ 4 - 4
packages/cs_resources/lib/generated/l10n.dart

@@ -760,10 +760,10 @@ class S {
     );
   }
 
-  /// `Account Deactivation`
+  /// `Delete Account`
   String get account_deactivation {
     return Intl.message(
-      'Account Deactivation',
+      'Delete Account',
       name: 'account_deactivation',
       desc: '',
       args: [],
@@ -910,10 +910,10 @@ class S {
     );
   }
 
-  /// `Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.`
+  /// `This action will permanently delete your account and all associated data. This cannot be undone. Are you sure you want to proceed?`
   String get account_deactivate_alert {
     return Intl.message(
-      'Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.',
+      'This action will permanently delete your account and all associated data. This cannot be undone. Are you sure you want to proceed?',
       name: 'account_deactivate_alert',
       desc: '',
       args: [],

+ 2 - 2
packages/cs_resources/lib/l10n/intl_en.arb

@@ -71,7 +71,7 @@
   "change_mobile_phone": "Change Mobile Phone",
   "privacy_policy": "Privacy Policy",
   "terms_conditions": "Terms & Conditions",
-  "account_deactivation": "Account Deactivation",
+  "account_deactivation": "Delete Account",
   "rate_us": "Rate Us",
   "version_no": "Version No.",
   "logout": "Logout",
@@ -86,7 +86,7 @@
   "no": "No",
   "alert": "Alert",
   "logout_alert": "Are you sure you want to logout?",
-  "account_deactivate_alert": "Are you sure you want to deactivate your account? You will not be able to login into the app once you proceed with the request.",
+  "account_deactivate_alert": "This action will permanently delete your account and all associated data. This cannot be undone. Are you sure you want to proceed?",
   "home": "Home",
   "visitor": "Visitor",
   "feedback": "FeedBack",