article.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. use app\api\middleware\ApiChannel;
  12. use app\api\middleware\ApiCheckToken;
  13. use app\api\middleware\ApiLog;
  14. use think\facade\Route;
  15. /**
  16. * 文章管理
  17. */
  18. Route::group('article', function() {
  19. /***************************************************** 文章管理 ****************************************************/
  20. //文章列表
  21. Route::get('list', 'article.Article/lists');
  22. //文章详情
  23. Route::get(':id', 'article.Article/info');
  24. //文章
  25. Route::get('all', 'article.Article/all');
  26. //文章热门资讯
  27. Route::get('hot', 'article.Article/hot');
  28. // 增加文章访问量
  29. Route::put('incVisit/:id', 'article.Article/incVisit');
  30. /***************************************************** 文章分类管理 ****************************************************/
  31. //文章分类列表
  32. Route::get('category', 'article.ArticleCategory/lists');
  33. //文章分类详情
  34. Route::get('category/:id', 'article.ArticleCategory/info');
  35. })->middleware(ApiChannel::class)
  36. ->middleware(ApiCheckToken::class, false)
  37. ->middleware(ApiLog::class);