Bladeren bron

feat: NG-15: 新会员注册时增加国家与语言选项.

kevin 1 jaar geleden
bovenliggende
commit
03223c59c8
1 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 6 6
      common/models/forms/ShopGoodsForm.php

+ 6 - 6
common/models/forms/ShopGoodsForm.php

@@ -210,14 +210,14 @@ class ShopGoodsForm extends Model
             // 商品属性
             foreach ($this->nature as $item) {
                 // 国家
-                $currency = Countries::getById($item['countryId']);
+                $country = Countries::getById($item['countryId']);
                 // 转换美元汇率
-                $productRate = CurrencyConversions::getToUSDRate($currency['LOCAL_CURRENCY_ID']);
+                $productRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
 
                 $shopGoodsNature = new ShopGoodsNature();
                 $shopGoodsNature->GOODS_ID = $shopGoods->ID;
                 $shopGoodsNature->COUNTRY_ID = $item['countryId'];
-                $shopGoodsNature->LOCAL_CURRENCY_ID = $currency['LOCAL_CURRENCY_ID'];
+                $shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
                 $shopGoodsNature->MARKET_PRICE = $item['sellPrice'];
                 $shopGoodsNature->SELL_PRICE = $shopGoods->SELL_PRICE_STANDARD * $productRate;
                 $shopGoodsNature->TAX_RATE = $item['taxRate'];
@@ -275,14 +275,14 @@ class ShopGoodsForm extends Model
             // 商品属性
             foreach ($this->nature as $item) {
                 // 国家
-                $currency = Countries::getById($item['countryId']);
+                $country = Countries::getById($item['countryId']);
                 // 转换美元汇率
-                $rate = CurrencyConversions::getToUSDRate($currency['LOCAL_CURRENCY_ID']);
+                $rate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
 
                 $shopGoodsNature = new ShopGoodsNature();
                 $shopGoodsNature->GOODS_ID = $model->ID;
                 $shopGoodsNature->COUNTRY_ID = $item['countryId'];
-                $shopGoodsNature->LOCAL_CURRENCY_ID = $currency['LOCAL_CURRENCY_ID'];
+                $shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
                 $shopGoodsNature->MARKET_PRICE = $item['sellPrice'];
                 $shopGoodsNature->SELL_PRICE = $model->SELL_PRICE_STANDARD * $rate;
                 $shopGoodsNature->TAX_RATE = $item['taxRate'];