Files
shengkao_pachong/route/app.php
杨志 35f9f6f31f UP
2026-01-21 09:07:10 +08:00

41 lines
1.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
Route::get('think', function () {
return 'hello,ThinkPHP8!';
});
Route::get('hello/:name', 'index/hello');
// 认证路由(不需要登录)
Route::get('login', 'auth/login');
Route::post('auth/doLogin', 'auth/doLogin');
Route::get('auth/logout', 'auth/logout');
// 爬虫工具路由(需要登录)
Route::get('crawler', 'crawler/index');
Route::get('crawler/getUserConfig', 'crawler/getUserConfig');
Route::post('crawler/saveUserConfig', 'crawler/saveUserConfig');
Route::post('crawler/getDsdmOptions', 'crawler/getDsdmOptions');
Route::post('crawler/getZwdmList', 'crawler/getZwdmList');
Route::post('crawler/getPositionInfo', 'crawler/getPositionInfo');
Route::post('crawler/batchGetPositionInfo', 'crawler/batchGetPositionInfo');
Route::post('crawler/fetchAllPositions', 'crawler/fetchAllPositions');
// 管理员路由(需要登录且为管理员)
// 注意API路由必须在index路由之前定义确保优先匹配
Route::get('admin/getUsers', 'admin/getUsers');
Route::get('admin/getBaseUrl', 'admin/getBaseUrl');
Route::post('admin/addUser', 'admin/addUser');
Route::post('admin/deleteUser', 'admin/deleteUser');
Route::post('admin/setBaseUrl', 'admin/setBaseUrl');
Route::get('admin', 'admin/index');