/** * 参与的笔记页面 * * @return mixed */ public function actionNote($id) { $query = new Query(); $idIn = $query->select(['noteId'])->from('notecomment')->where(['userId' => $id])->groupBy('noteId'); $result = Main::getByQuery($idIn, Yii::$app->request->post('page')); if (Yii::$app->request->post('page')) { echo Main::getUserData($result, Yii::$app->request->post('page')); } else { return $this->render('index', ['message' => Main::getUserData($result, Yii::$app->request->post('page')), 'title' => '参与的文章']); } }