代码功能更新

This commit is contained in:
root
2025-05-18 07:42:27 +00:00
parent 7fc1d422a1
commit 4a90c41da2
2083 changed files with 695218 additions and 3 deletions
Executable
+31
View File
@@ -0,0 +1,31 @@
<?php
//自定义路由
use think\facade\Route;
// api子域名路由指定
Route::domain('localapi',function () {
Route::rule('/plugin/:plugin', "laytp\library\PluginRoute@execute");
Route::get('captcha/[:config]','\\think\\captcha\\CaptchaController@index');
Route::rule('/:pathInfo', '/api.:pathInfo')->pattern(['pathInfo'=>'[\w\.\/]+']);
Route::miss(function() {
return json([
"code" => 0,
"msg" => '路由不存在',
"data" => new stdClass()
]);
});
});
// adminapi子域名路由指定
Route::domain('localadminapi',function () {
Route::rule('/plugin/:plugin', "laytp\library\PluginRoute@execute");
Route::get('captcha/[:config]','\\think\\captcha\\CaptchaController@index');
Route::rule('/:pathInfo', '/admin.:pathInfo')->pattern(['pathInfo'=>'[\w\.\/]+']);
Route::miss(function() {
return json([
"code" => 0,
"msg" => '路由不存在',
"data" => new stdClass()
]);
});
});
+5
View File
@@ -0,0 +1,5 @@
<?php
//laytp插件路由
use think\facade\Route;
Route::rule('/plugin/:plugin', "laytp\library\PluginRoute@execute");