mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-12 11:09:23 +00:00
调整获取配置类
This commit is contained in:
parent
6f80491a85
commit
e8d3369706
@ -5,7 +5,7 @@ namespace app\admin\controller\system;
|
|||||||
use app\admin\controller\AuthController;
|
use app\admin\controller\AuthController;
|
||||||
use crmeb\services\JsonService as Json;
|
use crmeb\services\JsonService as Json;
|
||||||
use \crmeb\services\MysqlBackupService as Backup;
|
use \crmeb\services\MysqlBackupService as Backup;
|
||||||
use think\facade\Env;
|
use think\facade\Config;
|
||||||
use think\facade\Session;
|
use think\facade\Session;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class SystemDatabackup extends AuthController
|
|||||||
*/
|
*/
|
||||||
public function seetable()
|
public function seetable()
|
||||||
{
|
{
|
||||||
$database = Env::get("database.database");
|
$database = Config::get("database.database");
|
||||||
$tablename = request()->param('tablename');
|
$tablename = request()->param('tablename');
|
||||||
$res = Db::query("select * from information_schema.columns where table_name = '" . $tablename . "' and table_schema = '" . $database . "'");
|
$res = Db::query("select * from information_schema.columns where table_name = '" . $tablename . "' and table_schema = '" . $database . "'");
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|||||||
@ -8,7 +8,7 @@ use Firebase\JWT\BeforeValidException;
|
|||||||
use Firebase\JWT\ExpiredException;
|
use Firebase\JWT\ExpiredException;
|
||||||
use Firebase\JWT\JWT;
|
use Firebase\JWT\JWT;
|
||||||
use Firebase\JWT\SignatureInvalidException;
|
use Firebase\JWT\SignatureInvalidException;
|
||||||
use think\facade\Env;
|
use think\facade\Config;
|
||||||
use UnexpectedValueException;
|
use UnexpectedValueException;
|
||||||
|
|
||||||
trait JwtAuthModelTrait
|
trait JwtAuthModelTrait
|
||||||
@ -32,7 +32,7 @@ trait JwtAuthModelTrait
|
|||||||
'exp' => strtotime('+ 3hour'),
|
'exp' => strtotime('+ 3hour'),
|
||||||
];
|
];
|
||||||
$params['jti'] = compact('id', 'type');
|
$params['jti'] = compact('id', 'type');
|
||||||
$token = JWT::encode($params, Env::get('app.app_key', 'default'));
|
$token = JWT::encode($params, Config::get('app.app_key', 'default'));
|
||||||
|
|
||||||
return compact('token', 'params');
|
return compact('token', 'params');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user