From e8d3369706fd9116440b683288077c650e5421e3 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 13 Jan 2020 11:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/admin/controller/system/SystemDatabackup.php | 4 ++-- crmeb/crmeb/traits/JwtAuthModelTrait.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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'); }