Просмотр исходного кода

推广返利中新增邀请记录,显示用户已经邀请的好友列表

dapinglee 7 лет назад
Родитель
Сommit
ea15e7d1e2

+ 1 - 0
app/Http/Controllers/UserController.php

@@ -1132,6 +1132,7 @@ class UserController extends Controller
         $view['link'] = $this->systemConfig['website_url'] . '/register?aff=' . $user['id'];
         $view['referralLogList'] = ReferralLog::query()->where('ref_user_id', $user['id'])->with('user')->paginate(10);
         $view['referralApplyList'] = ReferralApply::query()->where('user_id', $user['id'])->with('user')->paginate(10);
+        $view['referralUserList'] = User::select(['username','created_at'])->where('referral_uid', $user['id'])->orderBy('id','desc')->paginate(10);
 
         return Response::view('user/referral', $view);
     }

+ 3 - 0
resources/lang/en/home.php

@@ -175,4 +175,7 @@ return [
     'logout'                          => 'Log Out',
     'promote_link'                    => 'With your promotion link registration and activation, both of you will receive :traffic traffic awards; when they are consumed, you will receive :referral_percent% of their consumption amount as a reward.',
     'promote_invite_code'             => 'With your invite code registration and activation, both of you will receive :traffic traffic awards; when they are consumed, you will receive :referral_percent% of their consumption amount as a reward.',
+    'invite_user_title'               => 'Invitation record',
+    'invite_user_username'            => 'Username',
+    'invite_user_created_at'          => 'Registration time',
 ];

+ 3 - 0
resources/lang/ja/home.php

@@ -175,4 +175,7 @@ return [
     'logout'                          => 'ログアウト',
     'promote_link'                    => 'あなたの普及のリンクを通じて登録してアクティブにして、あなたたちの双方はすべて :traffic の流量の奨励を獲得します;彼らが消費する時、あなたは彼らの消費金額の :referral_percent% を獲得することを奨励します。',
     'promote_invite_code'             => 'お客様の招待コードの登録をアクティブにして、あなた達の双方は獲得して :traffic 流量奨励;彼らが消费の時、あなたは獲得して彼らの消費金額の :referral_percent% ご褒美として。',
+    'invite_user_title'               => '招待状',
+    'invite_user_username'            => 'ユーザー名',
+    'invite_user_created_at'          => '登録時間',
 ];

+ 3 - 0
resources/lang/ko/home.php

@@ -173,4 +173,7 @@ return [
     'logout'                          => '로그아웃',
     'promote_link'                    => '보급 링크 등록을 통해 활성화, 양측 모두 :traffic 유량에 장려합니다; 그들이 소비할 때, 그들의 소비 금액을 얻을 수 있는 :referral_percent% 를 장려합니다.',
     'promote_invite_code'             => '요청을 통해 등록 및 활성화, 양측 모두 :traffic 유량에 장려합니다, 그들이 소비할 때, 그들의 소비 금액을 얻을 수 있습니다 :referral_percent% 를 장려합니다',
+    'invite_user_title'               => '초대장',
+    'invite_user_username'            => '사용자 이름',
+    'invite_user_created_at'          => '등록 시간',
 ];

+ 3 - 0
resources/lang/zh-CN/home.php

@@ -175,4 +175,7 @@ return [
     'logout'                          => '退出',
     'promote_link'                    => '通过您的推广链接注册并激活,你们双方都将获得 :traffic 流量奖励;当他们消费时,您将获得他们消费金额的 :referral_percent% 作为奖励。',
     'promote_invite_code'             => '通过您的邀请码注册并激活,你们双方都将获得 :traffic 流量奖励;当他们消费时,您将获得他们消费金额的 :referral_percent% 作为奖励。',
+    'invite_user_title'               => '邀请记录',
+    'invite_user_username'            => '用户名',
+    'invite_user_created_at'          => '注册时间',
 ];

+ 3 - 0
resources/lang/zh-tw/home.php

@@ -175,4 +175,7 @@ return [
     'logout'                          => '登出',
     'promote_link'                    => '通過您的推廣連結注册並啟動,您和新用戶都會獲得 :traffic 流量獎勵;當他們消費時,您將獲得他們消費金額的 :referral_percent% 作為獎勵。',
     'promote_invite_code'             => '通過您的邀請碼注册並啟動,您和新用戶都會獲得 :traffic 流量獎勵;當他們消費時,您將獲得他們消費金額的 :referral_percent% 作為獎勵。',
+    'invite_user_title'               => '邀請記錄',
+    'invite_user_username'            => '用戶名',
+    'invite_user_created_at'          => '註冊時間',
 ];

+ 43 - 1
resources/views/user/referral.blade.php

@@ -39,7 +39,49 @@
                         </div>
                     </div>
                 </div>
-
+                <!-- 邀请记录 -->
+                <div class="portlet light bordered">
+                    <div class="portlet-title">
+                        <div class="caption font-dark">
+                            <span class="caption-subject bold"> {{trans('home.invite_user_title')}} </span>
+                        </div>
+                    </div>
+                    <div class="portlet-body">
+                        <div class="table-scrollable">
+                            <table class="table table-striped table-bordered table-hover table-checkable order-column">
+                                <thead>
+                                <tr>
+                                    <th> # </th>
+                                    <th> {{trans('home.invite_user_username')}} </th>
+                                    <th> {{trans('home.invite_user_created_at')}}</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @if($referralUserList->isEmpty())
+                                    <tr>
+                                        <td colspan="6" style="text-align: center;"> {{trans('home.referral_table_none')}} </td>
+                                    </tr>
+                                @else
+                                    @foreach($referralUserList as $key => $vo)
+                                        <tr class="odd gradeX">
+                                            <td> {{$key + 1}} </td>
+                                            <td> {{$vo->username}} </td>
+                                            <td> {{$vo->created_at}} </td>
+                                         </tr>
+                                    @endforeach
+                                @endif
+                                </tbody>
+                            </table>
+                        </div>
+                        <div class="row">
+                            <div class="col-md-7 col-sm-7">
+                                <div class="dataTables_paginate paging_bootstrap_full_number pull-right">
+                                    {{ $referralUserList->links() }}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
                 <!-- 推广记录 -->
                 <div class="portlet light bordered">
                     <div class="portlet-title">