فهرست منبع

新增errorPage layout

yangc 8 سال پیش
والد
کامیت
61aa552c7a
2فایلهای تغییر یافته به همراه46 افزوده شده و 1 حذف شده
  1. 45 0
      layouts/errorPage.vue
  2. 1 1
      pages/error/index.vue

+ 45 - 0
layouts/errorPage.vue

@@ -0,0 +1,45 @@
+<template>
+  <div class="error">
+    <div class="section">
+      <div class="container">
+        <div class="btn-click">
+          <a href="/"><i class="fa fa-home" style="margin-right:5px;"></i>返回首页</a>
+          <a href="javascript:history.go(-1)"><i class="fa fa-reply" style="margin-right:5px;"></i>返回上一页</a>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: ['error']
+  }
+</script>
+
+<style scoped lang="scss">
+  .section{
+    background: #ebfdff url('/images/404.png')no-repeat center center;
+    height:900px;
+    position:relative;
+  }
+  .section .btn-click{
+    position:absolute;
+    top:54%;
+    left:50%;
+    margin-left:-150px;
+  }
+  .section .btn-click a{
+    display:inline-block;
+    width:130px;
+    height:33px;
+    font-size: 16px;
+    line-height: 33px;
+    color:#fff;
+    background: #f87c29;
+    text-align: center;
+    margin:0 10px;
+    border-radius: 2px;
+    text-decoration: none;
+  }
+</style>

+ 1 - 1
pages/error/index.vue

@@ -4,6 +4,6 @@
 <script>
   export default {
     name: 'error',
-    layout: 'error'
+    layout: 'errorPage'
   }
 </script>