- Add Google Authenticator integration for enhanced login security-Update admin edit page to include login type selection - Modify login process to support two-factor authentication - Add new database fields for login type and GA secret - Update client-side JavaScript to handle GA code input and validation
28 lines
483 B
PHP
28 lines
483 B
PHP
<?php
|
|
|
|
namespace app\admin\model;
|
|
|
|
|
|
use app\common\model\TimeModel;
|
|
|
|
class SystemAdmin extends TimeModel
|
|
{
|
|
|
|
protected $deleteTime = 'delete_time';
|
|
|
|
public array $notes = [
|
|
'login_type' => [
|
|
1 => '密码登录',
|
|
2 => '密码 + 谷歌验证码登录'
|
|
],
|
|
];
|
|
|
|
public function getAuthList()
|
|
{
|
|
$list = (new SystemAuth())
|
|
->where('status', 1)
|
|
->column('title', 'id');
|
|
return $list;
|
|
}
|
|
|
|
} |