chore: sync latest changes including K unit formatting

main
sp mac bookpro 2605 2026-06-13 11:22:43 +08:00
parent df20870b6b
commit cba88a21b3
9 changed files with 26 additions and 27 deletions

View File

@ -51,7 +51,7 @@ const NAV_GROUPS: Array<{
{
label: '商城',
items: [
{ to: '/points-mall', icon: <CompassOutlined />, label: '积分商城' }
{ to: '/points-mall', icon: <CompassOutlined />, label: 'Token商城' }
]
}
];

View File

@ -54,10 +54,10 @@ export function usePointsMallPageLogic() {
setCategoryId(cats[0].id);
}
if (meRes.status === 'rejected') {
message.error('获取积分信息失败,请稍后重试');
message.error('获取Token信息失败,请稍后重试');
}
} catch {
message.error('获取积分信息失败,请稍后重试');
message.error('获取Token信息失败,请稍后重试');
setOverview({ ...MOCK_OVERVIEW, me: { points: 0, level: 'Lv.0' } });
setCategories(MOCK_OVERVIEW.categories);
} finally {
@ -148,7 +148,7 @@ export function usePointsMallPageLogic() {
return { ...prev, me: { ...prev.me, points: remainingPoints } };
});
}
message.success('已冻结积分并预扣库存,请继续填写收件信息');
message.success('已冻结Token并预扣库存,请继续填写收件信息');
} catch (e: any) {
const msg = e?.response?.data?.message || e?.response?.data?.error || e?.message || '兑换失败,请稍后重试';
message.error(msg);

View File

@ -22,7 +22,7 @@ export default function ConfirmExchangeModal(props: {
<div className="points-confirm-product-name">{product.name}</div>
<Space size={8} wrap className="points-confirm-tags">
<Tag color="processing" className="points-confirm-tag">
{product.pointsPrice.toLocaleString()}
{product.pointsPrice.toLocaleString()} Token
</Tag>
<Tag color="default" className="points-confirm-tag">
{userPoints.toLocaleString()}
@ -45,11 +45,11 @@ export default function ConfirmExchangeModal(props: {
</div>
<div className="points-confirm-tip">
/
Token/
</div>
<Button type="primary" block disabled={!canAfford || loading} loading={loading} onClick={onConfirm}>
{canAfford ? '确认并继续' : '积分不足'}
{canAfford ? '确认并继续' : 'Token不足'}
</Button>
</div>
)}

View File

@ -53,8 +53,8 @@ export default function PointsMallH5Products({ logic }: Props) {
options={[
{ value: 'popular', label: '热度优先' },
{ value: 'newest', label: '最新上架' },
{ value: 'price_asc', label: '积分从低到高' },
{ value: 'price_desc', label: '积分从高到低' }
{ value: 'price_asc', label: 'Token从低到高' },
{ value: 'price_desc', label: 'Token从高到低' }
]}
/>
<Select

View File

@ -25,9 +25,9 @@ export default function PointsMallH5Top({ logic }: Props) {
<div className="points-mall-hero h5-points-mall-hero">
<div className="points-mall-header h5-points-mall-header">
<div className="points-mall-title-section">
<h1 className="page-title stats-page-title h5-page-title"></h1>
<h1 className="page-title stats-page-title h5-page-title">Token</h1>
<p className="page-subtitle stats-page-subtitle h5-page-subtitle">
使<br /> API 1 = 1000
使Token<br />Token API
</p>
</div>
<div className="points-mall-balance-card h5-points-mall-balance-card">
@ -36,7 +36,7 @@ export default function PointsMallH5Top({ logic }: Props) {
) : (
<div className="points-balance-row h5-points-balance-row">
<div className="points-balance-main">
<div className="points-balance-label"></div>
<div className="points-balance-label">Token</div>
<div className="points-balance-value">{userPoints >= 1000 ? `${(userPoints / 1000).toFixed(1)} K` : userPoints.toLocaleString()}</div>
<div className="points-balance-subtext">
${typeof totalSpentUSD === 'number' ? totalSpentUSD.toFixed(2) : '--'}

View File

@ -49,8 +49,8 @@ export default function PointsMallPageWeb({ logic }: Props) {
<div className="points-mall-hero">
<div className="points-mall-header">
<div className="points-mall-title-section">
<h1 className="page-title stats-page-title"></h1>
<p className="page-subtitle stats-page-subtitle">使 API 1 = 1000 </p>
<h1 className="page-title stats-page-title">Token</h1>
<p className="page-subtitle stats-page-subtitle">使TokenToken API </p>
</div>
<div className="points-mall-balance-card">
{overviewLoading ? (
@ -58,7 +58,7 @@ export default function PointsMallPageWeb({ logic }: Props) {
) : (
<div className="points-balance-row">
<div>
<div className="points-balance-label"></div>
<div className="points-balance-label">Token</div>
<div className="points-balance-value">{userPoints >= 1000 ? `${(userPoints / 1000).toFixed(1)} K` : userPoints.toLocaleString()}</div>
<div className="points-balance-subtext">
${typeof totalSpentUSD === 'number' ? totalSpentUSD.toFixed(2) : '--'}
@ -152,8 +152,8 @@ export default function PointsMallPageWeb({ logic }: Props) {
options={[
{ value: 'popular', label: '热度优先' },
{ value: 'newest', label: '最新上架' },
{ value: 'price_asc', label: '积分从低到高' },
{ value: 'price_desc', label: '积分从高到低' },
{ value: 'price_asc', label: 'Token从低到高' },
{ value: 'price_desc', label: 'Token从高到低' },
]}
/>
<Select
@ -197,7 +197,7 @@ export default function PointsMallPageWeb({ logic }: Props) {
<div className="points-mall-product-price-row">
<div>
<span className="points-mall-product-price">{p.pointsPrice >= 1000 ? `${(p.pointsPrice / 1000).toFixed(1)} K` : Number(p.pointsPrice).toLocaleString()}</span>
<span className="points-mall-product-price-label"></span>
<span className="points-mall-product-price-label">Token</span>
</div>
<Button
type="primary"
@ -205,7 +205,7 @@ export default function PointsMallPageWeb({ logic }: Props) {
disabled={userPoints < p.pointsPrice || exchangeLoading}
onClick={() => handleExchangeClick(p)}
>
{userPoints < p.pointsPrice ? '积分不足' : '兑换'}
{userPoints < p.pointsPrice ? 'Token不足' : '兑换'}
</Button>
</div>
<div className="points-mall-product-footer">

View File

@ -13,7 +13,7 @@ export const MOCK_OVERVIEW: PointsMallOverview = {
banners: [{ id: 'b1', title: '本期活动', subtitle: 'Up to 25% Off', imageUrl: '', linkUrl: '' }],
promoEntries: [
{ id: 'p1', title: '促销活动', subtitle: '本周精选', linkUrl: '' },
{ id: 'p2', title: '积分任务', subtitle: '快速涨积分', linkUrl: '' }
{ id: 'p2', title: 'Token任务', subtitle: '快速涨Token', linkUrl: '' }
]
};

View File

@ -23,7 +23,6 @@ export default function StatsPageWeb({ logic }: { logic: StatsPageLogic }) {
<h1 className="page-title stats-page-title"></h1>
<p className="page-subtitle stats-page-subtitle">
使
1 1000
</p>
</div>
<div className="stats-page-summary-card">

View File

@ -6,9 +6,9 @@ export default function StatsPointsCard({ logic }: { logic: StatsPageLogic }) {
return (
<div className="points-integration-section">
<Card
title="消费与积分"
title="消费与Token"
className="points-integration-card"
extra={<Tag bordered={false} className="stats-soft-tag">1 USD = 1000 </Tag>}
extra={<Tag bordered={false} className="stats-soft-tag">1 USD = 1000 Token</Tag>}
>
<div className="points-integration-row">
<div className="points-integration-item">
@ -22,7 +22,7 @@ export default function StatsPointsCard({ logic }: { logic: StatsPageLogic }) {
<div className="points-integration-item">
<div className="points-integration-label">
<GiftOutlined className="stats-tone-brand-text" />
Token
</div>
<div className="points-integration-value">{logic.formatPoints(logic.totalPoints)}</div>
<div className="points-integration-desc"></div>
@ -30,10 +30,10 @@ export default function StatsPointsCard({ logic }: { logic: StatsPageLogic }) {
<div className="points-integration-item">
<div className="points-integration-label">
<BarChartOutlined className="stats-tone-success-text" />
Token
</div>
<div className="points-integration-value">1:1000</div>
<div className="points-integration-desc"> 1 1000 </div>
{/* <div className="points-integration-value">1:1000</div>
<div className="points-integration-desc"> 1 1000 Token</div> */}
</div>
</div>
</Card>