Browse Source

splash的相关配置

liukai 3 months ago
parent
commit
7a3f902c05

+ 1 - 1
app/android/app/src/main/res/drawable-v21/launch_background.xml

@@ -5,7 +5,7 @@
     <item >
         <bitmap
             android:gravity="center"
-            android:src="@drawable/yy_business_top_logo"/>
+            android:src="@drawable/yyhome_splash"/>
     </item>
 
 </layer-list>

BIN
app/android/app/src/main/res/drawable-xhdpi/yy_business_top_logo.webp


BIN
app/android/app/src/main/res/drawable-xhdpi/yyhome_splash.png


BIN
app/android/app/src/main/res/drawable-xxhdpi/yy_business_top_logo.webp


BIN
app/android/app/src/main/res/drawable-xxhdpi/yyhome_splash.png


+ 1 - 1
app/android/app/src/main/res/drawable/launch_background.xml

@@ -5,7 +5,7 @@
     <item >
         <bitmap
             android:gravity="center"
-            android:src="@drawable/yy_business_top_logo"/>
+            android:src="@drawable/yyhome_splash"/>
     </item>
 
 </layer-list>

+ 1 - 6
app/android/app/src/main/res/drawable/shape_page_bg.xml

@@ -2,11 +2,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
 
-    <gradient
-        android:startColor="#091D44"
-        android:centerColor="#245A8A"
-        android:endColor="#7F7CEC"
-        android:type="linear"
-        android:angle="270" />
+    <solid android:color="#FFFFFF" /> <!-- 设置为纯白色 -->
 
 </shape>

+ 9 - 25
app/lib/modules/splash/page/splash_page.dart

@@ -1,12 +1,10 @@
+import 'package:app/main.dart';
 import 'package:app/router/page/app_page_router.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:cs_resources/generated/assets.dart';
-import 'package:router/componentRouter/app_service.dart';
-import 'package:router/path/router_path.dart';
 import 'package:shared/utils/size_config.dart';
-import 'package:widgets/dialog/custom_error_widget.dart';
-import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:auto_route/annotations.dart';
 import '../vm/splash_view_model.dart';
@@ -23,27 +21,13 @@ class SplashPage extends HookConsumerWidget {
    final viewModel = ref.watch(splashViewModelProvider.notifier)..setContext(context);
 
     return Scaffold(
-      body: Container(
-        decoration: const BoxDecoration(
-          gradient: LinearGradient(
-            colors: [
-              Color(0xFF091D44),
-              Color(0xFF245A8A),
-              Color(0xFF7F7CEC),
-            ],
-            begin: Alignment.topCenter,
-            end: Alignment.bottomCenter,
-          ),
-        ),
-        child:  Center(
-          child: const MyAssetImage(
-            Assets.assetsYyBusinessTopLogo,
-            width: 166,
-            height: 67.5,
-            fit: BoxFit.contain,
-          ).onTap((){
-            context.router.pushNamed(RouterPath.main);
-          }),
+      backgroundColor: context.appColors.backgroundWhite,
+      body: const Center(
+        child: MyAssetImage(
+          Assets.assetsYyHomeSplash,
+          width: 84.5,
+          height: 100,
+          fit: BoxFit.contain,
         ),
       ),
     );

+ 29 - 33
packages/cpt_auth/lib/modules/sign_up/sign_up_page.dart

@@ -1,4 +1,3 @@
-
 import 'package:cpt_auth/modules/sign_up/sign_up_state.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/l10n.dart';
@@ -124,7 +123,6 @@ class SignUpPage extends HookConsumerWidget {
                     context,
                     state,
                     "phone",
-                    marginTop: 15,
                     textInputType: TextInputType.number,
                     textInputAction: TextInputAction.next,
                     errorText: state.phoneErrorText,
@@ -134,7 +132,7 @@ class SignUpPage extends HookConsumerWidget {
                     },
                   ).expanded(),
                 ],
-              ),
+              ).marginOnly(top: 15),
 
               // 表单 - 重置密码
               _buildInputLayout(
@@ -151,15 +149,15 @@ class SignUpPage extends HookConsumerWidget {
                   splashColor: Colors.transparent,
                   icon: state.pwdVisibility
                       ? const MyAssetImage(
-                    Assets.authPasswordHide,
-                    width: 22.5,
-                    height: 16.5,
-                  )
+                          Assets.authPasswordHide,
+                          width: 22.5,
+                          height: 16.5,
+                        )
                       : const MyAssetImage(
-                    Assets.authPasswordShow,
-                    width: 22.5,
-                    height: 16.5,
-                  ),
+                          Assets.authPasswordShow,
+                          width: 22.5,
+                          height: 16.5,
+                        ),
                   onPressed: () {
                     viewModel.switchPwdVisibility();
                   },
@@ -184,15 +182,15 @@ class SignUpPage extends HookConsumerWidget {
                   splashColor: Colors.transparent,
                   icon: state.confirmPwdVisibility
                       ? const MyAssetImage(
-                    Assets.authPasswordHide,
-                    width: 22.5,
-                    height: 16.5,
-                  )
+                          Assets.authPasswordHide,
+                          width: 22.5,
+                          height: 16.5,
+                        )
                       : const MyAssetImage(
-                    Assets.authPasswordShow,
-                    width: 22.5,
-                    height: 16.5,
-                  ),
+                          Assets.authPasswordShow,
+                          width: 22.5,
+                          height: 16.5,
+                        ),
                   onPressed: () {
                     viewModel.switchConfirmPwdVisibility();
                   },
@@ -244,7 +242,6 @@ class SignUpPage extends HookConsumerWidget {
                   ),
                 ],
               ).marginOnly(bottom: 35),
-
             ],
           ),
         ),
@@ -254,18 +251,18 @@ class SignUpPage extends HookConsumerWidget {
 
   /// 输入框
   Widget _buildInputLayout(
-      BuildContext context,
-      SignUpState state,
-      String key, {
-        double marginTop = 0,
-        bool? showRightIcon = false, //是否展示右侧的布局
-        Widget? rightWidget, //右侧的布局
-        TextInputType textInputType = TextInputType.text,
-        String? errorText,
-        bool obscureText = false,
-        TextInputAction textInputAction = TextInputAction.done,
-        Function? onSubmit,
-      }) {
+    BuildContext context,
+    SignUpState state,
+    String key, {
+    double marginTop = 0,
+    bool? showRightIcon = false, //是否展示右侧的布局
+    Widget? rightWidget, //右侧的布局
+    TextInputType textInputType = TextInputType.text,
+    String? errorText,
+    bool obscureText = false,
+    TextInputAction textInputAction = TextInputAction.done,
+    Function? onSubmit,
+  }) {
     return IgnoreKeyboardDismiss(
       child: MyTextField(
         key,
@@ -300,5 +297,4 @@ class SignUpPage extends HookConsumerWidget {
       ),
     );
   }
-
 }

+ 1 - 1
packages/cpt_main/lib/modules/home/home_state.dart

@@ -52,7 +52,7 @@ class HomeState {
       'margin_right': 6.0,
     },
     {
-      'category_name': S.current.publish,
+      'category_name': S.current.notice,
       'category_icon': Assets.mainHomePublishNews,
       'icon_width': 40.5,
       'icon_height': 42.5,

BIN
packages/cs_resources/assets/yy_business_top_logo.webp


BIN
packages/cs_resources/assets/yy_home_splash.png


+ 1 - 15
packages/cs_resources/lib/generated/assets.dart

@@ -2,8 +2,8 @@
 class Assets {
   Assets._();
 
-  static const String assetsYyBusinessTopLogo = 'assets/yy_business_top_logo.webp';
   static const String assetsYyHomeLogo = 'assets/yy_home_logo.webp';
+  static const String assetsYyHomeSplash = 'assets/yy_home_splash.png';
   static const String authChooseEstateBuilding = 'assets/auth/choose_estate_building.webp';
   static const String authCountrySg = 'assets/auth/country_sg.webp';
   static const String authForgotInputEmailPhoneImg = 'assets/auth/forgot_input_email_phone_img.webp';
@@ -59,7 +59,6 @@ class Assets {
   static const String communityPhone = 'assets/community/phone.png';
   static const String communityShare = 'assets/community/share.webp';
   static const String communityWhatsAPP = 'assets/community/WhatsAPP.png';
-  static const String constantsColorConstants = 'lib/constants/color_constants.dart';
   static const String facilityActiveIcon = 'assets/facility/active_icon.webp';
   static const String facilityAddCardAmerican = 'assets/facility/add_card_american.webp';
   static const String facilityAddCardMaster = 'assets/facility/add_card_master.webp';
@@ -90,16 +89,6 @@ class Assets {
   static const String formOvernight = 'assets/form/overnight.webp';
   static const String formRenovation = 'assets/form/renovation.webp';
   static const String formSubmitIcon = 'assets/form/submit_icon.webp';
-  static const String generatedAssets = 'lib/generated/assets.dart';
-  static const String generatedL10n = 'lib/generated/l10n.dart';
-  static const String intlMessagesAll = 'lib/generated/intl/messages_all.dart';
-  static const String intlMessagesEn = 'lib/generated/intl/messages_en.dart';
-  static const String intlMessagesZhCN = 'lib/generated/intl/messages_zh_CN.dart';
-  static const String intlMessagesZhHK = 'lib/generated/intl/messages_zh_HK.dart';
-  static const String l10nIntlEn = 'lib/l10n/intl_en.arb';
-  static const String l10nIntlZhCN = 'lib/l10n/intl_zh_CN.arb';
-  static const String l10nIntlZhHK = 'lib/l10n/intl_zh_HK.arb';
-  static const String l10nMergeArb = 'lib/l10n/merge_arb';
   static const String mainAccountDeactivationImg = 'assets/main/account_deactivation_img.webp';
   static const String mainFeedbackHistory = 'assets/main/feedback_history.webp';
   static const String mainFeedbackInProgress = 'assets/main/feedback_in_progress.webp';
@@ -257,8 +246,5 @@ class Assets {
   static const String serviceServiceIcon9 = 'assets/service/service_icon_9.png';
   static const String serviceServiceScoreNo = 'assets/service/service_score_no.png';
   static const String serviceServiceScoreYes = 'assets/service/service_score_yes.png';
-  static const String themeAppColorsTheme = 'lib/theme/app_colors_theme.dart';
-  static const String themeThemeConfig = 'lib/theme/theme_config.dart';
-  static const String themeThemeNotifier = 'lib/theme/theme_notifier.dart';
 
 }

+ 1 - 0
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -269,6 +269,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("NOTES TO MANAGEMENT"),
         "notes_to_recipient":
             MessageLookupByLibrary.simpleMessage("Notes to Recipient"),
+        "notice": MessageLookupByLibrary.simpleMessage("Notice"),
         "notice_board": MessageLookupByLibrary.simpleMessage("Notice Board"),
         "notification": MessageLookupByLibrary.simpleMessage("Notification"),
         "nric_fin": MessageLookupByLibrary.simpleMessage("NRIC/FIN"),

+ 10 - 0
packages/cs_resources/lib/generated/l10n.dart

@@ -2870,6 +2870,16 @@ class S {
     );
   }
 
+  /// `Notice`
+  String get notice {
+    return Intl.message(
+      'Notice',
+      name: 'notice',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

+ 1 - 0
packages/cs_resources/lib/l10n/intl_en.arb

@@ -281,5 +281,6 @@
   "manage": "Manage",
   "parking_fee_payment": "Parking Fee Payment",
   "property_payment": "Property Payment",
+  "notice": "Notice",
   "other": "Other"
 }

+ 1 - 0
packages/cs_resources/lib/l10n/intl_zh_CN.arb

@@ -281,5 +281,6 @@
   "manage": "管理",
   "parking_fee_payment": "停车费",
   "property_payment": "物业费",
+  "notice": "公告",
   "other": "其他"
 }

+ 1 - 0
packages/cs_resources/lib/l10n/intl_zh_HK.arb

@@ -267,5 +267,6 @@
   "manage": "管理",
   "parking_fee_payment": "停车费",
   "property_payment": "物业费",
+  "notice": "公告",
   "other": "其他"
 }