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