From dbe0cc2870be5a0a26f0611d0073fe1014c410fb Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 8 Dec 2025 23:50:22 -0800 Subject: [PATCH] feat(mobile-app): change profile share button to navigate to share page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace copy link action with navigation to share page - Pass referralCode to share page for QR code generation - Rename button text from '复制分享链接' to '分享邀请' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../presentation/pages/profile_page.dart | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart index d7f7d544..2af9e5e9 100644 --- a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart +++ b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart @@ -246,14 +246,14 @@ class _ProfilePageState extends ConsumerState { ); } - /// 复制分享链接 - void _copyShareLink() { - Clipboard.setData(ClipboardData(text: 'https://rwa.app/invite/$_serialNumber')); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('分享链接已复制'), - backgroundColor: Color(0xFFD4AF37), - ), + /// 跳转到分享页面 + void _goToSharePage() { + context.push( + RoutePaths.share, + extra: { + 'shareLink': 'https://s3.szaiai.com/rwadurian/app-release.apk', + 'referralCode': _referralCode, + }, ); } @@ -716,8 +716,8 @@ class _ProfilePageState extends ConsumerState { // 直推列表 _buildReferralList(), const SizedBox(height: 16), - // 复制分享链接 - _buildCopyShareButton(), + // 分享邀请按钮 + _buildShareButton(), const SizedBox(height: 16), // 社区权益考核 _buildCommunityAssessment(), @@ -1242,10 +1242,10 @@ class _ProfilePageState extends ConsumerState { ); } - /// 构建复制分享按钮 - Widget _buildCopyShareButton() { + /// 构建分享按钮 + Widget _buildShareButton() { return GestureDetector( - onTap: _copyShareLink, + onTap: _goToSharePage, child: Container( width: double.infinity, height: 48, @@ -1264,7 +1264,7 @@ class _ProfilePageState extends ConsumerState { ), SizedBox(width: 8), Text( - '复制分享链接', + '分享邀请', style: TextStyle( fontSize: 16, fontFamily: 'Inter',