request->param('pageSize', 15); $list = $model->getList($this->request->param(), (int)$pageSize); return $this->renderSuccess(compact('list')); } /** * 推荐动态 * @return \think\response\Json * @throws \think\db\exception\DbException */ public function index() { // 获取列表数据 $model = new UserDynamicModel(); $pageSize = $this->request->param('pageSize', 15); $userInfo = UserService::getCurrentLoginUser(true); $userId = isset($userInfo['user_id'])? intval($userInfo['user_id']) : 0; $list = $model->getIndexList($userId,$this->request->param(), (int)$pageSize); return $this->renderSuccess(compact('list')); } }