From d9c51368bc59969f272151790b84bafed2f653e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E6=A1=83?= <1098598843@qq.com> Date: Tue, 14 Mar 2023 14:47:41 +0800 Subject: [PATCH] 1 --- app/api/middleware.php | 1 - app/api/route/api.php | 174 ++++++++++++++++++++++++++++++++++++++++ app/api/route/party.php | 2 +- 3 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 app/api/route/api.php diff --git a/app/api/middleware.php b/app/api/middleware.php index e695fbe..5454cea 100644 --- a/app/api/middleware.php +++ b/app/api/middleware.php @@ -6,6 +6,5 @@ return [ //验证勾股cms是否完成安装 \app\home\middleware\Install::class, \app\api\middleware\AllowOriginMiddleware::class, - \app\api\middleware\Auth::class, ]; \ No newline at end of file diff --git a/app/api/route/api.php b/app/api/route/api.php new file mode 100644 index 0000000..fb9ff6e --- /dev/null +++ b/app/api/route/api.php @@ -0,0 +1,174 @@ +middleware(\app\api\middleware\Auth::class); + +Route::group('/',function () { + Route::get('PublicBenefit/enroll', 'PublicBenefit/enroll'); + Route::get('PublicBenefit/Activites', 'PublicBenefit/Activites'); + Route::get('HouseDecoration/store', 'HouseDecoration/store'); + Route::get('HouseDecoration/case', 'HouseDecoration/case'); + /** + * 文创文章 + */ + Route::get('cultural/article', 'cultural/article'); + /** + * 全民打卡 + */ + Route::get('cultural/punchcard', 'cultural/punchcard'); + /** + * 官网攻略 + */ + Route::get('cultural/WebStrategy', 'cultural/WebStrategy'); + /** + * 热门活动 + */ + Route::get('cultural/hotparty', 'cultural/hotparty'); + /** + * 获取banner + */ + Route::get('Slide/get_slide', 'Slide/get_slide'); + /** + * 获取文章 + */ + Route::get('article/indexs', 'article/indexs'); + Route::get('article/details', 'article/details'); + Route::post('article_comment/post', 'article_comment/post'); + /** + * 获取分类 + */ + Route::get('common/category', 'common/category'); + Route::get('Village/get_ranking_town', 'Village/get_ranking_town'); + Route::get('Village/get_town_list', 'Village/get_town_list'); + Route::get('Village/get_ranking_list', 'Village/get_ranking_list'); + Route::get('Census/get_list', 'Census/get_list'); + Route::get('Village/get_village', 'Village/get_village'); + Route::get('Village/thumbs_up', 'Village/thumbs_up'); + Route::get('Village/get_detail', 'Village/get_detail'); + Route::get('Village/get_list', 'Village/get_list'); + Route::get('Village/get_json', 'Village/get_json'); + Route::get('common/get_brigade', 'common/get_brigade'); + Route::get('Userinfo/Binding', 'Userinfo/Binding'); + Route::get('city/get_area', 'city/get_area'); + Route::get('city/get_street', 'city/get_street'); + Route::get('city/get_village', 'city/get_village'); + Route::get('geo/area', 'geo/area'); + Route::get('geo/street', 'geo/street'); + Route::get('geo/village', 'geo/village'); + Route::get('geo/brigade', 'geo/brigade'); +}); + + diff --git a/app/api/route/party.php b/app/api/route/party.php index 3388df8..4ebc69c 100644 --- a/app/api/route/party.php +++ b/app/api/route/party.php @@ -58,7 +58,7 @@ Route::group('party',function () { Route::post('put', 'party.VoteComment/put'); Route::get('del', 'party.VoteComment/delete'); }); -}); +})->middleware(\app\api\middleware\Auth::class); Route::group('article',function () { Route::get('index', 'article/index');