zxiansheng 3 лет назад
Родитель
Сommit
367d095c00

+ 2 - 1
common/helpers/user/Balance.php

@@ -837,10 +837,11 @@ class Balance {
      */
     public static function getLogData($userId){
         $userWallet = UserWallet::findOne(['USER_ID' => $userId]);
+        $cash = !empty($userWallet) ? $userWallet['CASH'] : '';
         $userName = Info::getUserNameByUserId($userId);
         $data = [];
         $data[$userId]['label'] = $userName.'余额';
-        $data[$userId]['value'] = '奖金'.self::getAvailableBalance($userId).',现金'.$userWallet['CASH'];
+        $data[$userId]['value'] = '奖金'.self::getAvailableBalance($userId).',现金'.$cash;
         return $data;
     }
 }

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

@@ -242,7 +242,7 @@ class RechargeForm extends Model {
         $hash = '';
         $max = strlen($seed) - 1;
         for ($i = 0; $i < $length; $i++) {
-            $hash .= $seed{mt_rand(0, $max)};
+            $hash .= $seed[mt_rand(0, $max)];
         }
         return $hash;
     }

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

@@ -284,7 +284,7 @@ class TransferForm extends Model {
         $hash = '';
         $max = strlen($seed) - 1;
         for ($i = 0; $i < $length; $i++) {
-            $hash .= $seed{mt_rand(0, $max)};
+            $hash .= $seed[mt_rand(0, $max)];
         }
         return $hash;
     }

+ 2 - 2
common/models/forms/WithdrawForm.php

@@ -423,7 +423,7 @@ class WithdrawForm extends Model {
         $hash = '';
         $max = strlen($seed) - 1;
         for ($i = 0; $i < $length; $i++) {
-            $hash .= $seed{mt_rand(0, $max)};
+            $hash .= $seed[mt_rand(0, $max)];
         }
         return $hash;
     }
@@ -440,7 +440,7 @@ class WithdrawForm extends Model {
         $hash = '';
         $max = strlen($seed) - 1;
         for ($i = 0; $i < $length; $i++) {
-            $hash .= $seed{mt_rand(0, $max)};
+            $hash .= $seed[mt_rand(0, $max)];
         }
         return $hash;
     }