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

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

zhangl 1 год назад
Родитель
Сommit
4bb6f8fc44
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      frontendApi/modules/v1/controllers/BonusController.php

+ 9 - 1
frontendApi/modules/v1/controllers/BonusController.php

@@ -22,6 +22,8 @@ use common\models\CalcBonus;
 use common\models\CalcBonusBSDefault;
 use common\models\CalcBonusBT;
 use common\models\CalcBonusFL;
+use common\models\Countries;
+use common\models\Currency;
 use common\models\DealType;
 use common\models\FlowBonus;
 use common\models\FlowCF;
@@ -81,6 +83,12 @@ class BonusController extends BaseController {
         if($cashWallet){
             $data['CASH'] = $cashWallet['CASH'];
         }
+
+        $user = User::getEnCodeInfo($userId);
+        // 账户币种
+        $country = Countries::getById($user['COUNTRY_ID']);
+        $currency = Currency::getById($country['LOCAL_CURRENCY_ID']);
+
         //是否显示车房领袖
 //        $showCFLX = true;
 //        if ($data['CF'] <= 0 && $data['LX'] <= 0) {
@@ -91,7 +99,7 @@ class BonusController extends BaseController {
 //            }
 //        }
         $wallet[] = ['walletType' => 'bonus', 'walletName' => Yii::t('app', 'memberBonus'), 'amount' => Tool::formatPrice($data['BONUS'])];//会员奖金
-        $wallet[] = ['walletType' => 'cash', 'walletName' => Yii::t('app', 'memberEcoin'), 'amount' => Tool::formatPrice($data['CASH'])];//会员余额
+        $wallet[] = ['walletType' => 'cash', 'walletName' => Yii::t('app', 'memberEcoin'), 'amount' => Tool::formatPrice($data['CASH']), 'coin' => $currency['CODE']];//会员余额
 //        $wallet[] = ['walletType' => 'point', 'walletName' => '会员积分', 'amount' => Tool::formatPrice($data['RECONSUME_POINTS'])];
 //        $wallet[] = ['walletType' => 'exchange', 'walletName' => 'Exchange points', 'amount' => Tool::formatPrice($data['EXCHANGE_POINTS'])];//兑换点数
 //        $wallet[] = ['walletType' => 'tourism_points', 'walletName' => 'Travel points', 'amount' => Tool::formatPrice($data['TOURISM_POINTS'])];//旅游积分