浏览代码

完成404错误页面

daxiong.yang 7 年之前
父节点
当前提交
be87df7d69
共有 4 个文件被更改,包括 57 次插入4 次删除
  1. 2 1
      src/assets/scss/_base.scss
  2. 54 1
      src/views/error/404.vue
  3. 0 1
      src/views/login/index.vue
  4. 1 1
      static/config/index.js

+ 2 - 1
src/assets/scss/_base.scss

@ -8,7 +8,7 @@ body {
8 8
  font-size: 14px;
9 9
  line-height: 1.15;
10 10
  color: #333;
11
  background-color: #f0f0f0;
11
  background-color: #fff;
12 12
}
13 13
*,
14 14
:focus {
@ -51,6 +51,7 @@ img {
51 51
.site-wrapper {
52 52
  position: relative;
53 53
  min-width: 1180px;
54
  background: #f0f0f0;
54 55
}
55 56
56 57
/* site-sidebar-collapse */

+ 54 - 1
src/views/error/404.vue

@ -1,8 +1,61 @@
1 1
<template>
2
  <div>404</div>
2
  <div class="site-wrapper site-page--not-found">
3
    <div class="site-content__wrapper">
4
      <div class="site-content">
5
        <h2 class="not-found-title">400</h2>
6
        <p class="not-found-desc">抱歉!您访问的页面<em>失联</em>啦 ...</p>
7
        <el-button @click="$router.go(-1)">返回上一页</el-button>
8
        <el-button type="primary" class="not-found-btn-gohome" @click="$router.push({ name: 'home' })">进入首页</el-button>
9
      </div>
10
    </div>
11
  </div>
3 12
</template>
4 13
5 14
<script>
6 15
  export default {
7 16
  }
8 17
</script>
18
19
<style lang="scss">
20
  .site-wrapper.site-page--not-found {
21
    position: absolute;
22
    top: 0;
23
    right: 0;
24
    bottom: 0;
25
    left: 0;
26
    background-color: #fff;
27
    overflow: hidden;
28
    .site-content__wrapper {
29
      padding: 0;
30
      margin: 0;
31
    }
32
    .site-content {
33
      position: fixed;
34
      top: 15%;
35
      left: 50%;
36
      z-index: 2;
37
      padding: 30px;
38
      text-align: center;
39
      transform: translate(-50%, 0);
40
    }
41
    .not-found-title {
42
      margin: 20px 0 15px;
43
      font-size: 10em;
44
      font-weight: 400;
45
      color: rgb(55, 71, 79);
46
    }
47
    .not-found-desc {
48
      margin: 0 0 30px;
49
      font-size: 26px;
50
      text-transform: uppercase;
51
      color: rgb(118, 131, 143);
52
      > em {
53
        font-style: normal;
54
        color: #ee8145;
55
      }
56
    }
57
    .not-found-btn-gohome {
58
      margin-left: 30px;
59
    }
60
  }
61
</style>

+ 0 - 1
src/views/login/index.vue

@ -173,4 +173,3 @@
173 173
    }
174 174
  }
175 175
</style>
176

+ 1 - 1
static/config/index.js

@ -4,7 +4,7 @@
4 4
;(function () {
5 5
  window.SITE_CONFIG = {}
6 6
  // api接口请求地址
7
  window.SITE_CONFIG.baseUrl = '//demo.renren.io/renren-fast/'
7
  window.SITE_CONFIG.baseUrl = '//dev.demo.renren.io/renren-fast/'
8 8
9 9
  // 嵌套iframe地址
10 10
  window.SITE_CONFIG.nestIframeUrl = '//demo.renren.io/renren-fast/'