海南旅游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.

102 lines
3.3 KiB

4 years ago
4 years ago
4 years ago
4 years ago
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('product', 'ChannelController@product'); //频道产品列表
  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. Route::post('recommend', 'AgentProductController@recommend'); //我的下方推荐
  39. });
  40. # 产品分类
  41. Route::prefix('category')->group(function() {
  42. Route::post('list', 'CategoryController@index');
  43. });
  44. # 公告
  45. Route::prefix('notice')->group(function () {
  46. Route::post('list', 'NoticeController@index'); //公告列表
  47. Route::post('show', 'NoticeController@show'); //公告详情
  48. });
  49. # 订单
  50. Route::prefix('order')->group(function () {
  51. Route::post('list', 'OrderController@index'); //订单列表
  52. Route::post('create', 'OrderController@create'); //创建订单
  53. Route::post('save', 'OrderController@save'); //修改订单
  54. Route::post('price', 'OrderController@getPrice'); //获取订单价格
  55. Route::post('show', 'OrderController@show'); //订单详情
  56. });
  57. # 文章
  58. Route::prefix('article')->group(function () {
  59. Route::post('list', 'ArticleController@index'); //文章列表
  60. Route::post('show', 'ArticleController@show'); //文章详情
  61. });
  62. # 代理商信息
  63. Route::prefix('agent_info')->group(function () {
  64. Route::post('about', 'AgentInfoController@about'); //关于我们
  65. });
  66. # 短信息
  67. Route::prefix('message')->group(function () {
  68. Route::post('list', 'MessageController@index'); //消息列表
  69. Route::post('show', 'MessageController@show'); //消息列表
  70. });
  71. # 收藏
  72. Route::prefix('fav')->group(function () {
  73. Route::post('list', 'UserFavController@index'); //收藏列表
  74. Route::post('create', 'UserFavController@create'); //添加收藏
  75. Route::post('delete', 'UserFavController@delete'); //删除收藏
  76. });
  77. # 用户
  78. Route::prefix('user')->group(function () {
  79. Route::post('profile', 'UserController@profile'); //解密用户信息
  80. });
  81. # 专题
  82. Route::prefix('special')->group(function () {
  83. Route::post('show', 'SpecialController@show'); //专题详情
  84. });
  85. });