Ver Fonte

feat: update price display use current currency symbol

feitianbubu há 1 mês atrás
pai
commit
293a5de0f8
1 ficheiros alterados com 5 adições e 2 exclusões
  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 { symbol, rate } = getCurrencyConfig();
   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,
       ratio: finalGroupRatio,
     });