Jelajahi Sumber

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

zhangl 1 tahun lalu
induk
melakukan
43988acbf1

+ 2 - 1
common/models/forms/ApproachDeclarationUpgradeForm.php

@@ -143,7 +143,8 @@ class ApproachDeclarationUpgradeForm extends Model
             }
 
             // 报单中心汇率
-            $decCountry = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
+            $decCountryId = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
+            $decCountry = Countries::getById($decCountryId);
             $decUserCurrencyRate = CurrencyConversions::getToUSDRate($decCountry['LOCAL_CURRENCY_ID']);
             // 升级会员汇率
             $country = Countries::getById($baseInfo['COUNTRY_ID']);

+ 1 - 1
common/models/forms/DeclarationUpgradeForm.php

@@ -147,7 +147,7 @@ class DeclarationUpgradeForm extends Model
             $decCountry = Countries::getById($decCountryId);
             $decUserCurrencyRate = CurrencyConversions::getToUSDRate($decCountry['LOCAL_CURRENCY_ID']);
             // 升级会员汇率
-            $country = Countries::getById($this->countryId);
+            $country = Countries::getById($baseInfo['COUNTRY_ID']);
             $currencyRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);