Forráskód Böngészése

抢礼物,优化

lizhen_gitee 1 éve
szülő
commit
92152f40e0

+ 1 - 1
application/api/controller/Grabgift.php

@@ -127,7 +127,7 @@ class Grabgift extends Api
             foreach($rand_data as $uid => $val){
                 $rand_data_new[] = $uid;
             }
-            $winer_uid = $rand_data_new[rand(0,4)];
+            $winer_uid = $rand_data_new[rand(0,$seat_number-1)];
             $winer_nickname = Db::name('user')->where('id',$winer_uid)->value('nickname');
 
             //修改

+ 1 - 0
application/api/library/ExceptionHandle.php

@@ -34,6 +34,7 @@ class ExceptionHandle extends Handle
 
         if (defined('API_REQUEST_LOG_TYPE') && defined('API_REQUEST_LOG_TYPE') == 1){
             LogUtil::error('result','Api-Middleware-Log','request_log',$result);
+            LogUtil::error('ExceptionMsg','Api-Middleware-Log','request_log',$e->getMessage());
             LogUtil::error('Exception','Api-Middleware-Log','request_log',$e);
         }else{
             //记录app异常返回结果