diff --git a/lib/common/router/app_router.dart b/lib/common/router/app_router.dart index cd9d742..c4b3d01 100644 --- a/lib/common/router/app_router.dart +++ b/lib/common/router/app_router.dart @@ -170,7 +170,7 @@ final routerProvider = Provider((ref) { GoRoute( path: AppRoutes.profileDisclaimer, pageBuilder: (ctx, s) => - _bottomUpPage(state: s, child: const DisclaimerPage()), + _rightToLeftPage(state: s, child: const DisclaimerPage()), ), GoRoute( path: AppRoutes.profileAbout, diff --git a/lib/features/profile/presentation/profile_action_pages.dart b/lib/features/profile/presentation/profile_action_pages.dart index e80b75d..b009779 100644 --- a/lib/features/profile/presentation/profile_action_pages.dart +++ b/lib/features/profile/presentation/profile_action_pages.dart @@ -600,20 +600,87 @@ class DisclaimerPage extends StatelessWidget { @override Widget build(BuildContext context) { - return const _ActionScaffold( - title: '免责声明 · 数据来源', - child: PrototypeCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _InfoParagraph('App 内「材料价值」= 克重 × 纯度系数 × 上海金现货参考价(元/克)。'), - _InfoParagraph('它不是金店零售价(含工费 / 品牌溢价),也不是回收实收价。'), - _InfoParagraph( - '「兑换试算」中各渠道(金店 / 金条 / T+D / 回收)报价均为参考价,恒标来源与时间,以实际门店 / 交易系统为准。', + const bg = Color(0xFFF8F6EF); + const textColor = Color(0xFF4B4A46); + const mutedColor = Color(0xFF6C6961); + + return Scaffold( + backgroundColor: bg, + appBar: AppBar( + backgroundColor: bg, + surfaceTintColor: Colors.transparent, + 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('「回收参考价」= 材料价值 × 可调折扣系数,仅供参考;正式版将尽量对接真实回收报价。'), - _InfoParagraph('本品为资产记录与估值工具,所有信息均不构成投资建议。'), - ], + child: const Column( + 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 { - const _InfoParagraph(this.text); +class _DisclaimerParagraph extends StatelessWidget { + const _DisclaimerParagraph(this.spans); - final String text; + final List spans; @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(bottom: 10), - child: Text( - text, + return Text.rich( + TextSpan( + children: spans, style: const TextStyle( - fontSize: 13, - height: 1.65, - color: Color(0xFF6E6A60), + fontSize: 17, + height: 1.6, + color: Color(0xFF4B4A46), ), ), ); diff --git a/lib/features/settings/presentation/settings_page.dart b/lib/features/settings/presentation/settings_page.dart index b0cb3c0..e3de5d9 100644 --- a/lib/features/settings/presentation/settings_page.dart +++ b/lib/features/settings/presentation/settings_page.dart @@ -175,7 +175,7 @@ class SettingsPage extends HookConsumerWidget { SettingRow( icon: FlutterRemix.alert_line, title: '免责声明', - onTap: () => _showDisclaimerSheet(context), + onTap: () => context.push(AppRoutes.profileDisclaimer), ), ], ), @@ -362,63 +362,6 @@ class SettingsPage extends HookConsumerWidget { ); } - Future _showDisclaimerSheet(BuildContext context) async { - final cs = ShadTheme.of(context).colorScheme; - await showModalBottomSheet( - 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 {