Просмотр исходного кода

Merge pull request #2360 from feitianbubu/pr2/fix-price-currency

Seefs 2 месяцев назад
Родитель
Сommit
23292a5ae9
1 измененных файлов с 5 добавлено и 2 удалено
  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,
     });
     });