From 9d7a5a72667099e44d12dc5704d741f97b07d6ce Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 23 Feb 2026 17:12:49 -0800 Subject: [PATCH] =?UTF-8?q?fix(welcome):=20=E4=BF=AE=E5=A4=8D=E6=AC=A2?= =?UTF-8?q?=E8=BF=8E=E9=A1=B53=E4=B8=AA=E8=AE=BE=E8=AE=A1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Logo色与主色调不一致 — 品牌名"Genex"改用 ShaderMask 渐变 (#9B5CF6→#D946EF),与 logo icon 色系完全匹配 2. Logo到品牌名间距过大 — 24px → 12px,品牌名到slogan 8px → 6px 符合 8pt grid 美学标准(紧凑型视觉组 4-8-12px) 3. 缺少微信登录 — 新增 WeChat 社交登录按钮(绿色#07C160), 4语言i18n key: welcome.wechat Co-Authored-By: Claude Opus 4.6 --- .../genex-mobile/lib/app/i18n/strings/en.dart | 1 + .../genex-mobile/lib/app/i18n/strings/ja.dart | 1 + .../lib/app/i18n/strings/zh_cn.dart | 1 + .../lib/app/i18n/strings/zh_tw.dart | 1 + .../auth/presentation/pages/welcome_page.dart | 42 +++++++++++++------ 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/frontend/genex-mobile/lib/app/i18n/strings/en.dart b/frontend/genex-mobile/lib/app/i18n/strings/en.dart index 22c59a4..2840a21 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/en.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/en.dart @@ -32,6 +32,7 @@ const Map en = { 'welcome.slogan': 'Make Every Coupon Count', 'welcome.phoneRegister': 'Phone Sign Up', 'welcome.emailRegister': 'Email Sign Up', + 'welcome.wechat': 'WeChat', 'welcome.otherLogin': 'Other Login Methods', 'welcome.hasAccount': 'Already have an account?', 'welcome.login': 'Log In', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/ja.dart b/frontend/genex-mobile/lib/app/i18n/strings/ja.dart index 2074f5a..966535f 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/ja.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/ja.dart @@ -32,6 +32,7 @@ const Map ja = { 'welcome.slogan': 'すべてのクーポンに価値を', 'welcome.phoneRegister': '電話番号で登録', 'welcome.emailRegister': 'メールで登録', + 'welcome.wechat': 'WeChat', 'welcome.otherLogin': '他の方法でログイン', 'welcome.hasAccount': 'アカウントをお持ちですか?', 'welcome.login': 'ログイン', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart b/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart index 6fffec9..82127d2 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart @@ -32,6 +32,7 @@ const Map zhCN = { 'welcome.slogan': '让每一张券都有价值', 'welcome.phoneRegister': '手机号注册', 'welcome.emailRegister': '邮箱注册', + 'welcome.wechat': '微信', 'welcome.otherLogin': '其他方式登录', 'welcome.hasAccount': '已有账号?', 'welcome.login': '登录', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart b/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart index a5b06f0..6581f4a 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart @@ -32,6 +32,7 @@ const Map zhTW = { 'welcome.slogan': '讓每一張券都有價值', 'welcome.phoneRegister': '手機號註冊', 'welcome.emailRegister': '信箱註冊', + 'welcome.wechat': '微信', 'welcome.otherLogin': '其他方式登入', 'welcome.hasAccount': '已有帳號?', 'welcome.login': '登入', diff --git a/frontend/genex-mobile/lib/features/auth/presentation/pages/welcome_page.dart b/frontend/genex-mobile/lib/features/auth/presentation/pages/welcome_page.dart index f2067fb..8f90670 100644 --- a/frontend/genex-mobile/lib/features/auth/presentation/pages/welcome_page.dart +++ b/frontend/genex-mobile/lib/features/auth/presentation/pages/welcome_page.dart @@ -7,7 +7,7 @@ import '../../../../app/i18n/app_localizations.dart'; /// A1. 欢迎页 - 品牌展示 + 注册/登录入口 /// -/// 品牌Logo、Slogan、手机号注册、邮箱注册、社交登录入口(Google/Apple) +/// 品牌Logo、Slogan、手机号注册、邮箱注册、社交登录入口(WeChat/Google/Apple) class WelcomePage extends StatelessWidget { const WelcomePage({super.key}); @@ -30,17 +30,22 @@ class WelcomePage extends StatelessWidget { height: 80, ), ), - const SizedBox(height: 24), + const SizedBox(height: 12), - // Brand Name - Text( - 'Genex', - style: AppTypography.displayLarge.copyWith( - color: AppColors.primary, - letterSpacing: 2, + // Brand Name — 使用 logo 同色系渐变 + ShaderMask( + shaderCallback: (bounds) => const LinearGradient( + colors: [Color(0xFF9B5CF6), Color(0xFFD946EF)], + ).createShader(bounds), + child: Text( + 'Genex', + style: AppTypography.displayLarge.copyWith( + color: Colors.white, // ShaderMask 需要白色底 + letterSpacing: 2, + ), ), ), - const SizedBox(height: 8), + const SizedBox(height: 6), // Slogan Text( @@ -86,10 +91,19 @@ class WelcomePage extends StatelessWidget { ), const SizedBox(height: 16), - // Social Login Buttons + // Social Login Buttons — WeChat + Google + Apple Row( mainAxisAlignment: MainAxisAlignment.center, children: [ + _SocialLoginButton( + icon: Icons.wechat, + label: context.t('welcome.wechat'), + color: const Color(0xFF07C160), + onTap: () { + Navigator.pushReplacementNamed(context, '/main'); + }, + ), + const SizedBox(width: 24), _SocialLoginButton( icon: Icons.g_mobiledata_rounded, label: 'Google', @@ -146,12 +160,14 @@ class WelcomePage extends StatelessWidget { class _SocialLoginButton extends StatelessWidget { final IconData icon; final String label; + final Color? color; final VoidCallback onTap; const _SocialLoginButton({ required this.icon, required this.label, required this.onTap, + this.color, }); @override @@ -164,11 +180,11 @@ class _SocialLoginButton extends StatelessWidget { width: 52, height: 52, decoration: BoxDecoration( - color: AppColors.gray50, + color: color != null ? color!.withValues(alpha: 0.1) : AppColors.gray50, shape: BoxShape.circle, - border: Border.all(color: AppColors.border), + border: Border.all(color: color?.withValues(alpha: 0.3) ?? AppColors.border), ), - child: Icon(icon, size: 28, color: AppColors.textPrimary), + child: Icon(icon, size: 28, color: color ?? AppColors.textPrimary), ), const SizedBox(height: 6), Text(label, style: AppTypography.caption),