Browse Source

登录加载

luyanan 6 years ago
parent
commit
f47aa6eb8b
6 changed files with 14 additions and 158 deletions
  1. BIN
      favicon.ico
  2. 0 140
      src/components/PanThumb/index.vue
  3. 3 4
      src/permission.js
  4. 1 0
      src/styles/index.scss
  5. 3 3
      src/views/404.vue
  6. 7 11
      src/views/dashboard/admin/index.vue

BIN
favicon.ico


+ 0 - 140
src/components/PanThumb/index.vue

@ -1,140 +0,0 @@
1
<template>
2
  <div class="pan-item" :style="{zIndex:zIndex,height:height,width:width}">
3
    <div class="pan-info">
4
      <div class="pan-info-roles-container">
5
        <slot></slot>
6
      </div>
7
    </div>
8
    <img class="pan-thumb" :src="image">
9
  </div>
10
</template>
11
12
<script>
13
export default {
14
  name: 'PanThumb',
15
  props: {
16
    image: {
17
      type: String,
18
      required: true
19
    },
20
    zIndex: {
21
      type: Number,
22
      default: 1
23
    },
24
    width: {
25
      type: String,
26
      default: '150px'
27
    },
28
    height: {
29
      type: String,
30
      default: '150px'
31
    }
32
  }
33
}
34
</script>
35
36
<style scoped>
37
.pan-item {
38
  width: 200px;
39
  height: 200px;
40
  border-radius: 50%;
41
  display: inline-block;
42
  position: relative;
43
  cursor: default;
44
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
45
}
46
47
.pan-info-roles-container {
48
  padding: 20px;
49
  text-align: center;
50
}
51
52
.pan-thumb {
53
  width: 100%;
54
  height: 100%;
55
  background-size: 100%;
56
  border-radius: 50%;
57
  overflow: hidden;
58
  position: absolute;
59
  transform-origin: 95% 40%;
60
  transition: all 0.3s ease-in-out;
61
}
62
63
.pan-thumb:after {
64
  content: '';
65
  width: 8px;
66
  height: 8px;
67
  position: absolute;
68
  border-radius: 50%;
69
  top: 40%;
70
  left: 95%;
71
  margin: -4px 0 0 -4px;
72
  background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
73
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
74
}
75
76
.pan-info {
77
  position: absolute;
78
  width: inherit;
79
  height: inherit;
80
  border-radius: 50%;
81
  overflow: hidden;
82
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
83
}
84
85
.pan-info h3 {
86
  color: #fff;
87
  text-transform: uppercase;
88
  position: relative;
89
  letter-spacing: 2px;
90
  font-size: 18px;
91
  margin: 0 60px;
92
  padding: 22px 0 0 0;
93
  height: 85px;
94
  font-family: 'Open Sans', Arial, sans-serif;
95
  text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
96
}
97
98
.pan-info p {
99
  color: #fff;
100
  padding: 10px 5px;
101
  font-style: italic;
102
  margin: 0 30px;
103
  font-size: 12px;
104
  border-top: 1px solid rgba(255, 255, 255, 0.5);
105
}
106
107
.pan-info p a {
108
  display: block;
109
  color: #333;
110
  width: 80px;
111
  height: 80px;
112
  background: rgba(255, 255, 255, 0.3);
113
  border-radius: 50%;
114
  color: #fff;
115
  font-style: normal;
116
  font-weight: 700;
117
  text-transform: uppercase;
118
  font-size: 9px;
119
  letter-spacing: 1px;
120
  padding-top: 24px;
121
  margin: 7px auto 0;
122
  font-family: 'Open Sans', Arial, sans-serif;
123
  opacity: 0;
124
  transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
125
  transform: translateX(60px) rotate(90deg);
126
}
127
128
.pan-info p a:hover {
129
  background: rgba(255, 255, 255, 0.5);
130
}
131
132
.pan-item:hover .pan-thumb {
133
  transform: rotate(-110deg);
134
}
135
136
.pan-item:hover .pan-info p a {
137
  opacity: 1;
138
  transform: translateX(0px) rotate(0deg);
139
}
140
</style>

+ 3 - 4
src/permission.js

@ -8,7 +8,7 @@ import { getCookiesName } from '@/utils/auth' // 验权
8 8
NProgress.configure({ showSpinner: false })// NProgress Configuration
9 9
10 10
function hasPermission(roles, permissionRoles) {
11
  if (roles.indexOf('1') >= 0) return true // admin permission passed directly
11
  if (roles.indexOf('1') >= 0) return true
12 12
  if (!permissionRoles) return true
13 13
  return roles.some(role => permissionRoles.indexOf(role) >= 0)
14 14
}
@ -37,10 +37,9 @@ router.beforeEach((to, from, next) => {
37 37
            })
38 38
          })
39 39
        } else {
40
          console.log(4444)
40 41
          if (hasPermission(store.getters.roles, to.meta.roles)) {
41
            next()//
42
          } else {
43
            next({ path: '/401', replace: true, query: { noGoBack: true }})
42
            next()
44 43
          }
45 44
        }
46 45
      }

+ 1 - 0
src/styles/index.scss

@ -6,6 +6,7 @@
6 6
7 7
body {
8 8
  height: 100%;
9
  min-width:600px;
9 10
  -moz-osx-font-smoothing: grayscale;
10 11
  -webkit-font-smoothing: antialiased;
11 12
  text-rendering: optimizeLegibility;

+ 3 - 3
src/views/404.vue

@ -8,10 +8,10 @@
8 8
        <img class="pic-404__child right" :src="img_404_cloud" alt="404">
9 9
      </div>
10 10
      <div class="bullshit">
11
        <div class="bullshit__oops">OOPS!</div>
11
        <!-- <div class="bullshit__oops">OOPS!</div>
12 12
        <div class="bullshit__info">版权所有
13 13
          <a class='link-type' href='https://wallstreetcn.com' target='_blank'>华尔街见闻</a>
14
        </div>
14
        </div> -->
15 15
        <div class="bullshit__headline">{{ message }}</div>
16 16
        <div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
17 17
        <a href="" class="bullshit__return-home">返回首页</a>
@ -34,7 +34,7 @@ export default {
34 34
  },
35 35
  computed: {
36 36
    message() {
37
      return '管说这个页面你不能进......'
37
      return '管理员说这个页面你不能进......'
38 38
    }
39 39
  }
40 40
}

+ 7 - 11
src/views/dashboard/admin/index.vue

@ -1,6 +1,6 @@
1 1
<template>
2 2
  <div class="dashboard-editor-container">
3
    超级管理员,欢迎您
3
    <p class="plat-tit">欢迎使用声脉桥梁云监控平台</p>
4 4
  </div>
5 5
</template>
6 6
@ -9,24 +9,20 @@
9 9
export default {
10 10
  name: 'dashboard-admin',
11 11
  created() {
12
    this.toPath()
12
    // this.toPath()
13 13
  },
14 14
  methods: {
15
    toPath() {
16
      this.$router.push({ name: 'infoManage' })
17
    }
15
    // toPath() {
16
    //   this.$router.push({ name: 'infoManage' })
17
    // }
18 18
  }
19 19
}
20 20
</script>
21 21
22 22
<style rel="stylesheet/scss" lang="scss" scoped>
23 23
.dashboard-editor-container {
24
  padding: 32px;
25
  background-color: rgb(240, 242, 245);
26
  .chart-wrapper {
27
    background: #fff;
28
    padding: 16px 16px 0;
29
    margin-bottom: 32px;
24
  .plat-tit{
25
    font-size: 34px;
30 26
  }
31 27
}
32 28
</style>