Authored by 沈志敏

fix bug

@@ -19,8 +19,8 @@ exports.notFound = () => { @@ -19,8 +19,8 @@ exports.notFound = () => {
19 module: 'common', 19 module: 'common',
20 page: 'error', 20 page: 'error',
21 title: '页面不存在 | YOHO!BLK | 潮流购物逛不停', 21 title: '页面不存在 | YOHO!BLK | 潮流购物逛不停',
22 - pageFooter: true,  
23 - isErr: true 22 + noLocalJS: true,
  23 + noLocalCSS: true
24 }); 24 });
25 }; 25 };
26 }; 26 };
@@ -45,12 +45,11 @@ exports.serverError = () => { @@ -45,12 +45,11 @@ exports.serverError = () => {
45 } 45 }
46 46
47 return res.render('error/500', { 47 return res.render('error/500', {
48 - err: err,  
49 module: 'common', 48 module: 'common',
50 page: 'error', 49 page: 'error',
51 title: '服务器错误 | YOHO!BLK | 潮流购物逛不停', 50 title: '服务器错误 | YOHO!BLK | 潮流购物逛不停',
52 - pageFooter: true,  
53 - isErr: true 51 + noLocalJS: true,
  52 + noLocalCSS: true
54 }); 53 });
55 } 54 }
56 next(err); 55 next(err);
1 <div class="err-page yoho-page"> 1 <div class="err-page yoho-page">
2 - <h1>404</h1> 2 + <div class="err-status">
  3 + <div class="err-404"></div>
  4 + </div>
  5 + <div class="tips">
  6 + <span class="tip">哎呀,您访问的页面走丢了...</span>
  7 + <span class="tips-english">404 File Not Found, Sorry</span>
  8 + <a class="home" href="/">回到首页</a>
  9 + </div>
3 </div> 10 </div>
1 <div class="err-page yoho-page"> 1 <div class="err-page yoho-page">
2 - <h1>500</h1> 2 + <div class="err-status">
  3 + <div class="err-500"></div>
  4 + </div>
  5 + <div class="tips">
  6 + <span class="tip">哎呀,程序出错了...</span>
  7 + <span class="tips-english">500- Server Internal Error</span>
  8 + <a class="home" href="/">回到首页</a>
  9 + </div>
3 </div> 10 </div>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
  3 +<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  4 + viewBox="0 0 243.422 102.159" enable-background="new 0 0 243.422 102.159" xml:space="preserve">
  5 +<g id="XMLID_16_">
  6 + <path id="XMLID_2_" fill="#3B95C8" d="M56.974,1.928v70.768h18.478V76H56.974v24.231h-3.359V76H0v-3.442l53.194-70.63H56.974z
  7 + M3.92,72.695h49.694V7.298h-0.42L3.92,72.695z"/>
  8 + <path id="XMLID_5_" fill="#040000" d="M148.238,17.485c3.919,8.536,6.019,19.688,6.019,33.595c0,13.768-2.1,25.058-6.019,33.594
  9 + c-5.459,11.564-14.278,17.485-26.597,17.485c-12.318,0-21.277-5.921-26.597-17.485c-3.92-8.536-5.879-19.688-5.879-33.594
  10 + c0-14.044,1.959-25.196,5.879-33.595C100.364,5.783,109.323,0,121.641,0C133.96,0,142.779,5.783,148.238,17.485z M98.124,19
  11 + c-3.78,7.985-5.6,18.587-5.6,32.08c0,13.354,1.82,24.094,5.6,32.079c4.899,10.464,12.738,15.695,23.517,15.695
  12 + c10.639,0,18.478-5.231,23.518-15.695c3.779-8.123,5.739-18.862,5.739-32.079c0-13.355-1.96-24.095-5.739-32.08
  13 + c-5.04-10.464-12.878-15.695-23.518-15.695C110.862,3.305,103.023,8.536,98.124,19z"/>
  14 + <path id="XMLID_8_" fill="#3B95C8" d="M224.944,1.928v70.768h18.478V76h-18.478v24.231h-3.359V76h-53.614v-3.442l53.194-70.63
  15 + H224.944z M171.891,72.695h49.694V7.298h-0.42L171.891,72.695z"/>
  16 +</g>
  17 +</svg>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
  3 +<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  4 + viewBox="0 0 232.923 102.159" enable-background="new 0 0 232.923 102.159" xml:space="preserve">
  5 +<g id="XMLID_27_">
  6 + <path id="XMLID_2_" fill="#3B95C8" d="M61.593,1.928v3.305H11.059L7,47.638h0.56c2.799-3.718,6.439-6.608,11.199-8.674
  7 + c4.339-1.928,8.959-2.892,13.718-2.892c9.519,0,17.218,2.754,23.097,8.398c6.16,5.921,9.239,14.181,9.239,24.783
  8 + c0,9.361-3.08,17.21-9.239,23.543c-6.159,6.195-13.998,9.362-23.657,9.362c-8.399,0-15.398-2.341-21.138-6.746
  9 + C4.34,90.456,0.7,83.572,0,74.898h3.5c0.56,7.572,3.779,13.63,9.519,18.036c5.18,3.992,11.479,6.058,18.898,6.058
  10 + c8.679,0,15.678-2.892,21.278-8.536c5.459-5.782,8.259-12.804,8.259-21.202c0-9.638-2.8-17.21-8.259-22.442
  11 + c-5.319-5.094-12.179-7.572-20.718-7.572c-5.459,0-10.499,1.377-15.258,4.13c-4.759,2.754-8.399,6.472-10.639,11.152h-3.5
  12 + L7.839,1.928H61.593z"/>
  13 + <path id="XMLID_4_" fill="#040000" d="M142.919,17.485c3.919,8.536,6.019,19.688,6.019,33.595c0,13.767-2.1,25.057-6.019,33.593
  14 + c-5.459,11.564-14.278,17.485-26.597,17.485c-12.318,0-21.277-5.921-26.597-17.485c-3.92-8.536-5.879-19.688-5.879-33.593
  15 + c0-14.044,1.959-25.196,5.879-33.595C95.044,5.783,104.003,0,116.322,0C128.641,0,137.459,5.783,142.919,17.485z M92.805,19
  16 + c-3.78,7.985-5.6,18.587-5.6,32.08c0,13.354,1.82,24.093,5.6,32.079c4.899,10.464,12.738,15.695,23.517,15.695
  17 + c10.639,0,18.478-5.231,23.518-15.695c3.779-8.123,5.739-18.862,5.739-32.079c0-13.355-1.96-24.095-5.739-32.08
  18 + C134.8,8.536,126.961,3.305,116.322,3.305C105.543,3.305,97.704,8.536,92.805,19z"/>
  19 + <path id="XMLID_7_" fill="#040000" d="M226.904,17.485c3.919,8.536,6.019,19.688,6.019,33.595c0,13.767-2.1,25.057-6.019,33.593
  20 + c-5.46,11.564-14.278,17.485-26.598,17.485c-12.318,0-21.277-5.921-26.597-17.485c-3.92-8.536-5.879-19.688-5.879-33.593
  21 + c0-14.044,1.959-25.196,5.879-33.595C179.029,5.783,187.988,0,200.307,0C212.626,0,221.444,5.783,226.904,17.485z M176.79,19
  22 + c-3.78,7.985-5.6,18.587-5.6,32.08c0,13.354,1.819,24.093,5.6,32.079c4.899,10.464,12.738,15.695,23.517,15.695
  23 + c10.639,0,18.479-5.231,23.518-15.695c3.779-8.123,5.739-18.862,5.739-32.079c0-13.355-1.96-24.095-5.739-32.08
  24 + c-5.039-10.464-12.879-15.695-23.518-15.695C189.528,3.305,181.689,8.536,176.79,19z"/>
  25 +</g>
  26 +</svg>
  1 +.err-page {
  2 + width: 100%;
  3 + height: 100%;
  4 + background: #fff;
  5 +
  6 + .err-status {
  7 + position: fixed;
  8 + top: 401px;
  9 + left: 0;
  10 + right: 0;
  11 + margin-left: auto;
  12 + margin-right: auto;
  13 +
  14 + .err-404 {
  15 + width: 300px;
  16 + height: 126px;
  17 + background: resolve("error/404.svg") no-repeat;
  18 + margin: 0 auto;
  19 + }
  20 +
  21 + .err-500 {
  22 + width: 300px;
  23 + height: 126px;
  24 + background: resolve("error/500.svg") no-repeat;
  25 + margin: 0 auto;
  26 + }
  27 + }
  28 +
  29 + .tips {
  30 + position: fixed;
  31 + top: 600px;
  32 + left: 0;
  33 + right: 0;
  34 + width: 100%;
  35 + margin: 0 auto;
  36 + text-align: center;
  37 +
  38 + a,
  39 + span {
  40 + display: block;
  41 + }
  42 +
  43 + .tip {
  44 + font-size: 38px;
  45 + color: #b0b0b0;
  46 + }
  47 +
  48 + .tips-english {
  49 + font-size: 22px;
  50 + color: #b0b0b0;
  51 + margin-top: 20px;
  52 + }
  53 +
  54 + .home {
  55 + width: 65%;
  56 + margin: 0 auto;
  57 + margin-top: 80px;
  58 + height: 100px;
  59 + color: #fff;
  60 + background: #000;
  61 + text-align: center;
  62 + font-size: 28px;
  63 + line-height: 100px;
  64 + }
  65 + }
  66 +}
@@ -12,3 +12,4 @@ @@ -12,3 +12,4 @@
12 @import "modal"; 12 @import "modal";
13 @import "loading"; 13 @import "loading";
14 @import "select"; 14 @import "select";
  15 +@import "error";