request->isAjax) { Yii::$app->response->format = 'json'; $request = Yii::$app->request; $type = $request->get('type', '0'); $page = $request->get('page', 1); $limit = $request->get('limit', 10); $where = []; $where[] = ['type' => $type]; $data = AppVersion::getList($page, $limit, $where); return $data; } return $this->render('list'); } }