DynamicComment.php 746 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\api\controller;
  3. use app\api\model\UserDynamicComment;
  4. use app\api\service\User as UserService;
  5. /**
  6. * 动态评论控制器
  7. * Class DynamicComment
  8. * @package app\api\controller
  9. */
  10. class DynamicComment extends Controller
  11. {
  12. public function list()
  13. {
  14. }
  15. public function message()
  16. {
  17. $model = new UserDynamicComment();
  18. $userInfo = UserService::getCurrentLoginUser(true);
  19. $userId = isset($userInfo['user_id'])? intval($userInfo['user_id']) : 0;
  20. $pageSize = $this->request->param('pageSize', 15);
  21. $list = $model->getListByUser($userId, $this->request->param(), (int)$pageSize);
  22. return $this->renderSuccess(compact('list'));
  23. }
  24. }