fix:免责声明
This commit is contained in:
@@ -170,7 +170,7 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.profileDisclaimer,
|
path: AppRoutes.profileDisclaimer,
|
||||||
pageBuilder: (ctx, s) =>
|
pageBuilder: (ctx, s) =>
|
||||||
_bottomUpPage(state: s, child: const DisclaimerPage()),
|
_rightToLeftPage(state: s, child: const DisclaimerPage()),
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: AppRoutes.profileAbout,
|
path: AppRoutes.profileAbout,
|
||||||
|
|||||||
@@ -600,20 +600,87 @@ class DisclaimerPage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const _ActionScaffold(
|
const bg = Color(0xFFF8F6EF);
|
||||||
title: '免责声明 · 数据来源',
|
const textColor = Color(0xFF4B4A46);
|
||||||
child: PrototypeCard(
|
const mutedColor = Color(0xFF6C6961);
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
return Scaffold(
|
||||||
children: [
|
backgroundColor: bg,
|
||||||
_InfoParagraph('App 内「材料价值」= 克重 × 纯度系数 × 上海金现货参考价(元/克)。'),
|
appBar: AppBar(
|
||||||
_InfoParagraph('它不是金店零售价(含工费 / 品牌溢价),也不是回收实收价。'),
|
backgroundColor: bg,
|
||||||
_InfoParagraph(
|
surfaceTintColor: Colors.transparent,
|
||||||
'「兑换试算」中各渠道(金店 / 金条 / T+D / 回收)报价均为参考价,恒标来源与时间,以实际门店 / 交易系统为准。',
|
elevation: 0,
|
||||||
|
scrolledUnderElevation: 0,
|
||||||
|
centerTitle: true,
|
||||||
|
leading: IconButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
icon: const Icon(Icons.chevron_left, size: 26),
|
||||||
|
),
|
||||||
|
title: const Text(
|
||||||
|
'免责声明 · 数据来源',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
color: textColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: SafeArea(
|
||||||
|
top: false,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.fromLTRB(28, 10, 28, 36),
|
||||||
|
child: DefaultTextStyle(
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 17,
|
||||||
|
height: 1.6,
|
||||||
|
color: textColor,
|
||||||
),
|
),
|
||||||
_InfoParagraph('「回收参考价」= 材料价值 × 可调折扣系数,仅供参考;正式版将尽量对接真实回收报价。'),
|
child: const Column(
|
||||||
_InfoParagraph('本品为资产记录与估值工具,所有信息均不构成投资建议。'),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
],
|
children: [
|
||||||
|
_DisclaimerParagraph([
|
||||||
|
const TextSpan(text: 'App 内「材料价值」= 克重 × 纯度系数 × '),
|
||||||
|
const TextSpan(
|
||||||
|
text: '上海金现货参考价(元/克)。',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w700),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(height: 22),
|
||||||
|
_DisclaimerParagraph([
|
||||||
|
const TextSpan(text: '它不是金店零售价(含工费/品牌溢价),也不'),
|
||||||
|
const TextSpan(
|
||||||
|
text: '是回收实收价。',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w700),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(height: 22),
|
||||||
|
_DisclaimerParagraph([
|
||||||
|
const TextSpan(
|
||||||
|
text: '「兑换试算」中各渠道(金店 / 金条 / T+D /\n回收)报价均为参考价,恒标来源与时间,以\n实际门店 / 交易系统为准。',
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(height: 22),
|
||||||
|
_DisclaimerParagraph([
|
||||||
|
const TextSpan(
|
||||||
|
text: '「回收参考价」= 材料价值 × 可调折扣系数,\n仅供参考;正式版将尽量对接真实回收报价。',
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(height: 22),
|
||||||
|
_DisclaimerParagraph([
|
||||||
|
const TextSpan(
|
||||||
|
text: '行情数据:行情聚合 · 仅供参考,实际以交\n易系统/门店为准。',
|
||||||
|
style: const TextStyle(color: mutedColor),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(height: 22),
|
||||||
|
_DisclaimerParagraph([
|
||||||
|
const TextSpan(
|
||||||
|
text: '本品为资产记录与估值工具,所有信息均不\n构成投资建议。',
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -1324,21 +1391,20 @@ class _GoldTextAction extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _InfoParagraph extends StatelessWidget {
|
class _DisclaimerParagraph extends StatelessWidget {
|
||||||
const _InfoParagraph(this.text);
|
const _DisclaimerParagraph(this.spans);
|
||||||
|
|
||||||
final String text;
|
final List<InlineSpan> spans;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Text.rich(
|
||||||
padding: const EdgeInsets.only(bottom: 10),
|
TextSpan(
|
||||||
child: Text(
|
children: spans,
|
||||||
text,
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 17,
|
||||||
height: 1.65,
|
height: 1.6,
|
||||||
color: Color(0xFF6E6A60),
|
color: Color(0xFF4B4A46),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ class SettingsPage extends HookConsumerWidget {
|
|||||||
SettingRow(
|
SettingRow(
|
||||||
icon: FlutterRemix.alert_line,
|
icon: FlutterRemix.alert_line,
|
||||||
title: '免责声明',
|
title: '免责声明',
|
||||||
onTap: () => _showDisclaimerSheet(context),
|
onTap: () => context.push(AppRoutes.profileDisclaimer),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -362,63 +362,6 @@ class SettingsPage extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _showDisclaimerSheet(BuildContext context) async {
|
|
||||||
final cs = ShadTheme.of(context).colorScheme;
|
|
||||||
await showModalBottomSheet<void>(
|
|
||||||
context: context,
|
|
||||||
backgroundColor: cs.card,
|
|
||||||
barrierColor: Colors.black.withValues(alpha: 0.5),
|
|
||||||
shape: const RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.vertical(
|
|
||||||
top: Radius.circular(Spacing.radiusCard),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
builder: (ctx) => SafeArea(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(20, 8, 20, 20),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Center(
|
|
||||||
child: Container(
|
|
||||||
width: 38,
|
|
||||||
height: 4,
|
|
||||||
margin: const EdgeInsets.only(bottom: 16),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: cs.border,
|
|
||||||
borderRadius: BorderRadius.circular(9999),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'免责声明',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 19,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
color: cs.foreground,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'金值提供的价格、资讯和估值均为本地 mock 数据,仅用于产品原型验证,不构成投资建议。',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13,
|
|
||||||
height: 1.55,
|
|
||||||
color: cs.mutedForeground,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 18),
|
|
||||||
_SheetPrimaryButton(
|
|
||||||
label: '知道了',
|
|
||||||
onTap: () => Navigator.of(ctx).pop(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Section extends StatelessWidget {
|
class _Section extends StatelessWidget {
|
||||||
|
|||||||
Reference in New Issue
Block a user