public function actionAjaxGetBorrowInfo() { $id = Yii::$app->request->post('account_id'); $type = Yii::$app->request->post('type'); $lendRecord = new LendRecord(); $rel = $lendRecord->findLendInfo($id, $type); echo json_encode($rel); // echo json_encode($type); }