|
@@ -6,6 +6,7 @@ use App\Enums\Common\Common; |
|
@@ -6,6 +6,7 @@ use App\Enums\Common\Common; |
|
6
|
use App\Models\Manage\Manage;
|
6
|
use App\Models\Manage\Manage;
|
|
7
|
use App\Models\Manage\LoginLog;
|
7
|
use App\Models\Manage\LoginLog;
|
|
8
|
use App\Models\Service\Service;
|
8
|
use App\Models\Service\Service;
|
|
|
|
9
|
+use App\Utils\EncryptUtils;
|
|
9
|
use Illuminate\Support\Facades\Cache;
|
10
|
use Illuminate\Support\Facades\Cache;
|
|
10
|
use Illuminate\Support\Facades\Hash;
|
11
|
use Illuminate\Support\Facades\Hash;
|
|
11
|
|
12
|
|
|
@@ -21,7 +22,7 @@ class LoginLogic extends BaseLogic |
|
@@ -21,7 +22,7 @@ class LoginLogic extends BaseLogic |
|
21
|
public function __construct()
|
22
|
public function __construct()
|
|
22
|
{
|
23
|
{
|
|
23
|
parent::__construct();
|
24
|
parent::__construct();
|
|
24
|
-
|
25
|
+ $this->param = $this->requestAll;
|
|
25
|
$this->model = new Manage();
|
26
|
$this->model = new Manage();
|
|
26
|
}
|
27
|
}
|
|
27
|
|
28
|
|
|
@@ -84,7 +85,14 @@ class LoginLogic extends BaseLogic |
|
@@ -84,7 +85,14 @@ class LoginLogic extends BaseLogic |
|
84
|
if($info === false){
|
85
|
if($info === false){
|
|
85
|
$this->fail('当前地址不存在或者已被删除');
|
86
|
$this->fail('当前地址不存在或者已被删除');
|
|
86
|
}
|
87
|
}
|
|
87
|
- return $this->success($info);
|
88
|
+ $encrypt = new EncryptUtils();
|
|
|
|
89
|
+ $data = [
|
|
|
|
90
|
+ 'domain'=>$info['values'],
|
|
|
|
91
|
+ 'autologin_code' => $encrypt->authcode(json_encode(['project_id' => $this->param['project_id']]), 'ENCODE', 'autologin', 3600),
|
|
|
|
92
|
+ 'remark'=>'自动登录地址和code',
|
|
|
|
93
|
+ ];
|
|
|
|
94
|
+ //获取当前超级管理员的token
|
|
|
|
95
|
+ return $this->success($data);
|
|
88
|
}
|
96
|
}
|
|
89
|
|
97
|
|
|
90
|
} |
98
|
} |