public function main()
{
date_default_timezone_set('PRC');
$this->registerServices();
$this->debugger->start();
// $this->logger->debug('start');
// $this->useImplicitView(false);
try {
$this->handle();
} catch (NotFoundException $e) {
$this->notFoundException($e);
} catch (\ManaPHP\Security\Captcha\Exception $e) {
if ($this->request->isAjax()) {
$this->response->setJsonContent(['code' => __LINE__, 'error' => 'capcha is wrong.']);
}
}
$this->response->send();
}