Browse Source

feat: update price display use current currency symbol

feitianbubu 3 months ago
parent
commit
293a5de0f8
1 changed files with 5 additions and 2 deletions
  1. 5 2
      web/src/helpers/render.jsx

+ 5 - 2
web/src/helpers/render.jsx

@@ -1086,9 +1086,12 @@ function renderPriceSimpleCore({
   );
   );
   const finalGroupRatio = effectiveGroupRatio;
   const finalGroupRatio = effectiveGroupRatio;
 
 
+  const { symbol, rate } = getCurrencyConfig();
   if (modelPrice !== -1) {
   if (modelPrice !== -1) {
-    return i18next.t('价格:${{price}} * {{ratioType}}:{{ratio}}', {
-      price: modelPrice,
+    const displayPrice = (modelPrice * rate).toFixed(6);
+    return i18next.t('价格:{{symbol}}{{price}} * {{ratioType}}:{{ratio}}', {
+      symbol: symbol,
+      price: displayPrice,
       ratioType: ratioLabel,
       ratioType: ratioLabel,
       ratio: finalGroupRatio,
       ratio: finalGroupRatio,
     });
     });