mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-05 17:30:38 +00:00
调整证书
This commit is contained in:
parent
234724abb6
commit
74ee389b1d
@ -110,7 +110,7 @@ class Login extends AuthController
|
||||
} catch (\Throwable $e) {
|
||||
return app('json')->fail($e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
$result = $this->services->login($account, $password, 'admin', $key);
|
||||
if (!$result) {
|
||||
$num = CacheService::get('login_captcha', 1);
|
||||
@ -132,16 +132,4 @@ class Login extends AuthController
|
||||
{
|
||||
return app('json')->success($this->services->getLoginInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
* @return \think\Response
|
||||
* @author 等风来
|
||||
* @email 136327134@qq.com
|
||||
* @date 2023/5/16
|
||||
*/
|
||||
public function key(Rsa $rsa)
|
||||
{
|
||||
return app('json')->success(['publicKey' => $rsa->getPublicKey()]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,8 +24,6 @@ Route::group(function () {
|
||||
Route::post('login', 'Login/login')->name('AdminLogin')->option(['real_name' => '下载表备份记录']);
|
||||
//后台登录页面数据
|
||||
Route::get('login/info', 'Login/info')->option(['real_name' => '登录信息']);
|
||||
//获取公钥证书信息
|
||||
Route::get('login/key', 'Login/key')->option(['real_name' => '获取公钥证书信息']);
|
||||
//下载文件
|
||||
Route::get('download/:key', 'PublicController/download')->option(['real_name' => '下载文件']);
|
||||
//验证码
|
||||
|
||||
@ -23,6 +23,7 @@ use app\services\system\SystemMenusServices;
|
||||
use crmeb\services\CacheService;
|
||||
use crmeb\services\FormBuilder;
|
||||
use crmeb\services\workerman\ChannelService;
|
||||
use crmeb\utils\Rsa;
|
||||
use think\facade\Config;
|
||||
use think\facade\Event;
|
||||
use think\Model;
|
||||
@ -167,7 +168,8 @@ class SystemAdminServices extends BaseServices
|
||||
'copyright' => sys_config('nncnL_crmeb_copyright', ''),
|
||||
'version' => get_crmeb_version(),
|
||||
'key' => $key,
|
||||
'login_captcha' => 0
|
||||
'login_captcha' => 0,
|
||||
'publicKey' => app()->make(Rsa::class)->getPublicKey()
|
||||
];
|
||||
if (CacheService::get('login_captcha', 1) > 1) {
|
||||
$data['login_captcha'] = 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user