// +---------------------------------------------------------------------- use think\facade\Route; // 认证路由(不需要登录) Route::get('login', 'auth/login'); Route::post('auth/doLogin', 'auth/doLogin'); Route::get('auth/logout', 'auth/logout'); // 爬虫工具路由(需要登录) // 注意:API路由必须在index路由之前定义,确保优先匹配 Route::get('crawler/getUserConfig', 'crawler/getUserConfig'); Route::post('crawler/saveUserConfig', 'crawler/saveUserConfig'); Route::post('crawler/changePassword', 'crawler/changePassword'); 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'); Route::get('crawler', 'crawler/index'); // 管理员路由(需要登录且为管理员) // 注意: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::post('admin/resetUserPassword', 'admin/resetUserPassword'); Route::get('admin', 'admin/index');