// +---------------------------------------------------------------------- use think\facade\Route; // 微信接口路由 Route::get('index/wechat/index', 'index/wechat/index'); Route::post('index/wechat/index', 'index/wechat/index'); Route::get('index/wechat/test', 'index/wechat/test'); Route::get('index/wechat/getLoginTicket', 'index/wechat/getLoginTicket'); Route::post('index/wechat/checkLoginStatus', 'index/wechat/checkLoginStatus'); Route::post('index/wechat/reGenerateQrcode', 'index/wechat/reGenerateQrcode'); Route::get('index/wechat/testWechat', 'index/wechat/testWechat'); Route::post('index/wechat/testWechat', 'index/wechat/testWechat'); // API路由组 Route::group('api', function () { // 管理员登录 Route::post('admin/login', 'api/Admin/login'); // 管理员相关接口 Route::get('admin/info', 'api/Admin/info'); Route::post('admin/logout', 'api/Admin/logout'); Route::post('admin/change-password', 'api/Admin/changePassword'); Route::get('admin/menus', 'api/Admin/menus'); // 搜索接口 Route::get('search', 'index/Search/apiSearch'); // 用户文章列表接口 Route::get('user/articles', 'index/Articles/getUserArticleList'); // 用户资源列表接口 Route::get('user/resources', 'index/Resources/getUserResourceList'); // 文章分类接口 Route::get('articles/categories', 'index/Articles/getArticleCategory'); // 编辑文章接口 Route::post('articles/update', 'index/Articles/updateArticle'); // 发布文章接口 Route::post('articles/publish', 'index/Articles/publishArticle'); })->middleware(\app\middleware\Cors::class);