From 768b309cd4151425994db32d3829ca9445f009df Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Tue, 2 Dec 2025 17:30:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=95=8C=E9=9D=A2):=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84VIP=E5=95=86=E5=93=81=E5=92=8C=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 简化VIP商品页面的使用类型排序,仅保留VIP类型 - 将设置页面的会员入口重构为分类导航栏样式 - 优化分类项的文本布局和样式 --- lib/modules/goods/views/goodsvip_view.dart | 2 +- lib/modules/settings/views/settings_view.dart | 115 ++++++++---------- 2 files changed, 54 insertions(+), 63 deletions(-) diff --git a/lib/modules/goods/views/goodsvip_view.dart b/lib/modules/goods/views/goodsvip_view.dart index bedbd4cbf..3efa834d5 100644 --- a/lib/modules/goods/views/goodsvip_view.dart +++ b/lib/modules/goods/views/goodsvip_view.dart @@ -45,7 +45,7 @@ class GoodsvipView extends GetView { for (final g in controller.items) { grouped.putIfAbsent(g.usagetype, () => []).add(g); } - final order = [UsageType.Vip, UsageType.Translation, UsageType.Meet]; + final order = [UsageType.Vip]; final children = []; children.add(_buildFeaturesSection(isDarkMode)); children.add(SizedBox(height: 16.h)); diff --git a/lib/modules/settings/views/settings_view.dart b/lib/modules/settings/views/settings_view.dart index bf5a7f72d..7691cba0a 100644 --- a/lib/modules/settings/views/settings_view.dart +++ b/lib/modules/settings/views/settings_view.dart @@ -243,59 +243,46 @@ class SettingsView extends GetView { ), ], ), - child: InkWell( - onTap: () => Get.toNamed(Routes.goodsvip), - borderRadius: BorderRadius.circular(16.r), - child: Row( - children: [ - Container( - width: 42.w, - height: 42.w, - decoration: BoxDecoration( - color: isDarkMode - ? Colors.amber[900]!.withOpacity(0.3) - : Colors.amber[100]!, - borderRadius: BorderRadius.circular(21.r), - ), - child: Icon( - Icons.workspace_premium, - size: 20.w, - color: isDarkMode ? Colors.amber[300]! : Colors.amber[600]!, - ), - ), - SizedBox(width: 12.w), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'premiumMember'.tr, - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.w600, - color: Colors.white, - ), - ), - SizedBox(height: 4.h), - Text( - '${'higherQuota'.tr} · ${'fastResponse'.tr}', - style: TextStyle( - fontSize: 12.sp, - color: Colors.white70, - ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ], - ), - ), - Icon( - Icons.arrow_forward_ios, - size: 16.w, - color: Colors.white70, - ), - ], - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildCategoryItem( + icon: Icons.workspace_premium, + label: 'premiumMember'.tr, + iconBg: isDarkMode + ? Colors.amber[900]!.withOpacity(0.3) + : Colors.amber[100]!, + iconColor: isDarkMode ? Colors.amber[300]! : Colors.amber[600]!, + onTap: () => Get.toNamed(Routes.goodsvip), + ), + _buildCategoryItem( + icon: Icons.translate, + label: 'interpretation'.tr, + iconBg: isDarkMode + ? Colors.indigo[900]!.withOpacity(0.3) + : Colors.indigo[100]!, + iconColor: isDarkMode ? Colors.indigo[300]! : Colors.indigo[600]!, + onTap: () => Get.toNamed(Routes.goodstrade), + ), + _buildCategoryItem( + icon: Icons.people, + label: 'conferenceAssistant'.tr, + iconBg: isDarkMode + ? Colors.pink[900]!.withOpacity(0.3) + : Colors.pink[100]!, + iconColor: isDarkMode ? Colors.pink[300]! : Colors.pink[600]!, + onTap: () => Get.toNamed(Routes.goodsmeet), + ), + // _buildCategoryItem( + // icon: Icons.smart_toy, + // label: 'aiFunction'.tr, + // iconBg: isDarkMode + // ? Colors.teal[900]!.withOpacity(0.3) + // : Colors.teal[100]!, + // iconColor: isDarkMode ? Colors.teal[300]! : Colors.teal[600]!, + // onTap: () => Get.toNamed(Routes.goodsai), + // ), + ], ), ); } @@ -328,16 +315,20 @@ class SettingsView extends GetView { SizedBox(height: 8.h), SizedBox( width: 72.w, - child: Text( - label, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: FontWeight.w500, - color: Colors.white, + height: 32.h, + child: Center( + child: Text( + label, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: Colors.white, + height: 1.2, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), - maxLines: 2, - overflow: TextOverflow.ellipsis, ), ), ],