diff --git a/app/home/controller/Index.php b/app/home/controller/Index.php deleted file mode 100644 index c4062fa0..00000000 --- a/app/home/controller/Index.php +++ /dev/null @@ -1,12 +0,0 @@ - 'Home', +]; \ No newline at end of file diff --git a/app/index/lang/zh-cn.php b/app/index/lang/zh-cn.php new file mode 100644 index 00000000..34c3cb46 --- /dev/null +++ b/app/index/lang/zh-cn.php @@ -0,0 +1,5 @@ + '首页', +]; \ No newline at end of file diff --git a/app/home/middleware.php b/app/index/middleware.php similarity index 51% rename from app/home/middleware.php rename to app/index/middleware.php index ec9473e0..fb3c3fa6 100644 --- a/app/home/middleware.php +++ b/app/index/middleware.php @@ -1,5 +1,6 @@ +// +---------------------------------------------------------------------- +use think\facade\Route; + +Route::get('/', 'Index/index'); diff --git a/config/lang.php b/config/lang.php index 0d8b693a..f8b8d742 100644 --- a/config/lang.php +++ b/config/lang.php @@ -7,7 +7,7 @@ return [ // 默认语言 'default_lang' => env('DEFAULT_LANG', 'zh-cn'), // 允许的语言列表 - 'allow_lang_list' => [], + 'allow_lang_list' => ['zh-cn', 'en-us'], // 多语言自动侦测变量名 'detect_var' => 'lang', // 是否使用Cookie记录 @@ -23,5 +23,5 @@ return [ 'zh-hans-cn' => 'zh-cn', ], // 是否支持语言分组 - 'allow_group' => false, + 'allow_group' => true, ]; diff --git a/config/route.php b/config/route.php index 5b07c04e..4c3e41bb 100644 --- a/config/route.php +++ b/config/route.php @@ -29,7 +29,7 @@ return [ // 是否使用控制器后缀 'controller_suffix' => false, // 默认模块名(开启自动多模块有效) - 'default_module' => 'home', + 'default_module' => 'index', // 默认控制器名 'default_controller' => 'Index', // 默认操作名