mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
update
This commit is contained in:
parent
2cb86bf17e
commit
7a15c08148
@ -27,6 +27,11 @@ class InviteController extends Controller
|
|||||||
$codes = InviteCode::where('user_id', $request->session()->get('id'))
|
$codes = InviteCode::where('user_id', $request->session()->get('id'))
|
||||||
->where('status', 0)
|
->where('status', 0)
|
||||||
->get();
|
->get();
|
||||||
|
$commission_rate = config('v2board.invite_commission');
|
||||||
|
$user = User::find($request->session()->get('id'));
|
||||||
|
if ($user->commission_rate) {
|
||||||
|
$commission_rate = $user->commission_rate;
|
||||||
|
}
|
||||||
$stat = [
|
$stat = [
|
||||||
//已注册用户数
|
//已注册用户数
|
||||||
(int)User::where('invite_user_id', $request->session()->get('id'))->count(),
|
(int)User::where('invite_user_id', $request->session()->get('id'))->count(),
|
||||||
@ -40,9 +45,8 @@ class InviteController extends Controller
|
|||||||
->where('commission_status', 0)
|
->where('commission_status', 0)
|
||||||
->where('invite_user_id', $request->session()->get('id'))
|
->where('invite_user_id', $request->session()->get('id'))
|
||||||
->sum('commission_balance'),
|
->sum('commission_balance'),
|
||||||
//已提现佣金
|
//佣金比例
|
||||||
0
|
(int)$commission_rate
|
||||||
|
|
||||||
];
|
];
|
||||||
return response([
|
return response([
|
||||||
'data' => [
|
'data' => [
|
||||||
|
Loading…
Reference in New Issue
Block a user