chore: 重写初始提交(清空历史,整理后全量提交)

This commit is contained in:
ywxapp
2026-08-16 16:54:14 +08:00
commit 6c1a106bc1
1808 changed files with 238144 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
// +----------------------------------------------------------------------
// | YwxApp [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2026-2036 http://ywxapp.cn All rights reserved.
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | Author: ywxapp<admin@ywxapp.cn>
// +----------------------------------------------------------------------
use think\facade\Route;
// 说明:本文件由 ywxapp/service/AppService::loadAddonRoutes() 在 boot 阶段
// include,并统一被外层 Route::group('seo', ...) 包住,因此下面写的都是
// 【相对规则】,最终自动加 /seo 前缀:
// 顶层规则 -> /seo/*
// backend 组 -> /seo/backend/*
// api 组 -> /seo/api/*
// 前台页面 / 接口(最终地址 /seo/index、/seo/sitemap.xml、/seo/robots.txt
Route::rule('index', 'Index/index');
Route::rule('sitemap.xml', 'Index/sitemap')->completeMatch(true);
Route::rule('robots.txt', 'Index/robots')->completeMatch(true);
// 后台管理路由(对应 controller/backend/ 下的控制器;最终地址 /seo/backend/*
// 注意:全局 route_complete_match=false 时,裸规则会前缀匹配子路径,故必须
// ->completeMatch(true) 强制完整匹配,避免 /seo/backend/setting 被派发到错误动作。
Route::group('backend', function () {
Route::rule('index', 'backend/Seo/index')->completeMatch(true);
Route::rule('setting', 'backend/Seo/setting')->completeMatch(true);
Route::rule('keywords', 'backend/Seo/keywords')->completeMatch(true);
Route::rule('stats', 'backend/Seo/stats')->completeMatch(true);
});
// 对外 API(最终地址 /seo/api/*,按需启用)
Route::group('api', function () {
Route::rule('lists', 'api/Seo/lists')->completeMatch(true);
});