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