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:
@@ -5,8 +5,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../core/auth/auth_state.dart';
|
||||
import '../../core/config/license_copy.dart';
|
||||
import '../../core/config/store_compliance.dart';
|
||||
import '../../core/utils/web_launch.dart';
|
||||
import '../../core/responsive/responsive.dart';
|
||||
import '../../core/theme/app_dims.g.dart';
|
||||
@@ -98,32 +101,34 @@ class _LicensePanelState extends ConsumerState<LicensePanel> {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
// ── 卡2:在线购买 / 续费(后端 purchase 接口 admin only,
|
||||
// 非管理员引导看官网价格页)──
|
||||
if (isAdmin)
|
||||
const SettingsCard(
|
||||
title: '在线购买 / 续费',
|
||||
desc: '选择套餐支付宝支付,到账后授权自动续期',
|
||||
child: PurchaseCard(),
|
||||
)
|
||||
else
|
||||
SettingsCard(
|
||||
title: '在线购买 / 续费',
|
||||
desc: '在线购买仅门店管理员可操作',
|
||||
child: Row(children: [
|
||||
Text('在线购买请联系门店管理员 · ',
|
||||
style: TextStyle(fontSize: AppDims.fsSm, color: t.muted)),
|
||||
InkWell(
|
||||
// 免登跳官网(一次性换票 SSO):浏览器落地即已登录,可直接购买
|
||||
onTap: () => launchAuthedWebPath(ref, '/#pricing'),
|
||||
child: Text('查看套餐价格 →',
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsSm,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: t.primary)),
|
||||
),
|
||||
]),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
// 非管理员引导看官网价格页)。iOS App Store 包整卡不渲染 ──
|
||||
if (!hideExternalPurchaseUi) ...[
|
||||
if (isAdmin)
|
||||
const SettingsCard(
|
||||
title: '在线购买 / 续费',
|
||||
desc: '选择套餐支付宝支付,到账后授权自动续期',
|
||||
child: PurchaseCard(),
|
||||
)
|
||||
else
|
||||
SettingsCard(
|
||||
title: '在线购买 / 续费',
|
||||
desc: '在线购买仅门店管理员可操作',
|
||||
child: Row(children: [
|
||||
Text('在线购买请联系门店管理员 · ',
|
||||
style: TextStyle(fontSize: AppDims.fsSm, color: t.muted)),
|
||||
InkWell(
|
||||
// 免登跳官网(一次性换票 SSO):浏览器落地即已登录,可直接购买
|
||||
onTap: () => launchAuthedWebPath(ref, '/#pricing'),
|
||||
child: Text('查看套餐价格 →',
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsSm,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: t.primary)),
|
||||
),
|
||||
]),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
// ── 卡3:兑换券(原型 .redeem:input + 按钮,max 520)──
|
||||
SettingsCard(
|
||||
title: '兑换券',
|
||||
@@ -175,6 +180,29 @@ class _LicensePanelState extends ConsumerState<LicensePanel> {
|
||||
],
|
||||
),
|
||||
),
|
||||
// ── 卡5:联系客服(仅 iOS 形态,补位购买卡;措辞保持中性,
|
||||
// 不得出现购买/续费引导字样——苹果 3.1.1 红线)──
|
||||
if (hideExternalPurchaseUi) ...[
|
||||
const SizedBox(height: 16),
|
||||
SettingsCard(
|
||||
title: '联系客服',
|
||||
desc: '授权与使用问题可通过邮件联系我们',
|
||||
child: Row(children: [
|
||||
Text('客服邮箱 · ',
|
||||
style: TextStyle(fontSize: AppDims.fsSm, color: t.muted)),
|
||||
InkWell(
|
||||
onTap: () =>
|
||||
launchUrl(Uri(scheme: 'mailto', path: supportEmail)),
|
||||
child: Text(supportEmail,
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsSm,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: AppFonts.mono,
|
||||
color: t.primary)),
|
||||
),
|
||||
]),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user