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:
parent
dcc46c37b6
commit
2e91686a88
|
|
@ -104,7 +104,8 @@ export class PriceService {
|
||||||
burnMultiplier: burnMultiplier.toFixed(18),
|
burnMultiplier: burnMultiplier.toFixed(18),
|
||||||
minuteBurnRate: minuteBurnRate.toFixed(18),
|
minuteBurnRate: minuteBurnRate.toFixed(18),
|
||||||
snapshotTime: new Date(),
|
snapshotTime: new Date(),
|
||||||
priceChangePercent: priceChangePercent.toFixed(2),
|
// 保留8位小数,确保每分钟销毁带来的微小涨幅在前端可见
|
||||||
|
priceChangePercent: priceChangePercent.toFixed(8),
|
||||||
initialPrice: initialPrice.toFixed(18),
|
initialPrice: initialPrice.toFixed(18),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +265,8 @@ export class PriceService {
|
||||||
burnMultiplier: burnMultiplier.toFixed(18),
|
burnMultiplier: burnMultiplier.toFixed(18),
|
||||||
minuteBurnRate: snapshot.minuteBurnRate.toFixed(18),
|
minuteBurnRate: snapshot.minuteBurnRate.toFixed(18),
|
||||||
snapshotTime: snapshot.snapshotTime,
|
snapshotTime: snapshot.snapshotTime,
|
||||||
priceChangePercent: priceChangePercent.toFixed(2),
|
// 保留8位小数,确保每分钟销毁带来的微小涨幅在前端可见
|
||||||
|
priceChangePercent: priceChangePercent.toFixed(8),
|
||||||
initialPrice: initialPrice.toFixed(18),
|
initialPrice: initialPrice.toFixed(18),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,11 +207,11 @@ class ContributionPage extends ConsumerWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
// 积分股池实时余量
|
// 100亿销毁剩余量
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'积分股池实时余量: ',
|
'100亿销毁剩余量: ',
|
||||||
style: TextStyle(fontSize: 12, color: AppColors.textSecondaryOf(context)),
|
style: TextStyle(fontSize: 12, color: AppColors.textSecondaryOf(context)),
|
||||||
),
|
),
|
||||||
isSharePoolLoading
|
isSharePoolLoading
|
||||||
|
|
|
||||||
|
|
@ -188,15 +188,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
letterSpacing: -0.75,
|
letterSpacing: -0.75,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
// '积分值' 文字已隐藏
|
||||||
Text(
|
|
||||||
'积分值',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
color: AppColors.textSecondaryOf(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
@ -227,7 +219,8 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
DataText(
|
DataText(
|
||||||
data: isLoading ? null : '$sign${changePercent.toStringAsFixed(2)}%',
|
// 显示6位小数,确保每分钟销毁引起的涨幅尾数可见
|
||||||
|
data: isLoading ? null : '$sign${changePercent.toStringAsFixed(6)}%',
|
||||||
isLoading: isLoading,
|
isLoading: isLoading,
|
||||||
placeholder: '+--.--%',
|
placeholder: '+--.--%',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -357,7 +350,7 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
Container(width: 1, height: 24, color: bgGray),
|
Container(width: 1, height: 24, color: bgGray),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
_buildMarketDataItem(
|
_buildMarketDataItem(
|
||||||
'黑洞销毁量',
|
'已销毁量',
|
||||||
market != null ? formatCompact(market.blackHoleAmount) : null,
|
market != null ? formatCompact(market.blackHoleAmount) : null,
|
||||||
_red,
|
_red,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue