Commit 88358602 authored by xiabin's avatar xiabin

修改播放事件

parent 9a5ddf19
...@@ -72,9 +72,6 @@ class SiteController extends Controller ...@@ -72,9 +72,6 @@ class SiteController extends Controller
public function actions() public function actions()
{ {
return [ return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
'captcha' => [ 'captcha' => [
'class' => 'yii\captcha\CaptchaAction', 'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_DEV ? 'testme' : NULL, 'fixedVerifyCode' => YII_ENV_DEV ? 'testme' : NULL,
...@@ -88,13 +85,20 @@ class SiteController extends Controller ...@@ -88,13 +85,20 @@ class SiteController extends Controller
} }
// public function actionError() /**
// { * @return string
// $exception = Yii::$app->errorHandler->exception; */
// if ($exception !== null) { public function actionError()
// return $this->render('error', ['exception' => $exception]); {
// } $this->layout = FALSE;
// } $exception = Yii::$app->errorHandler->exception;
$name = Yii::$app->errorHandler->getExceptionName($exception);
$message = $exception->getMessage();
if ($exception !== null) {
return $this->render('error', ['name' => $name,
'message'=>$message]);
}
}
/** /**
* Logs in a user. * Logs in a user.
......
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
use yii\helpers\Html; use yii\helpers\Html;
$this->layout = FALSE;
$this->title = $name; $this->title = $name;
?> ?>
<div class="container"> <div class="container">
<div class="site-error"> <div class="site-error">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<div class="alert alert-danger"> <div class="alert alert-danger">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment