wesmiler hai 1 ano
pai
achega
0eea617710
Modificáronse 32 ficheiros con 871 adicións e 24 borrados
  1. 11 0
      app/Http/Controllers/Admin/UserController.php
  2. 5 2
      app/Http/Controllers/Api/v1/TestController.php
  3. 5 10
      app/Models/CacheModel.php
  4. 10 0
      app/Models/MenuModel.php
  5. 20 0
      app/Models/UserModel.php
  6. 30 0
      app/Services/Api/MemberService.php
  7. 0 4
      app/Services/BaseService.php
  8. 17 0
      app/Services/Common/LoginService.php
  9. 7 0
      app/Services/Common/MenuService.php
  10. 7 1
      app/Services/Common/RoleService.php
  11. 46 1
      app/Services/Common/UserService.php
  12. 1 0
      composer.json
  13. 49 2
      composer.lock
  14. 8 0
      config/google.php
  15. 1 0
      routes/web.php
  16. 30 1
      vendor/composer/autoload_classmap.php
  17. 1 0
      vendor/composer/autoload_psr4.php
  18. 35 1
      vendor/composer/autoload_static.php
  19. 48 0
      vendor/composer/installed.json
  20. 13 2
      vendor/composer/installed.php
  21. 3 0
      vendor/earnp/laravel-google-authenticator/.gitignore
  22. 19 0
      vendor/earnp/laravel-google-authenticator/composer.json
  23. 13 0
      vendor/earnp/laravel-google-authenticator/src/Facades/GoogleAuthenticator.php
  24. 34 0
      vendor/earnp/laravel-google-authenticator/src/GoogleAuthenticator.php
  25. 47 0
      vendor/earnp/laravel-google-authenticator/src/GoogleAuthenticatorServiceprovider.php
  26. 211 0
      vendor/earnp/laravel-google-authenticator/src/Librarys/GoogleAuthenticator.php
  27. 6 0
      vendor/earnp/laravel-google-authenticator/src/config/google.php
  28. BIN=BIN
      vendor/earnp/laravel-google-authenticator/src/images/google/android.png
  29. BIN=BIN
      vendor/earnp/laravel-google-authenticator/src/images/google/authenticator.jpg
  30. BIN=BIN
      vendor/earnp/laravel-google-authenticator/src/images/google/bindcard.jpg
  31. BIN=BIN
      vendor/earnp/laravel-google-authenticator/src/images/google/ios.png
  32. 194 0
      vendor/earnp/laravel-google-authenticator/src/views/google.blade.php

+ 11 - 0
app/Http/Controllers/Admin/UserController.php

@@ -46,4 +46,15 @@ class UserController extends Backend
         return $result;
     }
 
+    /**
+     * 验证账号是否绑定谷歌
+     * @return mixed
+     * @since 2020/11/11
+     * @author laravel开发员
+     */
+    public function checkAccount()
+    {
+        $result = $this->service->checkAccount();
+        return $result;
+    }
 }

+ 5 - 2
app/Http/Controllers/Api/v1/TestController.php

@@ -11,6 +11,7 @@ use App\Services\Api\PriceLogService;
 use App\Services\Common\InstitutionalService;
 use App\Services\CregisPayService;
 use App\Services\WalletService;
+use Earnp\GoogleAuthenticator\GoogleAuthenticator;
 
 /**
  * 测试
@@ -22,10 +23,12 @@ class TestController extends webApp
 
     public function check()
     {
+        $result  = GoogleAuthenticator::CreateSecret();
+        var_dump($result);
 //        $result = CregisPayService::make()->withdraw('58YsXE527EojowwqSFDV1V7tCWUGVFbEqnD1f3TUUALQ',1,'TS'.date('YmdHis'),1000);
 //        $result = MemberService::make()->pledgeUserList();
-        $result = PledgeOrderService::make()->orderSettle(4,'PD20240729105659045786',10023);
-        var_dump($result);
+//        $result = PledgeOrderService::make()->orderSettle(4,'PD20240729105659045786',10023);
+//        var_dump($result);
 //
 //        $userInfo = MemberModel::where(['id'=> 10023])->first()->toArray();
 //        var_dump($userInfo);

+ 5 - 10
app/Models/CacheModel.php

@@ -201,17 +201,12 @@ class CacheModel extends Model
      */
     public function getCacheFunc($funcName, $id = '')
     {
-        $cache_key = $this->getCacheKey($funcName, $id);
-        $data = $this->getCache($cache_key);
-        if (!$data) {
-            $arg_list = func_get_args();
-            if ($this->table) {
-                array_shift($arg_list);
-            }
-            $act = "cache" . ucfirst($funcName);
-            $data = call_user_func_array(array($this, $act), $arg_list);
-            $this->setCache($cache_key, $data, rand(3, 5));
+        $arg_list = func_get_args();
+        if ($this->table) {
+            array_shift($arg_list);
         }
+        $act = "cache" . ucfirst($funcName);
+        $data = call_user_func_array(array($this, $act), $arg_list);
         return $data;
     }
 

+ 10 - 0
app/Models/MenuModel.php

@@ -26,6 +26,16 @@ class MenuModel extends BaseModel
     // 设置数据表
     protected $table = 'menu';
 
+    /**
+     * 上级
+     * @return \Illuminate\Database\Eloquent\Relations\HasOne
+     */
+    public function parent()
+    {
+        return $this->hasOne(MenuModel::class, 'id','pid')
+            ->where(['status'=>1,'mark'=>1])
+            ->select(['id','title','icon','path','type','sort','status']);
+    }
 
     /**
      * 获取子级菜单列表

+ 20 - 0
app/Models/UserModel.php

@@ -11,7 +11,9 @@
 
 namespace App\Models;
 
+use App\Services\Api\MemberService;
 use App\Services\Common\UserRoleService;
+use Earnp\GoogleAuthenticator\GoogleAuthenticator;
 
 /**
  * 会员管理-模型
@@ -46,6 +48,24 @@ class UserModel extends BaseModel
                 $info['gender_name'] = config('admin.gender_list')[$info['gender']];
             }
 
+            // 谷歌验证码处理
+            $info['google_qrcode'] = '';
+            if(empty($info['google_key'])){
+                    $googleData  = GoogleAuthenticator::CreateSecret();
+                    $googleKey = isset($googleData['secret'])?$googleData['secret'] : '';
+                    $googleUrl = isset($googleData['codeurl'])?$googleData['codeurl'] : '';
+                    if($googleKey && $googleUrl){
+                        UserModel::where(['id'=>$id])->update(['google_key'=> $googleKey,'update_time'=>time()]);
+                        $info['google_key'] = $googleKey;
+                        $info['google_qrcode'] = MemberService::make()->makeQrcode($googleUrl,'google',true);
+                        $info['google_qrcode'] = get_image_url($info['google_qrcode']);
+                    }
+            }else{
+                $googleUrl = "otpauth://totp/?secret={$info['google_key']}";
+                $info['google_qrcode'] = MemberService::make()->makeQrcode($googleUrl,'google',true);
+                $info['google_qrcode'] = get_image_url($info['google_qrcode']);
+            }
+
             // 获取用户角色列表
             $userRoleService = new UserRoleService();
             $roleList = $userRoleService->getUserRoleList($id);

+ 30 - 0
app/Services/Api/MemberService.php

@@ -22,6 +22,7 @@ use App\Services\RedisService;
 use App\Services\ToolService;
 use App\Services\WalletService;
 use Illuminate\Support\Facades\DB;
+use phpqrcode\QRcode;
 
 /**
  * 会员-服务类
@@ -514,6 +515,35 @@ class MemberService extends BaseService
     }
 
     /**
+     * 生成普通参数二维码
+     * @param $str 参数
+     * @param bool $refresh 是否重新生成
+     * @return bool
+     */
+    public function makeQrcode($str, $dir='qrcode', $refresh = false, $size = 4, $margin = 2, $level = 2)
+    {
+        $basePath = base_path() . '/public';
+        $qrFile = "/images/{$dir}/";
+        if (!is_dir($basePath . '/uploads' . $qrFile)) {
+            @mkdir($basePath . '/uploads' . $qrFile, 0755, true);
+        }
+
+        $key = date('Ymd') . strtoupper(md5($str . '_' . $size . $margin . $level));
+        $qrFile = $qrFile . "C_{$key}.png";
+        $cacheKey = "caches:qrcodes:member_" . $key;
+        if (RedisService::get($cacheKey) && is_file($basePath . '/uploads' . $qrFile) && !$refresh) {
+            return $qrFile;
+        }
+
+        QRcode::png($str, $basePath . '/uploads' . $qrFile, $level, $size, $margin);
+        if (!file_exists($basePath . '/uploads' . $qrFile)) {
+            return false;
+        }
+        RedisService::set($cacheKey, ['str' => $str, 'qrcode' => $qrFile, 'date' => date('Y-m-d H:i:s')], 7 * 24 * 3600);
+        return $qrFile;
+    }
+
+    /**
      * 提现
      * @param $userId 提现用户ID
      * @param $params 提现参数:money-金额(必选)、coin_type-账户类型/币种(必选)

+ 0 - 4
app/Services/BaseService.php

@@ -171,10 +171,6 @@ class BaseService
 
         // 排序(支持多重排序)
         $query = $this->model->where($map)->where(function($query) use($param){
-            $businessId = isset($param['bsid'])? intval($param['bsid']) : 0;
-            if($businessId>0){
-                $query->where(['business_id'=> $businessId]);
-            }
 
             $userType = isset($param['user_type'])? $param['user_type'] : 0;
             if($userType){

+ 17 - 0
app/Services/Common/LoginService.php

@@ -16,6 +16,7 @@ use App\Models\ActionLogModel;
 use App\Models\UserModel;
 use App\Services\BaseService;
 use Carbon\Carbon;
+use Earnp\GoogleAuthenticator\GoogleAuthenticator;
 use Illuminate\Support\Facades\Session;
 use Illuminate\Support\Facades\Validator;
 use Gregwar\Captcha\CaptchaBuilder;
@@ -131,16 +132,32 @@ class LoginService extends BaseService
         if (!$info) {
             return message('您的登录用户名不存在', false);
         }
+
         // 密码校验
         $password = get_password($password . $username);
         if ($password != $info['password']) {
             return message("您的登录密码不正确", false);
         }
+
         // 使用状态校验
         if ($info['status'] != 1) {
             return message("您的帐号已被禁用", false);
         }
 
+        // 谷歌验证码验证
+        $googleBind = isset($info['google_bind'])? intval($info['google_bind']) : 0;
+        $googleKey = isset($info['google_key'])? trim($info['google_bind']) : '';
+        $googleCode = isset($param['google_code'])? trim($param['google_code']) : '';
+        if($googleBind == 1 && $googleKey){
+            if(empty($googleCode)){
+                return message("请输入谷歌验证码", false);
+            }
+
+            if (!GoogleAuthenticator::CheckCode($googleKey,$googleCode)){
+                return message("谷歌验证码错误", false);
+            }
+        }
+
         // 设置日志标题
         ActionLogModel::setTitle("登录系统");
         ActionLogModel::record();

+ 7 - 0
app/Services/Common/MenuService.php

@@ -14,6 +14,7 @@ namespace App\Services\Common;
 
 use App\Models\MenuModel;
 use App\Services\BaseService;
+use App\Services\RedisService;
 
 /**
  * 菜单管理-服务类
@@ -236,6 +237,11 @@ class MenuService extends BaseService
      */
     public function getPermissionMenu($userId, $pid = 0)
     {
+        $cacheKey = "caches:menus:{$userId}_{$pid}";
+        $menuList = RedisService::get($cacheKey);
+        if($menuList){
+            return $menuList;
+        }
         $menuModel = new MenuModel();
         $menuList = $menuModel::from("menu as m")
             ->select('m.*')
@@ -257,6 +263,7 @@ class MenuService extends BaseService
                     $val['children'] = $childList;
                 }
             }
+            RedisService::set($cacheKey, $menuList, rand(5, 10));
         }
         return $menuList;
     }

+ 7 - 1
app/Services/Common/RoleService.php

@@ -67,7 +67,7 @@ class RoleService extends BaseService
         $roleId = intval(getter($param, "role_id", 0));
         // 获取全部菜单
         $menuModel = new MenuModel();
-        $menuList = $menuModel->where([
+        $menuList = $menuModel->with(['parent'])->where([
             ['status', '=', 1],
             ['mark', '=', 1],
         ])->orderBy("sort", "asc")->get()->toArray();
@@ -76,10 +76,16 @@ class RoleService extends BaseService
             $roleMenuList = $roleMenuModel->where("role_id", $roleId)->get("menu_id")->toArray();
             $menuIdList = array_key_value($roleMenuList, "menu_id");
             foreach ($menuList as &$val) {
+                $parent = isset($val['parent'])? $val['parent'] : [];
+                $pid = isset($val['pid'])? $val['pid'] : 0;
                 if (in_array($val['id'], $menuIdList)) {
                     $val['checked'] = true;
                     $val['open'] = true;
                 }
+
+                if($pid>0 && $parent == null){
+                    unset($val);
+                }
             }
         }
         return message(MESSAGE_OK, true, $menuList);

+ 46 - 1
app/Services/Common/UserService.php

@@ -11,8 +11,11 @@
 
 namespace App\Services\Common;
 
+use App\Models\ActionLogModel;
 use App\Models\UserModel;
 use App\Services\BaseService;
+use App\Services\RedisService;
+use Earnp\GoogleAuthenticator\GoogleAuthenticator;
 
 /**
  * 用户管理-服务类
@@ -103,7 +106,6 @@ class UserService extends BaseService
             }
         }
 
-
         // 头像处理
         $avatar = isset($data['avatar']) ? trim($data['avatar']) : '';
         if (strpos($avatar, "temp")) {
@@ -111,16 +113,35 @@ class UserService extends BaseService
         } else {
             $data['avatar'] = str_replace(IMG_URL, "", $data['avatar']);
         }
+
+        // 验证绑定谷歌验证码
+        if(isset($data['google_code']) && $data['google_code']){
+            $googleKey = $this->model->where(['username'=> $username])->value('google_key');
+            if(empty($googleKey)){
+                return message("谷歌密钥生成失败,请刷新重试", false);
+            }
+
+            if (!GoogleAuthenticator::CheckCode($googleKey,$data['google_code'])){
+                return message("谷歌验证码错误", false);
+            }
+
+            $data['google_bind'] = 1;
+        }
+
         $error = "";
         $result = $this->model->edit($data, $error);
         if (!$result) {
             return message($error, false);
         }
+
         // 删除已存在的用户角色关系数据
         $userRoleService = new UserRoleService();
         $userRoleService->deleteUserRole($result);
         // 插入用户角色关系数据
         $userRoleService->insertUserRole($result, $data['role_ids']);
+
+        ActionLogModel::setTitle("修改管理员账号");
+        ActionLogModel::record();
         return message();
     }
 
@@ -251,4 +272,28 @@ class UserService extends BaseService
         return message("重置密码成功");
     }
 
+    /**
+     * 验证账号
+     * @return array
+     */
+    public function checkAccount()
+    {
+        // 获取参数
+        $param = request()->all();
+        $username = isset($param['username'])? trim($param['username']) : '';
+        if(empty($username)){
+            return message('请填写登录账号', false);
+        }
+
+        $cacheKey = "caches:user:checkAccount_".md5($username);
+        if($data = RedisService::get($cacheKey)){
+            return message(1010, true, $data);
+        }
+
+        $data = $this->model->where(['username'=>$username])->value('google_bind');
+        if($data){
+            RedisService::set($cacheKey, $data, rand(5, 10));
+        }
+        return message(1010, true, $data);
+    }
 }

+ 1 - 0
composer.json

@@ -13,6 +13,7 @@
         "ext-openssl": "*",
         "cboden/ratchet": "^0.4.4",
         "cregis/cregis-sdk-php": "^1.0",
+        "earnp/laravel-google-authenticator": "dev-master",
         "fideloper/proxy": "^4.4",
         "fruitcake/laravel-cors": "^2.0",
         "gregwar/captcha": "^1.1",

+ 49 - 2
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "cb3249911c5cc0a48033a75bada23cf6",
+    "content-hash": "cd6c2af2f41ad9a38dc163d855ad8944",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -980,6 +980,51 @@
             "time": "2023-08-10T19:36:49+00:00"
         },
         {
+            "name": "earnp/laravel-google-authenticator",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/lusongcn/laravel-google-authenticator.git",
+                "reference": "dfecec37b8c3961eb124888b93539d7b0e05b00d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/lusongcn/laravel-google-authenticator/zipball/dfecec37b8c3961eb124888b93539d7b0e05b00d",
+                "reference": "dfecec37b8c3961eb124888b93539d7b0e05b00d",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "default-branch": true,
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Earnp\\GoogleAuthenticator\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "lusong",
+                    "email": "714628712@qq.com",
+                    "homepage": "https://phpartisan.cn"
+                }
+            ],
+            "description": "Laravel 5 GoogleAuthenticator Package",
+            "support": {
+                "issues": "https://github.com/lusongcn/laravel-google-authenticator/issues",
+                "source": "https://github.com/lusongcn/laravel-google-authenticator/tree/master"
+            },
+            "time": "2020-09-10T15:15:35+00:00"
+        },
+        {
             "name": "egulias/email-validator",
             "version": "2.1.25",
             "source": {
@@ -9853,7 +9898,9 @@
     ],
     "aliases": [],
     "minimum-stability": "dev",
-    "stability-flags": [],
+    "stability-flags": {
+        "earnp/laravel-google-authenticator": 20
+    },
     "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {

+ 8 - 0
config/google.php

@@ -0,0 +1,8 @@
+<?php
+/**
+ * 谷歌验证码配置
+ */
+return [
+    "authenticatorname" => "SBT",
+    "authenticatorurl" => "",
+];

+ 1 - 0
routes/web.php

@@ -69,6 +69,7 @@ Route::post('/user/edit', [UserController::class, 'edit']);
 Route::post('/user/delete', [UserController::class, 'delete']);
 Route::post('/user/status', [UserController::class, 'status']);
 Route::post('/user/resetPwd', [UserController::class, 'resetPwd']);
+Route::post('/user/checkAccount', [UserController::class, 'checkAccount']);
 
 // 角色管理
 Route::get('/role/index', [RoleController::class, 'index']);

+ 30 - 1
vendor/composer/autoload_classmap.php

@@ -6,21 +6,26 @@ $vendorDir = dirname(__DIR__);
 $baseDir = dirname($vendorDir);
 
 return array(
-    'App\\Console\\Commands\\SocketServer' => $baseDir . '/app/Console/Commands/SocketServer.php',
     'App\\Console\\Commands\\SwooleTask' => $baseDir . '/app/Console/Commands/SwooleTask.php',
+    'App\\Console\\Commands\\WalletTask' => $baseDir . '/app/Console/Commands/WalletTask.php',
     'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
     'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
     'App\\Exports\\Export' => $baseDir . '/app/Exports/Export.php',
     'App\\Helpers\\Jwt' => $baseDir . '/app/Helpers/Jwt.php',
+    'App\\Http\\Controllers\\Admin\\AccountLogController' => $baseDir . '/app/Http/Controllers/Admin/AccountLogController.php',
     'App\\Http\\Controllers\\Admin\\ActionLogController' => $baseDir . '/app/Http/Controllers/Admin/ActionLogController.php',
     'App\\Http\\Controllers\\Admin\\AdController' => $baseDir . '/app/Http/Controllers/Admin/AdController.php',
     'App\\Http\\Controllers\\Admin\\AdSortController' => $baseDir . '/app/Http/Controllers/Admin/AdSortController.php',
+    'App\\Http\\Controllers\\Admin\\ArticleController' => $baseDir . '/app/Http/Controllers/Admin/ArticleController.php',
     'App\\Http\\Controllers\\Admin\\Backend' => $baseDir . '/app/Http/Controllers/Admin/Backend.php',
+    'App\\Http\\Controllers\\Admin\\BalanceLogController' => $baseDir . '/app/Http/Controllers/Admin/BalanceLogController.php',
     'App\\Http\\Controllers\\Admin\\CityController' => $baseDir . '/app/Http/Controllers/Admin/CityController.php',
     'App\\Http\\Controllers\\Admin\\ConfigController' => $baseDir . '/app/Http/Controllers/Admin/ConfigController.php',
     'App\\Http\\Controllers\\Admin\\ConfigGroupController' => $baseDir . '/app/Http/Controllers/Admin/ConfigGroupController.php',
     'App\\Http\\Controllers\\Admin\\Controller' => $baseDir . '/app/Http/Controllers/Admin/Controller.php',
+    'App\\Http\\Controllers\\Admin\\FinanceController' => $baseDir . '/app/Http/Controllers/Admin/FinanceController.php',
     'App\\Http\\Controllers\\Admin\\IndexController' => $baseDir . '/app/Http/Controllers/Admin/IndexController.php',
+    'App\\Http\\Controllers\\Admin\\InstitutionalController' => $baseDir . '/app/Http/Controllers/Admin/InstitutionalController.php',
     'App\\Http\\Controllers\\Admin\\LayoutController' => $baseDir . '/app/Http/Controllers/Admin/LayoutController.php',
     'App\\Http\\Controllers\\Admin\\LoginController' => $baseDir . '/app/Http/Controllers/Admin/LoginController.php',
     'App\\Http\\Controllers\\Admin\\LoginLogController' => $baseDir . '/app/Http/Controllers/Admin/LoginLogController.php',
@@ -28,15 +33,22 @@ return array(
     'App\\Http\\Controllers\\Admin\\MemberLevelController' => $baseDir . '/app/Http/Controllers/Admin/MemberLevelController.php',
     'App\\Http\\Controllers\\Admin\\MenuController' => $baseDir . '/app/Http/Controllers/Admin/MenuController.php',
     'App\\Http\\Controllers\\Admin\\NoticeController' => $baseDir . '/app/Http/Controllers/Admin/NoticeController.php',
+    'App\\Http\\Controllers\\Admin\\PledgeOrderController' => $baseDir . '/app/Http/Controllers/Admin/PledgeOrderController.php',
     'App\\Http\\Controllers\\Admin\\PositionController' => $baseDir . '/app/Http/Controllers/Admin/PositionController.php',
+    'App\\Http\\Controllers\\Admin\\PriceLogController' => $baseDir . '/app/Http/Controllers/Admin/PriceLogController.php',
+    'App\\Http\\Controllers\\Admin\\RechargeController' => $baseDir . '/app/Http/Controllers/Admin/RechargeController.php',
     'App\\Http\\Controllers\\Admin\\RoleController' => $baseDir . '/app/Http/Controllers/Admin/RoleController.php',
     'App\\Http\\Controllers\\Admin\\UploadController' => $baseDir . '/app/Http/Controllers/Admin/UploadController.php',
     'App\\Http\\Controllers\\Admin\\UserController' => $baseDir . '/app/Http/Controllers/Admin/UserController.php',
+    'App\\Http\\Controllers\\Admin\\WalletController' => $baseDir . '/app/Http/Controllers/Admin/WalletController.php',
+    'App\\Http\\Controllers\\Admin\\WalletLogController' => $baseDir . '/app/Http/Controllers/Admin/WalletLogController.php',
+    'App\\Http\\Controllers\\Admin\\WithdrawController' => $baseDir . '/app/Http/Controllers/Admin/WithdrawController.php',
     'App\\Http\\Controllers\\Api\\LangController' => $baseDir . '/app/Http/Controllers/Api/LangController.php',
     'App\\Http\\Controllers\\Api\\LoginController' => $baseDir . '/app/Http/Controllers/Api/LoginController.php',
     'App\\Http\\Controllers\\Api\\TestController' => $baseDir . '/app/Http/Controllers/Api/TestController.php',
     'App\\Http\\Controllers\\Api\\UploadController' => $baseDir . '/app/Http/Controllers/Api/UploadController.php',
     'App\\Http\\Controllers\\Api\\v1\\AccountController' => $baseDir . '/app/Http/Controllers/Api/v1/AccountController.php',
+    'App\\Http\\Controllers\\Api\\v1\\ArticleController' => $baseDir . '/app/Http/Controllers/Api/v1/ArticleController.php',
     'App\\Http\\Controllers\\Api\\v1\\IndexController' => $baseDir . '/app/Http/Controllers/Api/v1/IndexController.php',
     'App\\Http\\Controllers\\Api\\v1\\MemberController' => $baseDir . '/app/Http/Controllers/Api/v1/MemberController.php',
     'App\\Http\\Controllers\\Api\\v1\\NotifyController' => $baseDir . '/app/Http/Controllers/Api/v1/NotifyController.php',
@@ -59,6 +71,7 @@ return array(
     'App\\Http\\Middleware\\UserLogin' => $baseDir . '/app/Http/Middleware/UserLogin.php',
     'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php',
     'App\\Http\\Middleware\\WebLogin' => $baseDir . '/app/Http/Middleware/WebLogin.php',
+    'App\\Http\\Validator\\AccountValidator' => $baseDir . '/app/Http/Validator/AccountValidator.php',
     'App\\Http\\Validator\\BaseValidator' => $baseDir . '/app/Http/Validator/BaseValidator.php',
     'App\\Http\\Validator\\MemberValidator' => $baseDir . '/app/Http/Validator/MemberValidator.php',
     'App\\Models\\AccountLogModel' => $baseDir . '/app/Models/AccountLogModel.php',
@@ -99,27 +112,39 @@ return array(
     'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
     'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
     'App\\Services\\Api\\AccountLogService' => $baseDir . '/app/Services/Api/AccountLogService.php',
+    'App\\Services\\Api\\ArticleService' => $baseDir . '/app/Services/Api/ArticleService.php',
     'App\\Services\\Api\\BalanceLogService' => $baseDir . '/app/Services/Api/BalanceLogService.php',
+    'App\\Services\\Api\\FinanceService' => $baseDir . '/app/Services/Api/FinanceService.php',
     'App\\Services\\Api\\MemberService' => $baseDir . '/app/Services/Api/MemberService.php',
     'App\\Services\\Api\\PledgeOrderService' => $baseDir . '/app/Services/Api/PledgeOrderService.php',
     'App\\Services\\Api\\PriceLogService' => $baseDir . '/app/Services/Api/PriceLogService.php',
+    'App\\Services\\Api\\TeamService' => $baseDir . '/app/Services/Api/TeamService.php',
     'App\\Services\\BaseService' => $baseDir . '/app/Services/BaseService.php',
+    'App\\Services\\Common\\AccountLogService' => $baseDir . '/app/Services/Common/AccountLogService.php',
     'App\\Services\\Common\\ActionLogService' => $baseDir . '/app/Services/Common/ActionLogService.php',
     'App\\Services\\Common\\AdService' => $baseDir . '/app/Services/Common/AdService.php',
     'App\\Services\\Common\\AdSortService' => $baseDir . '/app/Services/Common/AdSortService.php',
+    'App\\Services\\Common\\ArticleService' => $baseDir . '/app/Services/Common/ArticleService.php',
+    'App\\Services\\Common\\BalanceLogService' => $baseDir . '/app/Services/Common/BalanceLogService.php',
     'App\\Services\\Common\\CityService' => $baseDir . '/app/Services/Common/CityService.php',
     'App\\Services\\Common\\ConfigGroupService' => $baseDir . '/app/Services/Common/ConfigGroupService.php',
     'App\\Services\\Common\\ConfigService' => $baseDir . '/app/Services/Common/ConfigService.php',
+    'App\\Services\\Common\\FinanceService' => $baseDir . '/app/Services/Common/FinanceService.php',
+    'App\\Services\\Common\\InstitutionalService' => $baseDir . '/app/Services/Common/InstitutionalService.php',
     'App\\Services\\Common\\LoginLogService' => $baseDir . '/app/Services/Common/LoginLogService.php',
     'App\\Services\\Common\\LoginService' => $baseDir . '/app/Services/Common/LoginService.php',
     'App\\Services\\Common\\MemberLevelService' => $baseDir . '/app/Services/Common/MemberLevelService.php',
     'App\\Services\\Common\\MemberService' => $baseDir . '/app/Services/Common/MemberService.php',
     'App\\Services\\Common\\MenuService' => $baseDir . '/app/Services/Common/MenuService.php',
     'App\\Services\\Common\\NoticeService' => $baseDir . '/app/Services/Common/NoticeService.php',
+    'App\\Services\\Common\\PledgeOrderService' => $baseDir . '/app/Services/Common/PledgeOrderService.php',
+    'App\\Services\\Common\\PriceLogService' => $baseDir . '/app/Services/Common/PriceLogService.php',
     'App\\Services\\Common\\RoleMenuService' => $baseDir . '/app/Services/Common/RoleMenuService.php',
     'App\\Services\\Common\\RoleService' => $baseDir . '/app/Services/Common/RoleService.php',
     'App\\Services\\Common\\UserRoleService' => $baseDir . '/app/Services/Common/UserRoleService.php',
     'App\\Services\\Common\\UserService' => $baseDir . '/app/Services/Common/UserService.php',
+    'App\\Services\\Common\\WalletLogService' => $baseDir . '/app/Services/Common/WalletLogService.php',
+    'App\\Services\\Common\\WalletService' => $baseDir . '/app/Services/Common/WalletService.php',
     'App\\Services\\ConfigGroupService' => $baseDir . '/app/Services/ConfigGroupService.php',
     'App\\Services\\ConfigService' => $baseDir . '/app/Services/ConfigService.php',
     'App\\Services\\CregisPayService' => $baseDir . '/app/Services/CregisPayService.php',
@@ -438,6 +463,10 @@ return array(
     'Dotenv\\Util\\Regex' => $vendorDir . '/vlucas/phpdotenv/src/Util/Regex.php',
     'Dotenv\\Util\\Str' => $vendorDir . '/vlucas/phpdotenv/src/Util/Str.php',
     'Dotenv\\Validator' => $vendorDir . '/vlucas/phpdotenv/src/Validator.php',
+    'Earnp\\GoogleAuthenticator\\Facades\\GoogleAuthenticator' => $vendorDir . '/earnp/laravel-google-authenticator/src/Facades/GoogleAuthenticator.php',
+    'Earnp\\GoogleAuthenticator\\GoogleAuthenticator' => $vendorDir . '/earnp/laravel-google-authenticator/src/GoogleAuthenticator.php',
+    'Earnp\\GoogleAuthenticator\\GoogleAuthenticatorServiceprovider' => $vendorDir . '/earnp/laravel-google-authenticator/src/GoogleAuthenticatorServiceprovider.php',
+    'Earnp\\GoogleAuthenticator\\Librarys\\GoogleAuthenticator' => $vendorDir . '/earnp/laravel-google-authenticator/src/Librarys/GoogleAuthenticator.php',
     'Egulias\\EmailValidator\\EmailLexer' => $vendorDir . '/egulias/email-validator/src/EmailLexer.php',
     'Egulias\\EmailValidator\\EmailParser' => $vendorDir . '/egulias/email-validator/src/EmailParser.php',
     'Egulias\\EmailValidator\\EmailValidator' => $vendorDir . '/egulias/email-validator/src/EmailValidator.php',

+ 1 - 0
vendor/composer/autoload_psr4.php

@@ -95,6 +95,7 @@ return array(
     'Facade\\FlareClient\\' => array($vendorDir . '/facade/flare-client-php/src'),
     'Evenement\\' => array($vendorDir . '/evenement/evenement/src'),
     'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'),
+    'Earnp\\GoogleAuthenticator\\' => array($vendorDir . '/earnp/laravel-google-authenticator/src'),
     'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
     'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
     'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'),

+ 35 - 1
vendor/composer/autoload_static.php

@@ -190,6 +190,7 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
         array (
             'Evenement\\' => 10,
             'Egulias\\EmailValidator\\' => 23,
+            'Earnp\\GoogleAuthenticator\\' => 26,
         ),
         'D' => 
         array (
@@ -585,6 +586,10 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
         array (
             0 => __DIR__ . '/..' . '/egulias/email-validator/src',
         ),
+        'Earnp\\GoogleAuthenticator\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/earnp/laravel-google-authenticator/src',
+        ),
         'Dotenv\\' => 
         array (
             0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
@@ -689,21 +694,26 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
     );
 
     public static $classMap = array (
-        'App\\Console\\Commands\\SocketServer' => __DIR__ . '/../..' . '/app/Console/Commands/SocketServer.php',
         'App\\Console\\Commands\\SwooleTask' => __DIR__ . '/../..' . '/app/Console/Commands/SwooleTask.php',
+        'App\\Console\\Commands\\WalletTask' => __DIR__ . '/../..' . '/app/Console/Commands/WalletTask.php',
         'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
         'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
         'App\\Exports\\Export' => __DIR__ . '/../..' . '/app/Exports/Export.php',
         'App\\Helpers\\Jwt' => __DIR__ . '/../..' . '/app/Helpers/Jwt.php',
+        'App\\Http\\Controllers\\Admin\\AccountLogController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/AccountLogController.php',
         'App\\Http\\Controllers\\Admin\\ActionLogController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/ActionLogController.php',
         'App\\Http\\Controllers\\Admin\\AdController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/AdController.php',
         'App\\Http\\Controllers\\Admin\\AdSortController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/AdSortController.php',
+        'App\\Http\\Controllers\\Admin\\ArticleController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/ArticleController.php',
         'App\\Http\\Controllers\\Admin\\Backend' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/Backend.php',
+        'App\\Http\\Controllers\\Admin\\BalanceLogController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/BalanceLogController.php',
         'App\\Http\\Controllers\\Admin\\CityController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/CityController.php',
         'App\\Http\\Controllers\\Admin\\ConfigController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/ConfigController.php',
         'App\\Http\\Controllers\\Admin\\ConfigGroupController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/ConfigGroupController.php',
         'App\\Http\\Controllers\\Admin\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/Controller.php',
+        'App\\Http\\Controllers\\Admin\\FinanceController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/FinanceController.php',
         'App\\Http\\Controllers\\Admin\\IndexController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/IndexController.php',
+        'App\\Http\\Controllers\\Admin\\InstitutionalController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/InstitutionalController.php',
         'App\\Http\\Controllers\\Admin\\LayoutController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/LayoutController.php',
         'App\\Http\\Controllers\\Admin\\LoginController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/LoginController.php',
         'App\\Http\\Controllers\\Admin\\LoginLogController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/LoginLogController.php',
@@ -711,15 +721,22 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
         'App\\Http\\Controllers\\Admin\\MemberLevelController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/MemberLevelController.php',
         'App\\Http\\Controllers\\Admin\\MenuController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/MenuController.php',
         'App\\Http\\Controllers\\Admin\\NoticeController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/NoticeController.php',
+        'App\\Http\\Controllers\\Admin\\PledgeOrderController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/PledgeOrderController.php',
         'App\\Http\\Controllers\\Admin\\PositionController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/PositionController.php',
+        'App\\Http\\Controllers\\Admin\\PriceLogController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/PriceLogController.php',
+        'App\\Http\\Controllers\\Admin\\RechargeController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/RechargeController.php',
         'App\\Http\\Controllers\\Admin\\RoleController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/RoleController.php',
         'App\\Http\\Controllers\\Admin\\UploadController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/UploadController.php',
         'App\\Http\\Controllers\\Admin\\UserController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/UserController.php',
+        'App\\Http\\Controllers\\Admin\\WalletController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/WalletController.php',
+        'App\\Http\\Controllers\\Admin\\WalletLogController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/WalletLogController.php',
+        'App\\Http\\Controllers\\Admin\\WithdrawController' => __DIR__ . '/../..' . '/app/Http/Controllers/Admin/WithdrawController.php',
         'App\\Http\\Controllers\\Api\\LangController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/LangController.php',
         'App\\Http\\Controllers\\Api\\LoginController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/LoginController.php',
         'App\\Http\\Controllers\\Api\\TestController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/TestController.php',
         'App\\Http\\Controllers\\Api\\UploadController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/UploadController.php',
         'App\\Http\\Controllers\\Api\\v1\\AccountController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/v1/AccountController.php',
+        'App\\Http\\Controllers\\Api\\v1\\ArticleController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/v1/ArticleController.php',
         'App\\Http\\Controllers\\Api\\v1\\IndexController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/v1/IndexController.php',
         'App\\Http\\Controllers\\Api\\v1\\MemberController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/v1/MemberController.php',
         'App\\Http\\Controllers\\Api\\v1\\NotifyController' => __DIR__ . '/../..' . '/app/Http/Controllers/Api/v1/NotifyController.php',
@@ -742,6 +759,7 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
         'App\\Http\\Middleware\\UserLogin' => __DIR__ . '/../..' . '/app/Http/Middleware/UserLogin.php',
         'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php',
         'App\\Http\\Middleware\\WebLogin' => __DIR__ . '/../..' . '/app/Http/Middleware/WebLogin.php',
+        'App\\Http\\Validator\\AccountValidator' => __DIR__ . '/../..' . '/app/Http/Validator/AccountValidator.php',
         'App\\Http\\Validator\\BaseValidator' => __DIR__ . '/../..' . '/app/Http/Validator/BaseValidator.php',
         'App\\Http\\Validator\\MemberValidator' => __DIR__ . '/../..' . '/app/Http/Validator/MemberValidator.php',
         'App\\Models\\AccountLogModel' => __DIR__ . '/../..' . '/app/Models/AccountLogModel.php',
@@ -782,27 +800,39 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
         'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
         'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
         'App\\Services\\Api\\AccountLogService' => __DIR__ . '/../..' . '/app/Services/Api/AccountLogService.php',
+        'App\\Services\\Api\\ArticleService' => __DIR__ . '/../..' . '/app/Services/Api/ArticleService.php',
         'App\\Services\\Api\\BalanceLogService' => __DIR__ . '/../..' . '/app/Services/Api/BalanceLogService.php',
+        'App\\Services\\Api\\FinanceService' => __DIR__ . '/../..' . '/app/Services/Api/FinanceService.php',
         'App\\Services\\Api\\MemberService' => __DIR__ . '/../..' . '/app/Services/Api/MemberService.php',
         'App\\Services\\Api\\PledgeOrderService' => __DIR__ . '/../..' . '/app/Services/Api/PledgeOrderService.php',
         'App\\Services\\Api\\PriceLogService' => __DIR__ . '/../..' . '/app/Services/Api/PriceLogService.php',
+        'App\\Services\\Api\\TeamService' => __DIR__ . '/../..' . '/app/Services/Api/TeamService.php',
         'App\\Services\\BaseService' => __DIR__ . '/../..' . '/app/Services/BaseService.php',
+        'App\\Services\\Common\\AccountLogService' => __DIR__ . '/../..' . '/app/Services/Common/AccountLogService.php',
         'App\\Services\\Common\\ActionLogService' => __DIR__ . '/../..' . '/app/Services/Common/ActionLogService.php',
         'App\\Services\\Common\\AdService' => __DIR__ . '/../..' . '/app/Services/Common/AdService.php',
         'App\\Services\\Common\\AdSortService' => __DIR__ . '/../..' . '/app/Services/Common/AdSortService.php',
+        'App\\Services\\Common\\ArticleService' => __DIR__ . '/../..' . '/app/Services/Common/ArticleService.php',
+        'App\\Services\\Common\\BalanceLogService' => __DIR__ . '/../..' . '/app/Services/Common/BalanceLogService.php',
         'App\\Services\\Common\\CityService' => __DIR__ . '/../..' . '/app/Services/Common/CityService.php',
         'App\\Services\\Common\\ConfigGroupService' => __DIR__ . '/../..' . '/app/Services/Common/ConfigGroupService.php',
         'App\\Services\\Common\\ConfigService' => __DIR__ . '/../..' . '/app/Services/Common/ConfigService.php',
+        'App\\Services\\Common\\FinanceService' => __DIR__ . '/../..' . '/app/Services/Common/FinanceService.php',
+        'App\\Services\\Common\\InstitutionalService' => __DIR__ . '/../..' . '/app/Services/Common/InstitutionalService.php',
         'App\\Services\\Common\\LoginLogService' => __DIR__ . '/../..' . '/app/Services/Common/LoginLogService.php',
         'App\\Services\\Common\\LoginService' => __DIR__ . '/../..' . '/app/Services/Common/LoginService.php',
         'App\\Services\\Common\\MemberLevelService' => __DIR__ . '/../..' . '/app/Services/Common/MemberLevelService.php',
         'App\\Services\\Common\\MemberService' => __DIR__ . '/../..' . '/app/Services/Common/MemberService.php',
         'App\\Services\\Common\\MenuService' => __DIR__ . '/../..' . '/app/Services/Common/MenuService.php',
         'App\\Services\\Common\\NoticeService' => __DIR__ . '/../..' . '/app/Services/Common/NoticeService.php',
+        'App\\Services\\Common\\PledgeOrderService' => __DIR__ . '/../..' . '/app/Services/Common/PledgeOrderService.php',
+        'App\\Services\\Common\\PriceLogService' => __DIR__ . '/../..' . '/app/Services/Common/PriceLogService.php',
         'App\\Services\\Common\\RoleMenuService' => __DIR__ . '/../..' . '/app/Services/Common/RoleMenuService.php',
         'App\\Services\\Common\\RoleService' => __DIR__ . '/../..' . '/app/Services/Common/RoleService.php',
         'App\\Services\\Common\\UserRoleService' => __DIR__ . '/../..' . '/app/Services/Common/UserRoleService.php',
         'App\\Services\\Common\\UserService' => __DIR__ . '/../..' . '/app/Services/Common/UserService.php',
+        'App\\Services\\Common\\WalletLogService' => __DIR__ . '/../..' . '/app/Services/Common/WalletLogService.php',
+        'App\\Services\\Common\\WalletService' => __DIR__ . '/../..' . '/app/Services/Common/WalletService.php',
         'App\\Services\\ConfigGroupService' => __DIR__ . '/../..' . '/app/Services/ConfigGroupService.php',
         'App\\Services\\ConfigService' => __DIR__ . '/../..' . '/app/Services/ConfigService.php',
         'App\\Services\\CregisPayService' => __DIR__ . '/../..' . '/app/Services/CregisPayService.php',
@@ -1121,6 +1151,10 @@ class ComposerStaticInit235680d5acdc65329fb3070b347a2165
         'Dotenv\\Util\\Regex' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Util/Regex.php',
         'Dotenv\\Util\\Str' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Util/Str.php',
         'Dotenv\\Validator' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Validator.php',
+        'Earnp\\GoogleAuthenticator\\Facades\\GoogleAuthenticator' => __DIR__ . '/..' . '/earnp/laravel-google-authenticator/src/Facades/GoogleAuthenticator.php',
+        'Earnp\\GoogleAuthenticator\\GoogleAuthenticator' => __DIR__ . '/..' . '/earnp/laravel-google-authenticator/src/GoogleAuthenticator.php',
+        'Earnp\\GoogleAuthenticator\\GoogleAuthenticatorServiceprovider' => __DIR__ . '/..' . '/earnp/laravel-google-authenticator/src/GoogleAuthenticatorServiceprovider.php',
+        'Earnp\\GoogleAuthenticator\\Librarys\\GoogleAuthenticator' => __DIR__ . '/..' . '/earnp/laravel-google-authenticator/src/Librarys/GoogleAuthenticator.php',
         'Egulias\\EmailValidator\\EmailLexer' => __DIR__ . '/..' . '/egulias/email-validator/src/EmailLexer.php',
         'Egulias\\EmailValidator\\EmailParser' => __DIR__ . '/..' . '/egulias/email-validator/src/EmailParser.php',
         'Egulias\\EmailValidator\\EmailValidator' => __DIR__ . '/..' . '/egulias/email-validator/src/EmailValidator.php',

+ 48 - 0
vendor/composer/installed.json

@@ -1089,6 +1089,54 @@
             "install-path": "../dragonmantank/cron-expression"
         },
         {
+            "name": "earnp/laravel-google-authenticator",
+            "version": "dev-master",
+            "version_normalized": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/lusongcn/laravel-google-authenticator.git",
+                "reference": "dfecec37b8c3961eb124888b93539d7b0e05b00d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/lusongcn/laravel-google-authenticator/zipball/dfecec37b8c3961eb124888b93539d7b0e05b00d",
+                "reference": "dfecec37b8c3961eb124888b93539d7b0e05b00d",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "time": "2020-09-10T15:15:35+00:00",
+            "default-branch": true,
+            "type": "library",
+            "installation-source": "dist",
+            "autoload": {
+                "psr-4": {
+                    "Earnp\\GoogleAuthenticator\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "lusong",
+                    "email": "714628712@qq.com",
+                    "homepage": "https://phpartisan.cn"
+                }
+            ],
+            "description": "Laravel 5 GoogleAuthenticator Package",
+            "support": {
+                "issues": "https://github.com/lusongcn/laravel-google-authenticator/issues",
+                "source": "https://github.com/lusongcn/laravel-google-authenticator/tree/master"
+            },
+            "install-path": "../earnp/laravel-google-authenticator"
+        },
+        {
             "name": "egulias/email-validator",
             "version": "2.1.25",
             "version_normalized": "2.1.25.0",

+ 13 - 2
vendor/composer/installed.php

@@ -3,7 +3,7 @@
         'name' => 'laravel/laravel',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => '1c8133629eb9d3b622a242051fb06135775058e2',
+        'reference' => '313bd5de57e3d1742c48d927f0844f63eb468f7e',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -157,6 +157,17 @@
             'aliases' => array(),
             'dev_requirement' => false,
         ),
+        'earnp/laravel-google-authenticator' => array(
+            'pretty_version' => 'dev-master',
+            'version' => 'dev-master',
+            'reference' => 'dfecec37b8c3961eb124888b93539d7b0e05b00d',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../earnp/laravel-google-authenticator',
+            'aliases' => array(
+                0 => '9999999-dev',
+            ),
+            'dev_requirement' => false,
+        ),
         'egulias/email-validator' => array(
             'pretty_version' => '2.1.25',
             'version' => '2.1.25.0',
@@ -541,7 +552,7 @@
         'laravel/laravel' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => '1c8133629eb9d3b622a242051fb06135775058e2',
+            'reference' => '313bd5de57e3d1742c48d927f0844f63eb468f7e',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),

+ 3 - 0
vendor/earnp/laravel-google-authenticator/.gitignore

@@ -0,0 +1,3 @@
+.env
+.idea
+.DS_Store

+ 19 - 0
vendor/earnp/laravel-google-authenticator/composer.json

@@ -0,0 +1,19 @@
+{
+    "name": "earnp/laravel-google-authenticator",
+    "description": "Laravel 5 GoogleAuthenticator Package",
+    "authors": [
+        {
+            "name": "lusong",
+            "email": "714628712@qq.com",
+            "homepage": "https://phpartisan.cn"
+        }
+    ],
+    "license": "MIT",
+    "minimum-stability": "dev",
+    "require": {},
+    "autoload": {
+      "psr-4": {
+        "Earnp\\GoogleAuthenticator\\": "src/"
+      }
+    }
+}

+ 13 - 0
vendor/earnp/laravel-google-authenticator/src/Facades/GoogleAuthenticator.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace Earnp\GoogleAuthenticator\Facades;
+
+use Illuminate\Support\Facades\Facade;
+
+class GoogleAuthenticator extends Facade
+{
+    protected static function getFacadeAccessor()
+    {
+        return 'GoogleAuthenticator';
+    }
+}

+ 34 - 0
vendor/earnp/laravel-google-authenticator/src/GoogleAuthenticator.php

@@ -0,0 +1,34 @@
+<?php 
+namespace Earnp\GoogleAuthenticator;
+
+use App\Http\Controllers\Controller;
+use Illuminate\Support\Facades\Config;
+use Earnp\GoogleAuthenticator\Librarys\GoogleAuthenticator as GoogleSecretAuthenticator;
+
+class GoogleAuthenticator
+{
+    /**
+     * Show the application welcome screen to the user.
+     *
+     * @return Response
+     */
+
+    public static function CheckCode($secret,$oneCode)
+    {
+        $google = new GoogleSecretAuthenticator();
+        $checkResult = $google->verifyCode($secret,$oneCode, 2);//对传入的参数进行校验
+        if ($checkResult) return true;//校验成功
+        return false;//校验失败
+        
+    }
+
+    public static function CreateSecret()
+    {
+        $google = new GoogleSecretAuthenticator();
+        $secret = $google->createSecret();//创建一个Secret
+        $qrCodeUrl="otpauth://totp/".config("google.authenticatorname")."?secret=".$secret;//二维码中填充的内容
+        $googlesecret = array('secret' =>$secret ,'codeurl'=>$qrCodeUrl);
+        return $googlesecret;
+    }
+
+}

+ 47 - 0
vendor/earnp/laravel-google-authenticator/src/GoogleAuthenticatorServiceprovider.php

@@ -0,0 +1,47 @@
+<?php 
+namespace Earnp\GoogleAuthenticator;
+
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Routing\Router;
+
+class GoogleAuthenticatorServiceprovider extends ServiceProvider
+{
+    /**
+     * Indicates if loading of the provider is deferred.
+     *
+     * @var bool
+     */
+    protected $defer = false;
+    public function boot()
+    {
+        // this for conig
+        $this->publishes([
+            __DIR__.'/config/google.php' => config_path('google.php'),
+        ]);
+
+        $this->publishes([
+            __DIR__.'/images/google' => public_path('images/google'),
+        ], 'public');
+
+        $this->loadViewsFrom(__DIR__.'/views', 'google');
+
+        $this->publishes([
+            __DIR__.'/views' => resource_path('views/login/google'),
+        ]);
+    }
+
+    /**
+     * Define the routes for the application.
+     *
+     * @param \Illuminate\Routing\Router $router
+     * @return void
+     */
+
+
+    public function register()
+    {
+        $this->app->bind('GoogleAuthenticator',function($app){
+            return new GoogleAuthenticator();
+        });
+    }
+}

+ 211 - 0
vendor/earnp/laravel-google-authenticator/src/Librarys/GoogleAuthenticator.php

@@ -0,0 +1,211 @@
+<?php
+
+/**
+ * PHP Class for handling Google Authenticator 2-factor authentication
+ *
+ * @author Michael Kliewe
+ * @copyright 2012 Michael Kliewe
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @link http://www.phpgangsta.de/
+ */
+
+namespace Earnp\GoogleAuthenticator\Librarys;
+
+class GoogleAuthenticator
+{
+    protected $_codeLength = 6;
+
+    /**
+     * Create new secret.
+     * 16 characters, randomly chosen from the allowed base32 characters.
+     *
+     * @param int $secretLength
+     * @return string
+     */
+    public function createSecret($secretLength = 16)
+    {
+        $validChars = $this->_getBase32LookupTable();
+        unset($validChars[32]);
+
+        $secret = '';
+        for ($i = 0; $i < $secretLength; $i++) {
+            $secret .= $validChars[array_rand($validChars)];
+        }
+        return $secret;
+    }
+
+    /**
+     * Calculate the code, with given secret and point in time
+     *
+     * @param string $secret
+     * @param int|null $timeSlice
+     * @return string
+     */
+    public function getCode($secret, $timeSlice = null)
+    {
+        if ($timeSlice === null) {
+			date_default_timezone_set('PRC');
+            $timeSlice = floor(time() / 30);
+        }
+
+        $secretkey = $this->_base32Decode($secret);
+
+        // Pack time into binary string
+        $time = chr(0).chr(0).chr(0).chr(0).pack('N*', $timeSlice);
+        // Hash it with users secret key
+        $hm = hash_hmac('SHA1', $time, $secretkey, true);
+        // Use last nipple of result as index/offset
+        $offset = ord(substr($hm, -1)) & 0x0F;
+        // grab 4 bytes of the result
+        $hashpart = substr($hm, $offset, 4);
+
+        // Unpak binary value
+        $value = unpack('N', $hashpart);
+        $value = $value[1];
+        // Only 32 bits
+        $value = $value & 0x7FFFFFFF;
+
+        $modulo = pow(10, $this->_codeLength);
+        return str_pad($value % $modulo, $this->_codeLength, '0', STR_PAD_LEFT);
+    }
+
+    /**
+     * Get QR-Code URL for image, from google charts
+     *
+     * @param string $name
+     * @param string $secret
+     * @param string $title
+     * @return string
+     */
+    public function getQRCodeGoogleUrl($name, $secret, $title = null) {
+        $urlencoded = urlencode('otpauth://totp/'.$name.'?secret='.$secret.'');
+	if(isset($title)) {
+                $urlencoded .= urlencode('&issuer='.urlencode($title));
+        }
+        return $urlencoded;
+    }
+
+    /**
+     * Check if the code is correct. This will accept codes starting from $discrepancy*30sec ago to $discrepancy*30sec from now
+     *
+     * @param string $secret
+     * @param string $code
+     * @param int $discrepancy This is the allowed time drift in 30 second units (8 means 4 minutes before or after)
+     * @param int|null $currentTimeSlice time slice if we want use other that time()
+     * @return bool
+     */
+    public function verifyCode($secret, $code, $discrepancy = 1, $currentTimeSlice = null)
+    {
+        if ($currentTimeSlice === null) {
+            $currentTimeSlice = floor(time() / 30);
+        }
+
+        for ($i = -$discrepancy; $i <= $discrepancy; $i++) {
+            $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);
+            if ($calculatedCode == $code ) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Set the code length, should be >=6
+     *
+     * @param int $length
+     * @return PHPGangsta_GoogleAuthenticator
+     */
+    public function setCodeLength($length)
+    {
+        $this->_codeLength = $length;
+        return $this;
+    }
+
+    /**
+     * Helper class to decode base32
+     *
+     * @param $secret
+     * @return bool|string
+     */
+    protected function _base32Decode($secret)
+    {
+        if (empty($secret)) return '';
+
+        $base32chars = $this->_getBase32LookupTable();
+        $base32charsFlipped = array_flip($base32chars);
+
+        $paddingCharCount = substr_count($secret, $base32chars[32]);
+        $allowedValues = array(6, 4, 3, 1, 0);
+        if (!in_array($paddingCharCount, $allowedValues)) return false;
+        for ($i = 0; $i < 4; $i++){
+            if ($paddingCharCount == $allowedValues[$i] &&
+                substr($secret, -($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])) return false;
+        }
+        $secret = str_replace('=','', $secret);
+        $secret = str_split($secret);
+        $binaryString = "";
+        for ($i = 0; $i < count($secret); $i = $i+8) {
+            $x = "";
+            if (!in_array($secret[$i], $base32chars)) return false;
+            for ($j = 0; $j < 8; $j++) {
+                $x .= str_pad(base_convert(@$base32charsFlipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);
+            }
+            $eightBits = str_split($x, 8);
+            for ($z = 0; $z < count($eightBits); $z++) {
+                $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y:"";
+            }
+        }
+        return $binaryString;
+    }
+
+    /**
+     * Helper class to encode base32
+     *
+     * @param string $secret
+     * @param bool $padding
+     * @return string
+     */
+    protected function _base32Encode($secret, $padding = true)
+    {
+        if (empty($secret)) return '';
+
+        $base32chars = $this->_getBase32LookupTable();
+
+        $secret = str_split($secret);
+        $binaryString = "";
+        for ($i = 0; $i < count($secret); $i++) {
+            $binaryString .= str_pad(base_convert(ord($secret[$i]), 10, 2), 8, '0', STR_PAD_LEFT);
+        }
+        $fiveBitBinaryArray = str_split($binaryString, 5);
+        $base32 = "";
+        $i = 0;
+        while ($i < count($fiveBitBinaryArray)) {
+            $base32 .= $base32chars[base_convert(str_pad($fiveBitBinaryArray[$i], 5, '0'), 2, 10)];
+            $i++;
+        }
+        if ($padding && ($x = strlen($binaryString) % 40) != 0) {
+            if ($x == 8) $base32 .= str_repeat($base32chars[32], 6);
+            elseif ($x == 16) $base32 .= str_repeat($base32chars[32], 4);
+            elseif ($x == 24) $base32 .= str_repeat($base32chars[32], 3);
+            elseif ($x == 32) $base32 .= $base32chars[32];
+        }
+        return $base32;
+    }
+
+    /**
+     * Get array with all 32 characters for decoding from/encoding to base32
+     *
+     * @return array
+     */
+    protected function _getBase32LookupTable()
+    {
+        return array(
+            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', //  7
+            'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15
+            'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23
+            'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31
+            '='  // padding char
+        );
+    }
+}

+ 6 - 0
vendor/earnp/laravel-google-authenticator/src/config/google.php

@@ -0,0 +1,6 @@
+<?php
+    return [
+    	// 中文需要UrlEncode转为utf8编码
+    	"authenticatorname" => "Laravel%e5%ad%a6%e4%b9%a0%e7%bd%91",
+		"authenticatorurl" => "",
+    ];

BIN=BIN
vendor/earnp/laravel-google-authenticator/src/images/google/android.png


BIN=BIN
vendor/earnp/laravel-google-authenticator/src/images/google/authenticator.jpg


BIN=BIN
vendor/earnp/laravel-google-authenticator/src/images/google/bindcard.jpg


BIN=BIN
vendor/earnp/laravel-google-authenticator/src/images/google/ios.png


+ 194 - 0
vendor/earnp/laravel-google-authenticator/src/views/google.blade.php

@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="author" content="phpartisan.cn"/>
+	<title>绑定Google验证码</title>
+	<script type="text/javascript">  
+	    function startTime()  
+	    {  
+	        //获取当前系统日期  
+			var myDate = new Date();
+	        var y=myDate.getFullYear(); //获取当前年份(2位)
+	        var m=myDate.getMonth()+1; //获取当前月份(0-11,0代表1月)
+	        var d=myDate.getDate(); //获取当前日(1-31)
+	        var h=myDate.getHours(); //获取当前小时数(0-23)
+	        var mi=myDate.getMinutes(); //获取当前分钟数(0-59)
+	        var s=myDate.getSeconds(); //获取当前秒数(0-59)
+	        var hmiao=myDate.getMilliseconds(); //获取当前毫秒数(0-999)
+	        //s设置层txt的内容  
+	        document.getElementById('txt').innerHTML=y+"-"+m+"-"+d+" "+h+":"+mi+":"+s;  
+	        //过500毫秒再调用一次  
+	        t=setTimeout('startTime()',500)  
+	        //小于10,加0  
+	        function checkTime(i)  
+	        {  
+	            if(i<10)  
+	               {i="0"+i}  
+	               return i  
+	        }  
+	    }
+	</script>  
+	<style type="text/css">
+		body{
+			background-color:#2E363F;
+			margin:0px;
+			padding:0px;
+		}
+		ul,li{
+			list-style:none;
+			padding:0px;
+			margin:0px;
+		}
+		.container{
+			width:98%;
+			max-width:1000px;
+			min-width:600px;
+			background-color:#FFF;
+			height:1250px;
+			padding: 20px 20px 100px 20px;
+			margin: 30px auto;
+			line-height:25px;
+			font-family:微软雅黑;
+			font-size:15px;
+			color: #666666;
+		}
+		.container span{
+			font-weight:bold;
+			color: #666666;
+			font-size:15px;
+			line-height:35px;
+		}
+		.container h3{
+			font-size:24px;
+			color: #333333;
+		}
+		.container h4{
+			font-size:18px;
+			color: #333333;
+		}
+		.container h5{
+			font-size:15px;
+			color: #333333;
+		}			
+		.discription{
+			width:100%;
+			height:auto;
+			border-bottom:thin dashed #CCC;
+			padding-bottom: 20px;
+			float: left;
+		}
+		.appdownloadcode{
+			width:100%;
+			height:230px;
+			padding-top:20px;
+		}	
+		.appdownloadcode li{
+			width:50%;
+			float:left;
+			text-align:center;
+		}
+		.appdownloadcode img{
+			width:200px;
+			height:200px;
+			margin-left:auto;
+			margin-right:auto;
+		}		
+		.container-form{
+			width:100%;
+			height:230px;
+			padding-top:20px;
+			text-align:center;
+			margin-top: 30px;
+			float: left;
+		}
+		.container-form img{
+			width:250px;
+			height:250px;
+			margin: 0px auto 10px auto;
+			padding:5px;
+			border:thin solid #CCC;
+			border-radius:10px;
+		}	
+		.verificationcode{
+			width:300px;
+			height:35px;
+			outline:none;
+			border:thin solid #CCC;
+			font-family:微软雅黑;
+			font-size:14px;
+			padding-left:20px;
+			margin-top:20px;
+		}	
+		.submit-button{
+			width:150px;
+			height:35px;
+			border-radius: 2px;
+			outline:none;
+			background-color: #0C6;
+			color:#FFF;
+			font-family:微软雅黑;
+			border:none;
+			font-size:15px;
+			margin-top:20px;
+		}	
+		a{
+			color:#09C;
+		}
+		.notice{
+			width: 100%;
+			float: left;
+			color: #FF6666;
+			margin-top: 20px;
+		}				
+	</style>
+</head>
+
+<body onload="startTime()">
+	<div class="container">
+		<div class="discription">
+		    <h3>绑定谷歌验证器</h3>
+		    <h4>使用说明:</h4>
+	    	<p>如果遇到问题,请参考:<a href="https://phpartisan.cn/specials/5" target="_blank">Google Authenticator帮助文档</a></p>
+	    	<h5>步骤一:</h5>
+	    	<p>手机下载安装Google Authenticator。</p>
+	    	<div class="appdownloadcode">
+				<ul>
+					<li>
+						<img src="/images/google/ios.png" width="280" height="280" /><br />Ios扫描下载
+					</li>
+					<li>
+						<img src="/images/google/android.png" width="280" height="280" /><br />安卓扫描下载
+					</li>
+				</ul>
+			</div>
+			<h5>步骤二:</h5>
+			<p>软件安装完成后,选择开始设置-扫描条形码,来扫描本页面的二维码,扫描成功后,您手机里的谷歌验证器会生成一个与您账户对应的六位动态密码,每30秒变化一次。</p>
+			<h5>步骤三:</h5>
+			<p>之后您每次登陆时都需要输入谷歌验证码,无论手机是否连接网络都可以使用。在允许时间内输入有效数字,保证了账户安全。
+			</p>
+		</div>
+
+		<div class="container-form">
+			<p>本页面刷新后二维码会重置,请重新扫描</p>
+			{!! QrCode::encoding('UTF-8')->size(200)->margin(1)->generate($createSecret["codeurl"]); !!}
+			<br />服务器当前时间为:&nbsp;&nbsp;<font id="txt"></font>
+			<br />如果图片无法显示或者无法扫描,请在手机登录器中手动输入:
+			<font color="#FF6666">{{ $createSecret["secret"] }}</font>
+			<form action="{{ empty(Config::get('google.authenticatorurl')) ? URL::current() : Config::get('google.authenticatorurl') }}" method="POST">
+				{!! csrf_field() !!}
+				<input name="onecode" type="text" class="verificationcode" placeholder="请输入扫描后手机显示的6位验证码" value="{{ old('onecode') }}" />
+				@foreach($parameter as $parame)
+				<input type="hidden" name="{{ $parame['name'] }}" value="{{ $parame['value'] }}" />
+				@endforeach
+				<input type="hidden" name="google" value="{{ $createSecret['secret'] }}" />
+				<br />
+				<button class="submit-button">立即绑定</button>
+				@if(Session::has('msg'))
+				   <div class="notice">{{ Session::get('msg') }}</div>
+				@endif
+			</form>
+		</div>
+	</div>
+</body>
+</html>