diff --git a/routes/api.php b/routes/api.php index bcb8b18..d2dd4db 100644 --- a/routes/api.php +++ b/routes/api.php @@ -17,3 +17,32 @@ use Illuminate\Support\Facades\Route; Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); + +Route::namespace('App\Http\Controllers\Api')->group(function () { + # 首页 + Route::post('index', 'IndexController@index'); + + /*# 轮播图 + Route::prefix('slide')->group(function () { + Route::post('list', 'SlideController@index'); //轮播图 + }); + + # 频道 + Route::prefix('channel')->group(function () { + Route::post('list', 'ChannelController@index'); //频道列表 + Route::post('my', 'ChannelController@my'); //我的频道列表 + }); + + # 产品 + Route::prefix('product')->group(function () { + Route::post('list', 'ProductController@index'); //产品列表 + Route::post('hot', 'ProductController@hot'); //人气爆款 + Route::post('guess', 'ProductController@guessLike'); //猜你喜欢 + }); + + # 公告 + Route::prefix('notice')->group(function () { + Route::post('list', 'NoticeController@index'); //公告列表 + });*/ + +});