request->isAjax && \Yii::$app->request->isGet) { $data = Yii::$app->request->get(); $valid = Yii::$app->services->validate->validate($data, [ [['limit', 'page'], 'integer'], [['keyword'], 'string'], ]); if ($valid === false) return $this->error(Yii::$app->services->validate->getErrorMessage()); return $this->success(); } return $this->render('index',[]); } public function actionImport() { $ret = (new CategoryService())->find($this->mall_id); return is_string($ret) ? $this->error($ret) : $this->success('后台导入中...'); } }