Kirin 3 anos atrás
pai
commit
3659f7e889
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      app/api/controller/activity/GameController.php

+ 2 - 1
app/api/controller/activity/GameController.php

@@ -22,6 +22,7 @@ class GameController
         $last_100 = LotteryLog::order('time', 'desc')->limit(100)->select();
         $award_lake = sys_config('award_lake', 0, true);
         $all_point = Lottery::where('status', 1)->whereTime('open_time', 'today')->sum('ticket');
+        $my_point = Lottery::where('status', 1)->where('uid', $request->uid())->whereTime('open_time', 'today')->sum('ticket');
         if ($all_point <= 0) $all_point = 1;
         $price = bcdiv($award_lake, bcmul($all_point, 2), 2);
         $join_price = sys_config('join_integral', 100, true);
@@ -32,7 +33,7 @@ class GameController
             $result = explode(',', $v['result']);
             $times["$result[0]"]++;
         }
-        return app('json')->success('ok', compact('join', 'join_price', 'price', 'join_member', 'time_span', 'last_game', 'times'));
+        return app('json')->success('ok', compact('my_point', 'join', 'join_price', 'price', 'join_member', 'time_span', 'last_game', 'times'));
     }
 
     public function join(Request $request)