Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
059eefb1
Commit
059eefb1
authored
Oct 28, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改播放事件
parent
cd67bdbd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
121 additions
and
9 deletions
+121
-9
SiteController.php
src/frontend/controllers/SiteController.php
+15
-6
error.php
src/frontend/views/site/error.php
+3
-3
notfound.php
src/frontend/views/site/notfound.php
+103
-0
No files found.
src/frontend/controllers/SiteController.php
View file @
059eefb1
...
@@ -90,8 +90,15 @@ class SiteController extends Controller
...
@@ -90,8 +90,15 @@ class SiteController extends Controller
*/
*/
public
function
actionError
()
public
function
actionError
()
{
{
$this
->
layout
=
FALSE
;
$exception
=
Yii
::
$app
->
errorHandler
->
exception
;
$exception
=
Yii
::
$app
->
errorHandler
->
exception
;
if
(
$exception
->
statusCode
==
'404'
){
$name
=
Yii
::
$app
->
errorHandler
->
getExceptionName
(
$exception
);
$message
=
$exception
->
getMessage
();
if
(
$exception
!==
null
)
{
return
$this
->
render
(
'notfound'
,
[
'name'
=>
$name
,
'message'
=>
$message
]);
}
}
else
{
$name
=
Yii
::
$app
->
errorHandler
->
getExceptionName
(
$exception
);
$name
=
Yii
::
$app
->
errorHandler
->
getExceptionName
(
$exception
);
$message
=
$exception
->
getMessage
();
$message
=
$exception
->
getMessage
();
if
(
$exception
!==
null
)
{
if
(
$exception
!==
null
)
{
...
@@ -100,6 +107,8 @@ class SiteController extends Controller
...
@@ -100,6 +107,8 @@ class SiteController extends Controller
}
}
}
}
}
/**
/**
* Logs in a user.
* Logs in a user.
*
*
...
...
src/frontend/views/site/error.php
View file @
059eefb1
...
@@ -20,7 +20,7 @@ $this->title = $name;
...
@@ -20,7 +20,7 @@ $this->title = $name;
<meta
name=
"keywords"
content=
""
>
<meta
name=
"keywords"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<link
rel=
"shortcut icon"
href=
"
/favicon.ico
"
>
<link
rel=
"shortcut icon"
href=
"
<?=
\frontend\assets\AppAsset
::
getStaticUrl
(
'img/favicon.ico'
)
?>
"
>
<style>
<style>
*
{
*
{
...
@@ -89,10 +89,10 @@ $this->title = $name;
...
@@ -89,10 +89,10 @@ $this->title = $name;
<div
class=
"vertical-obj"
>
<div
class=
"vertical-obj"
>
<div
class=
"vertical-obj-cont"
>
<div
class=
"vertical-obj-cont"
>
<div
class=
"main-box"
>
<div
class=
"main-box"
>
<img
src=
"
img/404.jpg
"
>
<img
src=
"
<?=
\frontend\assets\AppAsset
::
getStaticUrl
(
'img/404.jpg'
)
?>
"
>
<p>
<p>
<span>
<?=
nl2br
(
Html
::
encode
(
$message
))
?>
</span>
<span>
<?=
nl2br
(
Html
::
encode
(
$message
))
?>
</span>
<a
href=
"
/
"
>
回首页
</a>
<a
href=
"
<?=
\yii\helpers\Url
::
base
()
?>
"
>
回首页
</a>
</p>
</p>
</div>
</div>
...
...
src/frontend/views/site/notfound.php
0 → 100644
View file @
059eefb1
<?php
/* @var $this yii\web\View */
/* @var $name string */
/* @var $message string */
/* @var $exception Exception */
use
yii\helpers\Html
;
$this
->
title
=
$name
;
?>
<!DOCTYPE html>
<html>
<head
lang=
"zh-CN"
>
<title>
<?=
Html
::
encode
(
$this
->
title
)
?>
</title>
<meta
charset=
"UTF-8"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"keywords"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<link
rel=
"shortcut icon"
href=
"
<?=
\frontend\assets\AppAsset
::
getStaticUrl
(
'img/favicon.ico'
)
?>
"
>
<style>
*
{
margin
:
0
;
padding
:
0
;
}
html
,
body
{
height
:
100%
;
width
:
100%
;
background-color
:
#f4f7f7
;
font-family
:
"Microsoft YaHei"
,
"Helvitica Neue"
,
Helvitica
,
Arial
,
"Hiragino Sans GB"
,
"Arial Regular"
,
"Microsoft JhengHei"
,
sans-serif
;
}
.vertical-obj
{
display
:
table
;
width
:
100%
;
height
:
100%
;
min-height
:
100%
;
text-align
:
center
;
}
.vertical-obj
.vertical-obj-cont
{
display
:
table-cell
;
vertical-align
:
middle
;
}
.main-box
{
position
:
relative
;
display
:
inline-block
;
background-color
:
#f4f7f7
;
box-shadow
:
0
0
80px
rgba
(
0
,
0
,
0
,
.05
);
}
.main-box
p
{
position
:
absolute
;
display
:
block
;
width
:
100%
;
text-align
:
center
;
top
:
50%
;
left
:
0
;
}
.main-box
p
span
{
display
:
block
;
color
:
#999
;
font-size
:
12px
;
padding-top
:
40px
;
}
.main-box
p
a
{
display
:
inline-block
;
padding
:
0
30px
;
height
:
30px
;
background-color
:
#f7cf89
;
color
:
#fff
;
text-align
:
center
;
line-height
:
30px
;
text-decoration
:
none
;
font-size
:
12px
;
margin-top
:
30px
;
}
.main-box
p
a
:hover
{
background-color
:
#f6c269
;
color
:
#fff
;
}
.main-box
img
{
max-width
:
690px
;
}
</style>
</head>
<body>
<div
class=
"vertical-obj"
>
<div
class=
"vertical-obj-cont"
>
<div
class=
"main-box"
>
<img
src=
"
<?=
\frontend\assets\AppAsset
::
getStaticUrl
(
'img/404.jpg'
)
?>
"
>
<p>
<span>
<?=
nl2br
(
Html
::
encode
(
$message
))
?>
</span>
<a
href=
"
<?=
\yii\helpers\Url
::
base
()
?>
"
>
回首页
</a>
</p>
</div>
</div>
</div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment