feat(client): iOS App Store 合规——授权页隐藏外部购买 UI,补中性联系客服卡

苹果 3.1.1:iOS 包不渲染在线购买卡与套餐价格链接;兑换券保留(3.1.3(b)),
新增「联系客服」卡(mailto:support@51yanmei.com,无购买引导字样)。
其余平台零改动;开关 hideExternalPurchaseUi 供设备上限弹窗等复用。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-05 07:27:31 +08:00
parent faaeee0bfe
commit dddf402d92
3 changed files with 151 additions and 26 deletions
@@ -0,0 +1,20 @@
// App Store 合规开关(苹果审核指南 3.1.1 / 3.1.3(b))。
//
// iOS 包内不得出现第三方支付与任何外部购买引导(在线购买卡、套餐价格
// 链接、升级按钮、"去官网购买"类文案);兑换码激活与中性客服入口不受限
// (多平台服务条款:允许使用在别处获得的授权)。
// 其余平台(macOS/Windows/Android/Web 均不走 App Store 分发)不受影响。
import 'dart:io' show Platform;
import 'package:flutter/foundation.dart' show kIsWeb, visibleForTesting;
/// 测试注入:widget/golden 测试跑在 host 上,借此模拟 iOS 形态。
@visibleForTesting
bool? debugForceHideExternalPurchaseUi;
/// 为真时隐藏一切外部购买 UIiOS App Store 包)。
bool get hideExternalPurchaseUi =>
debugForceHideExternalPurchaseUi ?? (!kIsWeb && Platform.isIOS);
/// 客服邮箱(授权管理「联系客服」卡、异常兜底提示等处使用)。
const String supportEmail = 'support@51yanmei.com';