From 455be5579aa4f8a49a0ecc4a4e21d414e5acfdcf Mon Sep 17 00:00:00 2001 From: Rodger-Wang <1367893453@qq.com> Date: Sun, 25 Oct 2026 23:22:06 +0800 Subject: [PATCH] =?UTF-8?q?client=EF=BC=9AiOS=20=E4=B9=9F=E5=85=B3?= =?UTF-8?q?=E6=8E=89=E4=BC=9A=E5=91=98=E5=85=85=E5=80=BC=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E4=B8=80=E7=89=88=E4=B8=8D=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=86=85=E8=B4=AD=E4=B9=B0=E3=80=82=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E5=8F=B7=201.0.3+47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- apps/client/lib/core/utils/app_features.dart | 5 +++-- .../data/services/network/auth_interceptor.dart | 16 +++++++++------- .../modules/common/widgets/recharge_dialog.dart | 6 ++---- .../modules/settings/views/settings_view.dart | 6 ++---- apps/client/pubspec.yaml | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/apps/client/lib/core/utils/app_features.dart b/apps/client/lib/core/utils/app_features.dart index 1e1a9d66..b825515d 100644 --- a/apps/client/lib/core/utils/app_features.dart +++ b/apps/client/lib/core/utils/app_features.dart @@ -10,11 +10,12 @@ class AppFeatures { /// 2026-08-28 起暂时关闭:新用户注册就送 30 天 VIP + 翻译/会议各 100 分钟 /// + 智能体 100 次,这期间不引导充值。 /// - /// 置回 true 即可在安卓也恢复,影响两处: + /// 置回 true 后 iOS 和安卓一起恢复,影响: /// 1. 「设置」页的会员充值卡片(settings_view.dart) /// 2. 额度不足/会员过期时的充值弹窗里的「去充值」按钮(recharge_dialog.dart) + /// 3. 服务端返回需会员时弹窗里的「去开通」(auth_interceptor.dart) /// - /// iOS 不受这个开关控制,入口始终打开,购买走 Apple IAP。 + /// 2026-10-25 这一版 iOS 也不送审充值,入口跟安卓一样关掉。 /// /// 注意:关闭的只是**入口**,goodsvip/goodstrans/goodsmeet 这几个页面本身还在, /// 路由也没删——万一还有别的地方能跳进去,页面不会崩。 diff --git a/apps/client/lib/data/services/network/auth_interceptor.dart b/apps/client/lib/data/services/network/auth_interceptor.dart index 33c6cb46..db800c8a 100644 --- a/apps/client/lib/data/services/network/auth_interceptor.dart +++ b/apps/client/lib/data/services/network/auth_interceptor.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'package:crypto/crypto.dart'; import 'package:get_storage/get_storage.dart'; +import '../../../core/utils/app_features.dart'; import '../../../core/utils/logger.dart'; import 'entity/base_entity.dart'; import '../../../routes/app_routes.dart'; @@ -154,13 +155,14 @@ class AuthInterceptor extends Interceptor { onPressed: () => Get.back(), child: Text('cancel'.tr), ), - TextButton( - onPressed: () { - Get.back(); - Get.toNamed(Routes.goodsvip); - }, - child: Text('vipRequiredGo'.tr), - ), + if (AppFeatures.rechargeEnabled) + TextButton( + onPressed: () { + Get.back(); + Get.toNamed(Routes.goodsvip); + }, + child: Text('vipRequiredGo'.tr), + ), ], ), barrierDismissible: true, diff --git a/apps/client/lib/modules/common/widgets/recharge_dialog.dart b/apps/client/lib/modules/common/widgets/recharge_dialog.dart index 1024ee78..a2447ec1 100644 --- a/apps/client/lib/modules/common/widgets/recharge_dialog.dart +++ b/apps/client/lib/modules/common/widgets/recharge_dialog.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../routes/app_routes.dart'; @@ -35,9 +34,8 @@ void showRechargeDialog(String type) { .tr, // 会员过期描述 / 余额不足描述 textAlign: TextAlign.center, ), - // 安卓在充值入口关闭期间只保留提示。iOS 走 Apple IAP,按钮始终保留。 - if (AppFeatures.rechargeEnabled || - defaultTargetPlatform == TargetPlatform.iOS) ...[ + // 充值入口关闭时只保留提示,不提供去购买的按钮。 + if (AppFeatures.rechargeEnabled) ...[ const SizedBox(height: 20), SizedBox( width: double.infinity, diff --git a/apps/client/lib/modules/settings/views/settings_view.dart b/apps/client/lib/modules/settings/views/settings_view.dart index ab2139d3..9817611c 100644 --- a/apps/client/lib/modules/settings/views/settings_view.dart +++ b/apps/client/lib/modules/settings/views/settings_view.dart @@ -1,5 +1,4 @@ import 'dart:ui'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -237,11 +236,10 @@ class SettingsView extends GetView { // 构建Vip购买卡片 /// 会员充值,紧跟用户信息卡下方。 /// - /// 安卓仍由 [AppFeatures.rechargeEnabled] 控制。iOS 始终展示。 + /// iOS 和安卓都由 [AppFeatures.rechargeEnabled] 控制。 /// 这里只留一个入口,月 / 季 / 终身在会员页里选。 Widget _buildVipPurchaseCard(bool isDarkMode) { - if (defaultTargetPlatform != TargetPlatform.iOS && - !AppFeatures.rechargeEnabled) { + if (!AppFeatures.rechargeEnabled) { return const SizedBox.shrink(); } return GestureDetector( diff --git a/apps/client/pubspec.yaml b/apps/client/pubspec.yaml index 558d54b4..67e68436 100644 --- a/apps/client/pubspec.yaml +++ b/apps/client/pubspec.yaml @@ -1,7 +1,7 @@ name: eaimar description: "Eaimar - AI Voice Assistant." publish_to: "none" -version: 1.0.3+46 +version: 1.0.3+47 environment: sdk: ">=3.3.0 <4.0.0"