Showing
5 changed files
with
59 additions
and
6 deletions
1 | +{{> layout/header}} | ||
2 | +{{#if errorPage}} | ||
3 | +<div class="err-page err-404 screen"> | ||
4 | + <div class="tips-404"> | ||
5 | + <p class="tip">很抱歉,您访问的页面不存在!</p> | ||
6 | + <p class="links"> | ||
7 | + <a href="{{newProductLink}}">浏览新品</a> | ||
8 | + | ||
9 | + <a href="http://www.yohobuy.com/">返回首页</a> | ||
10 | + </p> | ||
11 | + </div> | ||
12 | +</div> | ||
13 | +{{/if}} | ||
14 | +{{> layout/footer}} |
web-static/img/404.png
0 → 100644

46.6 KB
web-static/sass/_error.scss
0 → 100644
1 | +/* | ||
2 | + * @description: 404页面 | ||
3 | + * @author: chenglong.wang@yoho.cn | ||
4 | + * @time: 2015/12/17 | ||
5 | + */ | ||
6 | + | ||
7 | +.err-page { | ||
8 | + width: 650px; | ||
9 | + height: 200px; | ||
10 | + overflow: hidden; | ||
11 | + margin: 100px auto; | ||
12 | + | ||
13 | + &:before { | ||
14 | + content: ''; | ||
15 | + display: block; | ||
16 | + width: 200px; | ||
17 | + height: 200px; | ||
18 | + background: image_url('404.png') center center no-repeat; | ||
19 | + float: left; | ||
20 | + } | ||
21 | + | ||
22 | + .tips-404 { | ||
23 | + float: left; | ||
24 | + height: 200px; | ||
25 | + padding-left: 20px; | ||
26 | + | ||
27 | + .tip { | ||
28 | + font-size: 24px; | ||
29 | + color: #000; | ||
30 | + margin-top: 55px; | ||
31 | + } | ||
32 | + | ||
33 | + .links { | ||
34 | + font-size: 12px; | ||
35 | + color: #666; | ||
36 | + margin-top: 15px; | ||
37 | + } | ||
38 | + } | ||
39 | +} |
@@ -21,6 +21,7 @@ class ErrorController extends AbstractAction | @@ -21,6 +21,7 @@ class ErrorController extends AbstractAction | ||
21 | 21 | ||
22 | public function errorAction($exception) | 22 | public function errorAction($exception) |
23 | { | 23 | { |
24 | + | ||
24 | header('HTTP/1.1 404 Not Found'); | 25 | header('HTTP/1.1 404 Not Found'); |
25 | header('Status: 404 Not Found'); | 26 | header('Status: 404 Not Found'); |
26 | 27 | ||
@@ -31,12 +32,11 @@ class ErrorController extends AbstractAction | @@ -31,12 +32,11 @@ class ErrorController extends AbstractAction | ||
31 | $this->setTitle('页面不存在'); | 32 | $this->setTitle('页面不存在'); |
32 | $this->setNavHeader('抱歉,页面不存在!', true, SITE_MAIN); | 33 | $this->setNavHeader('抱歉,页面不存在!', true, SITE_MAIN); |
33 | 34 | ||
34 | - // 生成HTML (error.html) | ||
35 | - $this->_view->html('error'); | ||
36 | - // 渲染模板 | ||
37 | $this->_view->display('index', array( | 35 | $this->_view->display('index', array( |
38 | - 'pageFooter' => true, | ||
39 | - 'showDownloadApp' => true, | 36 | + 'errorPage' => array( |
37 | + 'newProductLink' => '###' | ||
38 | + ), | ||
39 | + 'pageFooter' => true | ||
40 | )); | 40 | )); |
41 | } | 41 | } |
42 | 42 |
-
Please register or login to post a comment