From 0d74bb398c2eee880caaa3f493be8d11bf846294 Mon Sep 17 00:00:00 2001 From: wfg Date: Wed, 7 Aug 2024 15:51:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=92=8C?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=85=8D=E7=BD=AE=E4=BD=BF=E7=94=A8env?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-static/stc/config/cache.php | 8 ++++++++ plugin/think-plugs-static/stc/config/database.php | 14 +++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plugin/think-plugs-static/stc/config/cache.php b/plugin/think-plugs-static/stc/config/cache.php index 25d927aa0..5f8967cfc 100644 --- a/plugin/think-plugs-static/stc/config/cache.php +++ b/plugin/think-plugs-static/stc/config/cache.php @@ -47,5 +47,13 @@ return [ // 序列化机制 'serialize' => [], ], + 'redis' => [ + // 驱动方式 + 'type' => 'redis', + 'host' => env('redis.host','127.0.0.1'), + 'password' => env('redis.password',''), + 'select' => env('redis.select',0), + 'port' => env('redis.port',6379), + ] ], ]; \ No newline at end of file diff --git a/plugin/think-plugs-static/stc/config/database.php b/plugin/think-plugs-static/stc/config/database.php index 37f817552..b976b801c 100644 --- a/plugin/think-plugs-static/stc/config/database.php +++ b/plugin/think-plugs-static/stc/config/database.php @@ -16,7 +16,7 @@ return [ // 默认使用的数据库连接配置 - 'default' => 'sqlite', + 'default' => 'mysql', // 自定义时间查询规则 'time_query_rule' => [], // 自动写入时间戳字段 @@ -29,21 +29,21 @@ return [ // 数据库类型 'type' => 'mysql', // 服务器地址 - 'hostname' => '127.0.0.1', + 'hostname' => env('mysql.hostname','106.55.25.32'), // 数据库名 - 'database' => 'admin_v6', + 'database' => env('mysql.database','admin_dv'), // 用户名 - 'username' => 'admin_v6', + 'username' => env('mysql.username','admin_dv'), // 密码 - 'password' => 'FbYBHcWKr2', + 'password' => env('mysql.password','3twr7kNZLXeSGtc7'), // 端口 - 'hostport' => '3306', + 'hostport' => env('mysql.hostport','3306'), // 数据库连接参数 'params' => [], // 数据库编码默认采用 utf8 'charset' => 'utf8mb4', // 数据库表前缀 - 'prefix' => '', + 'prefix' => env('mysql.prefix',''), // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 'deploy' => 0, // 数据库读写是否分离 主从式有效