| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace app\api\controller;
- use app\api\model\UserDynamicCollect;
- use app\api\service\User as UserService;
- /**
- * 动态收藏点赞控制器
- * Class DynamicCollect
- * @package app\api\controller
- */
- class DynamicCollect extends Controller
- {
- public function list()
- {
- }
- /**
- * 点赞收藏消息
- * @return \think\response\Json
- * @throws \cores\exception\BaseException
- */
- public function message()
- {
- $model = new UserDynamicCollect();
- $userInfo = UserService::getCurrentLoginUser(true);
- $userId = isset($userInfo['user_id'])? intval($userInfo['user_id']) : 0;
- $pageSize = $this->request->param('pageSize', 15);
- $list = $model->getListByUser($userId, $this->request->param(), (int)$pageSize);
- return $this->renderSuccess(compact('list'));
- }
- }
|