|
|
@@ -28,6 +28,7 @@ use common\helpers\Date;
|
|
|
use common\helpers\Form;
|
|
|
use common\helpers\LoggerTool;
|
|
|
use common\models\Countries;
|
|
|
+use common\models\Currency;
|
|
|
use common\models\CurrencyConversions;
|
|
|
use common\models\DeclarationPackage;
|
|
|
use common\models\DecOrder;
|
|
|
@@ -152,6 +153,18 @@ class ShopController extends BaseController {
|
|
|
$countries = array_values($countries);
|
|
|
}
|
|
|
|
|
|
+ // 货币
|
|
|
+ $currencies = Cache::getCurrencies();
|
|
|
+ $currencies = array_column($currencies, NULL, 'ID');
|
|
|
+ // 货币汇率
|
|
|
+ $currenciesConversions = CurrencyConversions::getFromCache();
|
|
|
+ $currenciesConversions = array_column($currenciesConversions, NULL, 'TO_CURRENCY_ID');
|
|
|
+
|
|
|
+ foreach ($countries as $key => $country) {
|
|
|
+ $countries[$key]['LOCAL_CURRENCY_NAME'] = $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '';
|
|
|
+ $countries[$key]['CURRENCY_PRODUCT_RATE'] = $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
+ }
|
|
|
+
|
|
|
return static::notice([
|
|
|
'sellType' => ShopGoods::getSaleType(),
|
|
|
'goodsType' => ShopGoods::getGoodType(),
|