海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.9 KiB

4 years ago
4 years ago
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. /*Route::middleware('auth:api')->get('/user', function (Request $request) {
  15. return $request->user();
  16. });*/
  17. # 登录
  18. Route::post('login', 'App\Http\Controllers\Api\LoginController@login');
  19. Route::namespace('App\Http\Controllers\Api')
  20. ->middleware(App\Http\Middleware\AuthApi::class)
  21. ->group(function () {
  22. # 首页
  23. Route::post('index', 'IndexController@index');
  24. # 频道
  25. Route::prefix('channel')->group(function () {
  26. Route::post('list', 'ChannelController@index'); //频道列表
  27. // Route::post('my', 'ChannelController@my'); //我的频道列表
  28. });
  29. # 我的频道
  30. Route::prefix('user_channel')->group(function () {
  31. Route::post('update', 'UserChannelController@update'); //编辑我的频道
  32. });
  33. # 产品
  34. Route::prefix('agent_product')->group(function () {
  35. Route::post('list', 'AgentProductController@index'); //产品列表
  36. Route::post('guess', 'AgentProductController@guessLike'); //猜你喜欢
  37. Route::post('show', 'AgentProductController@show'); //产品详情
  38. });
  39. # 产品分类
  40. Route::prefix('category')->group(function() {
  41. Route::post('list', 'CategoryController@index');
  42. });
  43. # 公告
  44. Route::prefix('notice')->group(function () {
  45. Route::post('list', 'NoticeController@index'); //公告列表
  46. Route::post('show', 'NoticeController@show'); //公告详情
  47. });
  48. # 订单
  49. Route::prefix('order')->group(function () {
  50. Route::post('list', 'OrderController@index'); //订单列表
  51. Route::post('create', 'OrderController@create'); //创建订单
  52. Route::post('save', 'OrderController@save'); //修改订单
  53. Route::post('price', 'OrderController@getPrice'); //获取订单价格
  54. });
  55. # 文章
  56. Route::prefix('article')->group(function () {
  57. Route::post('list', 'ArticleController@index'); //文章列表
  58. Route::post('show', 'ArticleController@show'); //文章详情
  59. });
  60. # 代理商信息
  61. Route::prefix('agent_info')->group(function () {
  62. Route::post('about', 'AgentInfoController@about'); //关于我们
  63. });
  64. # 短信息
  65. Route::prefix('message')->group(function () {
  66. Route::post('list', 'MessageController@index'); //消息列表
  67. Route::post('show', 'MessageController@show'); //消息列表
  68. });
  69. # 收藏
  70. Route::prefix('fav')->group(function () {
  71. Route::post('list', 'UserFavController@index'); //收藏列表
  72. Route::post('create', 'UserFavController@create'); //添加收藏
  73. });
  74. });