feat(client): 购买卡年付明示省 2 个月(tab 标注+划线原价+省钱说明行)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -167,7 +167,7 @@ class _PurchaseCardState extends ConsumerState<PurchaseCard> {
|
|||||||
),
|
),
|
||||||
if (!_isPromo)
|
if (!_isPromo)
|
||||||
DsSeg(
|
DsSeg(
|
||||||
items: const ['年付', '月付'],
|
items: const ['年付 · 省 2 个月', '月付'],
|
||||||
index: _cycleIdx,
|
index: _cycleIdx,
|
||||||
onChanged: (i) => setState(() => _cycleIdx = i),
|
onChanged: (i) => setState(() => _cycleIdx = i),
|
||||||
),
|
),
|
||||||
@@ -252,6 +252,17 @@ class _PurchaseCardState extends ConsumerState<PurchaseCard> {
|
|||||||
fontFamilyFallback: AppFonts.monoFallback)),
|
fontFamilyFallback: AppFonts.monoFallback)),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
],
|
],
|
||||||
|
// 年付划线展示月付×12 原价,直观看到省 2 个月
|
||||||
|
if (!_isPromo && _cycleIdx == 0) ...[
|
||||||
|
Text('¥${_fmt(_group.monthly.price * 12)}',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: AppDims.fsSm,
|
||||||
|
color: t.faint,
|
||||||
|
decoration: TextDecoration.lineThrough,
|
||||||
|
fontFamily: AppFonts.mono,
|
||||||
|
fontFamilyFallback: AppFonts.monoFallback)),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
],
|
||||||
Text('¥${_fmt(_plan.price)}',
|
Text('¥${_fmt(_plan.price)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
@@ -265,6 +276,13 @@ class _PurchaseCardState extends ConsumerState<PurchaseCard> {
|
|||||||
fontFamilyFallback: AppFonts.monoFallback)),
|
fontFamilyFallback: AppFonts.monoFallback)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
if (!_isPromo && _cycleIdx == 0) ...[
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
Text(
|
||||||
|
'月付 ¥${_fmt(_group.monthly.price)} × 12 个月 = ¥${_fmt(_group.monthly.price * 12)},'
|
||||||
|
'年付立省 ¥${_fmt(_group.monthly.price * 12 - _group.annual.price)},相当于免费用 2 个月',
|
||||||
|
style: TextStyle(fontSize: AppDims.fsXs, color: t.success)),
|
||||||
|
],
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
Text('到期时间自动叠加,未到期续费不吃亏 · 支付宝支付',
|
Text('到期时间自动叠加,未到期续费不吃亏 · 支付宝支付',
|
||||||
style: TextStyle(fontSize: AppDims.fsXs, color: t.faint)),
|
style: TextStyle(fontSize: AppDims.fsXs, color: t.faint)),
|
||||||
|
|||||||
Reference in New Issue
Block a user