fix(mining-app): 优化页面文案与涨跌幅精度

- 兑换页顶部隐藏价格后方"积分值"文字,界面更简洁
- 兑换页"较上线首日"涨跌幅精度从2位小数提升至6位,每分钟销毁引起的涨幅尾数可见
- 兑换页"黑洞销毁量"文案改为"已销毁量",更直观易懂
- 贡献值页"积分股池实时余量"文案改为"100亿销毁剩余量"
- 后端 priceChangePercent 精度从 toFixed(2) 提升至 toFixed(8),支持前端高精度显示

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-04 20:23:59 -08:00
parent dcc46c37b6
commit 2e91686a88
3 changed files with 10 additions and 15 deletions

View File

@ -104,7 +104,8 @@ export class PriceService {
burnMultiplier: burnMultiplier.toFixed(18),
minuteBurnRate: minuteBurnRate.toFixed(18),
snapshotTime: new Date(),
priceChangePercent: priceChangePercent.toFixed(2),
// 保留8位小数确保每分钟销毁带来的微小涨幅在前端可见
priceChangePercent: priceChangePercent.toFixed(8),
initialPrice: initialPrice.toFixed(18),
};
}
@ -264,7 +265,8 @@ export class PriceService {
burnMultiplier: burnMultiplier.toFixed(18),
minuteBurnRate: snapshot.minuteBurnRate.toFixed(18),
snapshotTime: snapshot.snapshotTime,
priceChangePercent: priceChangePercent.toFixed(2),
// 保留8位小数确保每分钟销毁带来的微小涨幅在前端可见
priceChangePercent: priceChangePercent.toFixed(8),
initialPrice: initialPrice.toFixed(18),
};
}

View File

@ -207,11 +207,11 @@ class ContributionPage extends ConsumerWidget {
),
),
const SizedBox(height: 12),
//
// 100亿
Row(
children: [
Text(
'积分股池实时余量: ',
'100亿销毁剩余量: ',
style: TextStyle(fontSize: 12, color: AppColors.textSecondaryOf(context)),
),
isSharePoolLoading

View File

@ -188,15 +188,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
letterSpacing: -0.75,
),
),
const SizedBox(width: 4),
Text(
'积分值',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.textSecondaryOf(context),
),
),
// '积分值'
],
),
const SizedBox(height: 8),
@ -227,7 +219,8 @@ class _TradingPageState extends ConsumerState<TradingPage> {
),
const SizedBox(width: 4),
DataText(
data: isLoading ? null : '$sign${changePercent.toStringAsFixed(2)}%',
// 6
data: isLoading ? null : '$sign${changePercent.toStringAsFixed(6)}%',
isLoading: isLoading,
placeholder: '+--.--%',
style: TextStyle(
@ -357,7 +350,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
Container(width: 1, height: 24, color: bgGray),
const SizedBox(width: 16),
_buildMarketDataItem(
'黑洞销毁量',
'销毁量',
market != null ? formatCompact(market.blackHoleAmount) : null,
_red,
isLoading,