render('index'); } /** * @return string */ public function actionSubmit() { $e = new stdClass(); $e->success = false; $e->message = 'ok'; $userId = 0; $req = Yii::$app->request; $carNo = HtmlPurifier::process($req->post('carNo'), ['HTML.Allowed' => '']); $carModel = HtmlPurifier::process($req->post('carModel'), ['HTML.Allowed' => '']); $customer = HtmlPurifier::process($req->post('customer'), ['HTML.Allowed' => '']); $phone = HtmlPurifier::process($req->post('phone'), ['HTML.Allowed' => '']); $preRepair = HtmlPurifier::process($req->post('preRepair'), ['HTML.Allowed' => '']); $repairPrice = HtmlPurifier::process($req->post('repairPrice'), ['HTML.Allowed' => '']); $finishDate = HtmlPurifier::process($req->post('finishDate'), ['HTML.Allowed' => '']); $images = $req->post('images'); //echo $carNo.'_'.$carModel.'_'.$customer.'_'.$phone.'_'.$preRepair.'_'.$repairPrice.'_'.$finishDate.'_'.json_encode($images); $e->success = true; return $this->renderJson($e); } }