初始化提交
This commit is contained in:
58
config/app.php
Normal file
58
config/app.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 应用命名空间
|
||||
'app_namespace' => '',
|
||||
// 应用快速访问
|
||||
'app_express' => true,
|
||||
// 是否启用路由
|
||||
'with_route' => true,
|
||||
// 超级用户账号
|
||||
'super_user' => 'admin',
|
||||
// 默认时区
|
||||
'default_timezone' => 'Asia/Shanghai',
|
||||
// 应用映射(多应用模式有效)
|
||||
'app_map' => [],
|
||||
// 域名绑定(多应用模式有效)
|
||||
'domain_bind' => [],
|
||||
// 禁止访问(多应用模式有效)
|
||||
'deny_app_list' => [],
|
||||
// CORS 启用状态(默认开启跨域)
|
||||
'cors_on' => true,
|
||||
// CORS 配置跨域域名(仅需填域名,留空则自动域名)
|
||||
'cors_host' => [],
|
||||
// CORS 授权请求方法
|
||||
'cors_methods' => 'GET,PUT,POST,PATCH,DELETE',
|
||||
// CORS 跨域头部字段
|
||||
'cors_headers' => 'Api-Type,Api-Name,Api-Uuid,Jwt-Token,Api-Token,User-Form-Token,User-Token,Token',
|
||||
// 应用名称
|
||||
'app_names' =>[
|
||||
'admin' => '系统管理',
|
||||
'manager' => '后台管理'
|
||||
],
|
||||
// RBAC 登录页面(填写登录地址)
|
||||
'rbac_login' => '',
|
||||
// RBAC 忽略应用(填写应用名称)
|
||||
'rbac_ignore' => ['index'],
|
||||
// 显示错误消息内容,仅生产模式有效
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
// 异常状态模板配置,仅生产模式有效
|
||||
'http_exception_template' => [
|
||||
404 => syspath('public/static/theme/err/404.html'),
|
||||
500 => syspath('public/static/theme/err/500.html'),
|
||||
],
|
||||
];
|
||||
51
config/cache.php
Normal file
51
config/cache.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 默认缓存驱动
|
||||
'default' => 'file',
|
||||
// 缓存连接配置
|
||||
'stores' => [
|
||||
'file' => [
|
||||
// 驱动方式
|
||||
'type' => 'File',
|
||||
// 缓存保存目录
|
||||
'path' => '',
|
||||
// 缓存名称前缀
|
||||
'prefix' => '',
|
||||
// 缓存有效期 0 表示永久缓存
|
||||
'expire' => 0,
|
||||
// 缓存标签前缀
|
||||
'tag_prefix' => 'tag:',
|
||||
// 序列化机制
|
||||
'serialize' => [],
|
||||
],
|
||||
'safe' => [
|
||||
// 驱动方式
|
||||
'type' => 'File',
|
||||
// 缓存保存目录
|
||||
'path' => syspath('safefile/cache/'),
|
||||
// 缓存名称前缀
|
||||
'prefix' => '',
|
||||
// 缓存有效期 0 表示永久缓存
|
||||
'expire' => 0,
|
||||
// 缓存标签前缀
|
||||
'tag_prefix' => 'tag:',
|
||||
// 序列化机制
|
||||
'serialize' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
32
config/cookie.php
Normal file
32
config/cookie.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// cookie 保存时间
|
||||
'expire' => 0,
|
||||
// cookie 保存路径
|
||||
'path' => '/',
|
||||
// cookie 有效域名
|
||||
'domain' => '',
|
||||
// httponly 访问设置
|
||||
'httponly' => true,
|
||||
// 是否使用 setcookie
|
||||
'setcookie' => true,
|
||||
// cookie 安全传输,只支持 https 协议
|
||||
'secure' => request()->isSsl(),
|
||||
// samesite 安全设置,支持 'strict' 'lax' 'none'
|
||||
'samesite' => request()->isSsl() ? 'none' : 'lax',
|
||||
];
|
||||
86
config/database.php
Normal file
86
config/database.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => 'mysql',
|
||||
// 自定义时间查询规则
|
||||
'time_query_rule' => [],
|
||||
// 自动写入时间戳字段
|
||||
'auto_timestamp' => true,
|
||||
// 时间字段取出后的默认时间格式
|
||||
'datetime_format' => 'Y-m-d H:i:s',
|
||||
// 数据库连接配置信息
|
||||
'connections' => [
|
||||
'mysql' => [
|
||||
// 数据库类型
|
||||
'type' => 'mysql',
|
||||
// 服务器地址
|
||||
'hostname' => '127.0.0.1',
|
||||
// 数据库名
|
||||
'database' => 'cursortools',
|
||||
/* // 用户名
|
||||
'username' => 'root',
|
||||
// 密码
|
||||
'password' => 'root', */
|
||||
// 用户名
|
||||
'username' => 'root',
|
||||
// 密码
|
||||
'password' => 'root',
|
||||
// 端口
|
||||
'hostport' => '3306',
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用 utf8
|
||||
'charset' => 'utf8mb4',
|
||||
// 数据库表前缀
|
||||
'prefix' => '',
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 是否需要断线重连
|
||||
'break_reconnect' => false,
|
||||
// 监听SQL执行日志
|
||||
'trigger_sql' => true,
|
||||
// 开启字段类型缓存
|
||||
'fields_cache' => isOnline(),
|
||||
],
|
||||
'sqlite' => [
|
||||
'charset' => 'utf8',
|
||||
// 数据库类型
|
||||
'type' => 'sqlite',
|
||||
// 数据库文件
|
||||
'database' => syspath('database/sqlite.db'),
|
||||
// 监听执行日志
|
||||
'trigger_sql' => true,
|
||||
// 其他参数字段
|
||||
'deploy' => 0,
|
||||
'suffix' => '',
|
||||
'prefix' => '',
|
||||
'hostname' => '',
|
||||
'hostport' => '',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
39
config/lang.php
Normal file
39
config/lang.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 默认语言
|
||||
'default_lang' => 'zh-cn',
|
||||
// 允许的语言列表
|
||||
'allow_lang_list' => ['zh-cn'],
|
||||
// 转义为对应语言包名称
|
||||
'accept_language' => [
|
||||
'en' => 'en-us',
|
||||
'zh-hans-cn' => 'zh-cn',
|
||||
],
|
||||
// 多语言自动侦测变量名
|
||||
'detect_var' => 'lang',
|
||||
// 多语言 Cookie 变量
|
||||
'cookie_var' => 'lang',
|
||||
// 多语言 Header 变量
|
||||
'header_var' => 'lang',
|
||||
// 使用 Cookie 记录
|
||||
'use_cookie' => true,
|
||||
// 是否支持语言分组
|
||||
'allow_group' => false,
|
||||
// 扩展语言包
|
||||
'extend_list' => [],
|
||||
];
|
||||
57
config/log.php
Normal file
57
config/log.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 默认日志通道
|
||||
'default' => 'file',
|
||||
// 日志记录级别
|
||||
'level' => [],
|
||||
// 日志类型记录的通道
|
||||
'type_channel' => [],
|
||||
// 关闭全局日志写入
|
||||
'close' => false,
|
||||
// 全局日志处理 支持闭包
|
||||
'processor' => null,
|
||||
// 日志通道列表
|
||||
'channels' => [
|
||||
'file' => [
|
||||
// 日志记录方式
|
||||
'type' => 'File',
|
||||
// 日志保存目录
|
||||
'path' => '',
|
||||
// 单文件日志写入
|
||||
'single' => true,
|
||||
// 独立日志级别
|
||||
'apart_level' => true,
|
||||
// 每个文件大小 ( 10兆 )
|
||||
'file_size' => 10485760,
|
||||
// 日志日期格式
|
||||
'time_format' => 'Y-m-d H:i:s',
|
||||
// 最大日志文件数量
|
||||
'max_files' => 100,
|
||||
// 使用JSON格式记录
|
||||
'json' => false,
|
||||
// 日志处理
|
||||
'processor' => null,
|
||||
// 关闭通道日志写入
|
||||
'close' => false,
|
||||
// 日志输出格式化
|
||||
'format' => '[%s][%s] %s',
|
||||
// 是否实时写入
|
||||
'realtime_write' => false,
|
||||
],
|
||||
],
|
||||
];
|
||||
24
config/phinx.php
Normal file
24
config/phinx.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 忽略数据表,填写表名
|
||||
'ignore' => [],
|
||||
// 创建数据表,填写表名
|
||||
'tables' => [],
|
||||
// 备份数据表,填写表名
|
||||
'backup' => [],
|
||||
];
|
||||
58
config/route.php
Normal file
58
config/route.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// pathinfo分隔符
|
||||
'pathinfo_depr' => '/',
|
||||
// URL伪静态后缀
|
||||
'url_html_suffix' => 'html',
|
||||
// URL普通方式参数 用于自动生成
|
||||
'url_common_param' => true,
|
||||
// 是否开启路由延迟解析
|
||||
'url_lazy_route' => false,
|
||||
// 是否强制使用路由
|
||||
'url_route_must' => false,
|
||||
// 合并路由规则
|
||||
'route_rule_merge' => true,
|
||||
// 路由是否完全匹配
|
||||
'route_complete_match' => true,
|
||||
// 访问控制器层名称
|
||||
'controller_layer' => 'controller',
|
||||
// 空控制器名
|
||||
'empty_controller' => 'Error',
|
||||
// 是否使用控制器后缀
|
||||
'controller_suffix' => false,
|
||||
// 默认的路由变量规则
|
||||
'default_route_pattern' => '[\w\.]+',
|
||||
// 是否开启请求缓存 true 自动缓存 支持设置请求缓存规则
|
||||
'request_cache' => false,
|
||||
// 请求缓存有效期
|
||||
'request_cache_expire' => null,
|
||||
// 全局请求缓存排除规则
|
||||
'request_cache_except' => [],
|
||||
// 默认应用
|
||||
'default_app' => 'index',
|
||||
// 默认控制器名
|
||||
'default_controller' => 'Index',
|
||||
// 默认操作名
|
||||
'default_action' => 'index',
|
||||
// 操作方法后缀
|
||||
'action_suffix' => '',
|
||||
// 默认JSONP格式返回的处理方法
|
||||
'default_jsonp_handler' => 'jsonpReturn',
|
||||
// 默认JSONP处理方法
|
||||
'var_jsonp_handler' => 'callback',
|
||||
];
|
||||
28
config/session.php
Normal file
28
config/session.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 字段名称
|
||||
'name' => 'ssid',
|
||||
// 驱动方式
|
||||
'type' => 'file',
|
||||
// 存储连接
|
||||
'store' => null,
|
||||
// 过期时间
|
||||
'expire' => 7200,
|
||||
// 文件前缀
|
||||
'prefix' => '',
|
||||
];
|
||||
42
config/view.php
Normal file
42
config/view.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 模板引擎类型使用 Think
|
||||
'type' => 'Think',
|
||||
// 默认模板渲染规则 1.解析为小写+下划线 2.全部转换小写 3.保持操作方法
|
||||
'auto_rule' => 1,
|
||||
// 模板目录名
|
||||
'view_dir_name' => 'view',
|
||||
// 模板文件后缀
|
||||
'view_suffix' => 'html',
|
||||
// 模板文件名分隔符
|
||||
'view_depr' => DIRECTORY_SEPARATOR,
|
||||
// 模板缓存配置
|
||||
'tpl_cache' => isOnline(),
|
||||
// 模板引擎标签开始标记
|
||||
'tpl_begin' => '{',
|
||||
// 模板引擎标签结束标记
|
||||
'tpl_end' => '}',
|
||||
// 标签库标签开始标记
|
||||
'taglib_begin' => '{',
|
||||
// 标签库标签结束标记
|
||||
'taglib_end' => '}',
|
||||
// 去除HTML空格换行
|
||||
'strip_space' => true,
|
||||
// 标签默认过滤输出方法
|
||||
'default_filter' => 'htmlentities=###,ENT_QUOTES',
|
||||
];
|
||||
Reference in New Issue
Block a user