diff --git a/crmeb/app/admin/controller/system/SystemDatabackup.php b/crmeb/app/admin/controller/system/SystemDatabackup.php index c49d8756..ff2c11d9 100644 --- a/crmeb/app/admin/controller/system/SystemDatabackup.php +++ b/crmeb/app/admin/controller/system/SystemDatabackup.php @@ -5,7 +5,7 @@ namespace app\admin\controller\system; use app\admin\controller\AuthController; use crmeb\services\JsonService as Json; use \crmeb\services\MysqlBackupService as Backup; -use think\facade\Env; +use think\facade\Config; use think\facade\Session; use think\facade\Db; @@ -57,7 +57,7 @@ class SystemDatabackup extends AuthController */ public function seetable() { - $database = Env::get("database.database"); + $database = Config::get("database.database"); $tablename = request()->param('tablename'); $res = Db::query("select * from information_schema.columns where table_name = '" . $tablename . "' and table_schema = '" . $database . "'"); $html = ''; diff --git a/crmeb/crmeb/traits/JwtAuthModelTrait.php b/crmeb/crmeb/traits/JwtAuthModelTrait.php index 5d4952f6..954356af 100644 --- a/crmeb/crmeb/traits/JwtAuthModelTrait.php +++ b/crmeb/crmeb/traits/JwtAuthModelTrait.php @@ -8,7 +8,7 @@ use Firebase\JWT\BeforeValidException; use Firebase\JWT\ExpiredException; use Firebase\JWT\JWT; use Firebase\JWT\SignatureInvalidException; -use think\facade\Env; +use think\facade\Config; use UnexpectedValueException; trait JwtAuthModelTrait @@ -32,7 +32,7 @@ trait JwtAuthModelTrait 'exp' => strtotime('+ 3hour'), ]; $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'); }