feat(client): iOS 上架合规——首启隐私同意弹窗 + 注销账号入口
个保法/审核 5.1.1:移动端首启全屏隐私同意(链接隐私政策/用户协议, 同意持久化;不同意 Android 退出、iOS 留提示);我的页 iOS 形态新增 「注销账号」(sheet 说明 + 预填 mailto 至 support@51yanmei.com)。 关于页隐私政策/服务条款链接已有,桌面/Web 零改动。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../core/auth/auth_state.dart';
|
||||
import '../../core/config/store_compliance.dart';
|
||||
import '../../core/theme/app_dims.g.dart';
|
||||
import '../../core/theme/context_tokens.dart';
|
||||
import '../../providers/shop_provider.dart';
|
||||
@@ -86,6 +88,12 @@ class MeScreen extends ConsumerWidget {
|
||||
icon: LucideIcons.info,
|
||||
label: '关于我们',
|
||||
onTap: () => context.go('/about')),
|
||||
// iOS App Store 审核 5.1.1(v):应用内须可发起账号删除
|
||||
if (isIosAppStoreBuild)
|
||||
MHubItem(
|
||||
icon: LucideIcons.userX,
|
||||
label: '注销账号',
|
||||
onTap: () => _showDeleteAccountSheet(context, user)),
|
||||
]),
|
||||
const SizedBox(height: 18),
|
||||
_LogoutButton(onConfirm: () {
|
||||
@@ -151,6 +159,65 @@ class MeScreen extends ConsumerWidget {
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
/// 注销账号(iOS App Store 审核 5.1.1(v)):应用内发起 → 邮件人工核验。
|
||||
/// 措辞保持中性,不涉及任何购买/续费引导。
|
||||
void _showDeleteAccountSheet(BuildContext context, AuthUser? user) {
|
||||
showMSheet<void>(
|
||||
context,
|
||||
title: '注销账号',
|
||||
builder: (ctx) {
|
||||
final t = ctx.tokens;
|
||||
Widget note(String s) => Padding(
|
||||
padding: const EdgeInsets.only(top: 4),
|
||||
child: Text('· $s',
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsSm, color: t.muted, height: 1.6)),
|
||||
);
|
||||
final who = user != null ? '${user.shopNo} · ${user.username}' : '';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 4, 16, 20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('注销将删除您的登录账号,操作不可恢复。',
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsBody,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: t.heading)),
|
||||
const SizedBox(height: 8),
|
||||
note('账号与登录凭据将被删除,无法找回'),
|
||||
note('门店经营数据归属门店:门店内仍有其他用户时数据保留,'
|
||||
'需整店删除请在申请中说明'),
|
||||
note('为防止误操作与冒用,注销需人工核验身份,'
|
||||
'我们将在收到申请后 15 个工作日内完成处理'),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: DsButton('发送注销申请邮件',
|
||||
variant: DsBtnVariant.primary,
|
||||
onPressed: () {
|
||||
final subject = Uri.encodeComponent('账号注销申请($who)');
|
||||
final body = Uri.encodeComponent(
|
||||
'申请注销账号:$who\n注销原因(选填):\n\n'
|
||||
'请使用注册时预留的联系方式发送本邮件以便核验。');
|
||||
launchUrl(Uri.parse(
|
||||
'mailto:$supportEmail?subject=$subject&body=$body'));
|
||||
}),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Center(
|
||||
child: Text('客服邮箱 $supportEmail',
|
||||
style:
|
||||
TextStyle(fontSize: AppDims.fsXs, color: t.faint)),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _LogoutButton extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user