From 496b6a5a9b3b459f3808c7ff7d0f3e54d3200fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 7 Aug 2024 23:16:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=20env=20?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-static/.env.example | 6 +----- plugin/think-plugs-static/stc/config/cache.php | 14 +++++++------- plugin/think-plugs-static/stc/config/database.php | 14 +++++++------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/plugin/think-plugs-static/.env.example b/plugin/think-plugs-static/.env.example index 883c8ff8c..fb98fbfcd 100644 --- a/plugin/think-plugs-static/.env.example +++ b/plugin/think-plugs-static/.env.example @@ -1,7 +1,3 @@ -[app] -debug=true -trace=true - [mysql] hostname=127.0.0.1 database=admin_dv @@ -14,4 +10,4 @@ prefix= host=127.0.0.1 password="" port=6379 -select=0 \ No newline at end of file +select=0 diff --git a/plugin/think-plugs-static/stc/config/cache.php b/plugin/think-plugs-static/stc/config/cache.php index 5f8967cfc..1e6d0f853 100644 --- a/plugin/think-plugs-static/stc/config/cache.php +++ b/plugin/think-plugs-static/stc/config/cache.php @@ -19,7 +19,7 @@ return [ 'default' => 'file', // 缓存连接配置 'stores' => [ - 'file' => [ + 'file' => [ // 驱动方式 'type' => 'File', // 缓存保存目录 @@ -33,7 +33,7 @@ return [ // 序列化机制 'serialize' => [], ], - 'safe' => [ + 'safe' => [ // 驱动方式 'type' => 'File', // 缓存保存目录 @@ -49,11 +49,11 @@ return [ ], '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), + 'type' => 'redis', + 'host' => env('redis.host', '127.0.0.1'), + 'port' => env('redis.port', 6379), + 'select' => env('redis.select', 0), + 'password' => env('redis.password', ''), ] ], ]; \ 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 b976b801c..8ca84051f 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' => 'mysql', + 'default' => 'sqlite', // 自定义时间查询规则 'time_query_rule' => [], // 自动写入时间戳字段 @@ -29,21 +29,21 @@ return [ // 数据库类型 'type' => 'mysql', // 服务器地址 - 'hostname' => env('mysql.hostname','106.55.25.32'), + 'hostname' => env('mysql.hostname', '127.0.0.1'), // 数据库名 - 'database' => env('mysql.database','admin_dv'), + 'database' => env('mysql.database', 'thinkadmin'), // 用户名 - 'username' => env('mysql.username','admin_dv'), + 'username' => env('mysql.username', 'thinkadmin'), // 密码 - 'password' => env('mysql.password','3twr7kNZLXeSGtc7'), + 'password' => env('mysql.password', 'thinkadmin'), // 端口 - 'hostport' => env('mysql.hostport','3306'), + 'hostport' => env('mysql.hostport', '3306'), // 数据库连接参数 'params' => [], // 数据库编码默认采用 utf8 'charset' => 'utf8mb4', // 数据库表前缀 - 'prefix' => env('mysql.prefix',''), + 'prefix' => env('mysql.prefix', ''), // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 'deploy' => 0, // 数据库读写是否分离 主从式有效