mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
增加扩展机制定位文件;将common模块实现扩展模式;发布新版本;
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 应用设置
|
||||
// +----------------------------------------------------------------------
|
||||
@@ -7,39 +8,39 @@ use think\facade\Env;
|
||||
|
||||
return [
|
||||
// 应用地址
|
||||
'app_host' => Env::get('app.host', ''),
|
||||
'app_host' => Env::get('app.host', ''),
|
||||
// 应用的命名空间
|
||||
'app_namespace' => '',
|
||||
'app_namespace' => '',
|
||||
// 是否启用路由
|
||||
'with_route' => true,
|
||||
'with_route' => true,
|
||||
// 是否启用事件
|
||||
'with_event' => true,
|
||||
'with_event' => true,
|
||||
// 开启应用快速访问
|
||||
'app_express' => true,
|
||||
'app_express' => true,
|
||||
// 默认应用
|
||||
'default_app' => 'index',
|
||||
'default_app' => 'index',
|
||||
// 默认时区
|
||||
'default_timezone' => 'Asia/Shanghai',
|
||||
// 应用映射(自动多应用模式有效)
|
||||
'app_map' => [
|
||||
'app_map' => [
|
||||
Env::get('adminsystem.admin', 'admin') => 'admin',
|
||||
],
|
||||
// 后台别名
|
||||
'admin_alias_name' => Env::get('adminsystem.admin', 'admin'),
|
||||
// 域名绑定(自动多应用模式有效)
|
||||
'domain_bind' => [],
|
||||
'domain_bind' => [],
|
||||
// 禁止URL访问的应用列表(自动多应用模式有效)
|
||||
'deny_app_list' => ['common'],
|
||||
'deny_app_list' => ['common'],
|
||||
// 异常页面的模板文件
|
||||
'exception_tmpl' => Env::get('app_debug') == 1 ? app()->getThinkPath() . 'tpl/think_exception.tpl' : app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'think_exception.tpl',
|
||||
'exception_tmpl' => Env::get('app_debug') == 1 ? app()->getThinkPath() . 'tpl/think_exception.tpl' : app_file_path('common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'think_exception.tpl'),
|
||||
// 跳转页面的成功模板文件
|
||||
'dispatch_success_tmpl' => app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl',
|
||||
'dispatch_success_tmpl' => app_file_path('common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl'),
|
||||
// 跳转页面的失败模板文件
|
||||
'dispatch_error_tmpl' => app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl',
|
||||
'dispatch_error_tmpl' => app_file_path('common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl'),
|
||||
// 错误显示信息,非调试模式有效
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
// 显示错误信息
|
||||
'show_error_msg' => false,
|
||||
'show_error_msg' => false,
|
||||
// 静态资源上传到OSS前缀
|
||||
'oss_static_prefix' => Env::get('adminsystem.oss_static_prefix', 'static_ulthon_admin'),
|
||||
'oss_static_prefix' => Env::get('adminsystem.oss_static_prefix', 'static_ulthon_admin'),
|
||||
];
|
||||
|
||||
@@ -14,11 +14,16 @@ $skip_files[] = 'README.md';
|
||||
$skip_files[] = 'README.en.md';
|
||||
$skip_files[] = 'composer.json';
|
||||
|
||||
$skip_files[] = 'app/common/event/AdminLoginSuccess/LogEvent.php';
|
||||
$skip_files[] = 'app/common/event/AdminLoginType/DemoEvent.php';
|
||||
|
||||
$config['skip_files'] = $skip_files;
|
||||
|
||||
$skip_dir = [];
|
||||
|
||||
$skip_dir[] = 'runtime';
|
||||
$skip_dir[] = 'vendor';
|
||||
|
||||
$skip_dir[] = 'app/admin/controller';
|
||||
$skip_dir[] = 'app/admin/middleware';
|
||||
$skip_dir[] = 'app/admin/model';
|
||||
@@ -26,20 +31,37 @@ $skip_dir[] = 'app/admin/service';
|
||||
$skip_dir[] = 'app/admin/traits';
|
||||
$skip_dir[] = 'app/admin/view';
|
||||
|
||||
$skip_dir[] = 'app/common/controller';
|
||||
$skip_dir[] = 'app/common/command';
|
||||
$skip_dir[] = 'app/common/constants';
|
||||
$skip_dir[] = 'app/common/exception';
|
||||
$skip_dir[] = 'app/common/model';
|
||||
$skip_dir[] = 'app/common/provider';
|
||||
$skip_dir[] = 'app/common/service';
|
||||
$skip_dir[] = 'app/common/tools';
|
||||
$skip_dir[] = 'app/common/traits';
|
||||
$skip_dir[] = 'app/common/tpl';
|
||||
|
||||
$config['skip_dir'] = $skip_dir;
|
||||
|
||||
// append 如果当前版本不存在,则追加,如果存在,则不应当覆盖
|
||||
// append 的文件应当在skip内部
|
||||
|
||||
$append_files = [];
|
||||
|
||||
$append_files[] = 'app/common/app/functions.php';
|
||||
$append_files[] = 'app/common/app/listen.php';
|
||||
$append_files[] = 'app/common/app/middleware.php';
|
||||
$append_files[] = 'app/common/app/service.php';
|
||||
$append_files[] = 'app/common/app/provider.php';
|
||||
|
||||
$append_files[] = 'app/common/event/AdminLoginSuccess/LogEvent.php';
|
||||
$append_files[] = 'app/common/event/AdminLoginType/DemoEvent.php';
|
||||
|
||||
$config['append_files'] = $append_files;
|
||||
|
||||
$append_dir = [];
|
||||
|
||||
$append_dir[] = 'app/admin/controller';
|
||||
$append_dir[] = 'app/admin/middleware';
|
||||
$append_dir[] = 'app/admin/model';
|
||||
@@ -47,6 +69,17 @@ $append_dir[] = 'app/admin/service';
|
||||
$append_dir[] = 'app/admin/traits';
|
||||
$append_dir[] = 'app/admin/view';
|
||||
|
||||
$append_dir[] = 'app/common/controller';
|
||||
$append_dir[] = 'app/common/command';
|
||||
$append_dir[] = 'app/common/constants';
|
||||
$append_dir[] = 'app/common/exception';
|
||||
$append_dir[] = 'app/common/model';
|
||||
$append_dir[] = 'app/common/provider';
|
||||
$append_dir[] = 'app/common/service';
|
||||
$append_dir[] = 'app/common/tools';
|
||||
$append_dir[] = 'app/common/traits';
|
||||
$append_dir[] = 'app/common/tpl';
|
||||
|
||||
$config['append_dir'] = $append_dir;
|
||||
|
||||
return $config;
|
||||
|
||||
Reference in New Issue
Block a user