Browse Source

gf yunfei xiufu

NoteStar 5 years ago
parent
commit
b7bfa15a96
1 changed files with 4 additions and 3 deletions
  1. 4 3
      vendor/fancyecommerce/fecshop/services/Shipping.php

+ 4 - 3
vendor/fancyecommerce/fecshop/services/Shipping.php

@@ -189,11 +189,12 @@ class Shipping extends Service
             ];
             ];
         } else {  // 通过公式计算得到运费。
         } else {  // 通过公式计算得到运费。
             $formula = str_replace('[weight]', $weight, $formula);
             $formula = str_replace('[weight]', $weight, $formula);
-            $currentCost = eval("return $formula;");
+            $baseCost = eval("return $formula;");
+            $currCost = Yii::$service->page->currency->getCurrentCurrencyPrice($baseCost);
             
             
             return [
             return [
-                'currCost'  => Yii::$service->helper->format->number_format($currentCost, 2),
-                'baseCost'  => Yii::$service->helper->format->number_format($currentCost, 2),
+                'currCost'  => Yii::$service->helper->format->number_format($currCost, 2),
+                'baseCost'  => Yii::$service->helper->format->number_format($baseCost, 2),
             ];
             ];
         }
         }
     }
     }