Pan il y a 7 ans
Parent
commit
c51c7fec5f

Fichier diff supprimé car celui-ci est trop grand
+ 23 - 13
src/components/Hamburger/index.vue


+ 9 - 7
src/router/index.js

1
 import Vue from 'vue';
1
 import Vue from 'vue';
2
 import Router from 'vue-router';
2
 import Router from 'vue-router';
3
 const _import = require('./_import_' + process.env.NODE_ENV);
3
 const _import = require('./_import_' + process.env.NODE_ENV);
4
-// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow
4
+// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow.so only in production use Lazy Loading
5
-// so only in production use Lazy Loading
6
 
5
 
7
 /* layout */
6
 /* layout */
8
 import Layout from '../views/layout/Layout';
7
 import Layout from '../views/layout/Layout';
16
 /* error page */
15
 /* error page */
17
 const Err404 = _import('404');
16
 const Err404 = _import('404');
18
 
17
 
18
+/* demo page */
19
 const Form = _import('page/form');
19
 const Form = _import('page/form');
20
 const Table = _import('table/index');
20
 const Table = _import('table/index');
21
 
21
 
23
 
23
 
24
  /**
24
  /**
25
   * icon : the icon show in the sidebar
25
   * icon : the icon show in the sidebar
26
-  * hidden : if hidden:true will not show in the sidebar
26
+  * hidden : if `hidden:true` will not show in the sidebar
27
-  * redirect : if redirect:noredirect will not redirct in the levelbar
27
+  * redirect : if `redirect:noredirect` will not redirct in the levelbar
28
-  * noDropdown : if noDropdown:true will not has submenu
28
+  * noDropdown : if `noDropdown:true` will not has submenu in the sidebar
29
-  * meta : { role: ['admin'] }  will control the page role
29
+  * meta : `{ role: ['admin'] }`  will control the page role
30
   **/
30
   **/
31
 export const constantRouterMap = [
31
 export const constantRouterMap = [
32
   { path: '/login', component: Login, hidden: true },
32
   { path: '/login', component: Login, hidden: true },
35
     path: '/',
35
     path: '/',
36
     component: Layout,
36
     component: Layout,
37
     redirect: '/dashboard',
37
     redirect: '/dashboard',
38
-    name: '首页',
38
+    name: 'Home',
39
     hidden: true,
39
     hidden: true,
40
     children: [{ path: 'dashboard', component: dashboard }]
40
     children: [{ path: 'dashboard', component: dashboard }]
41
   }
41
   }
58
       { path: 'index', component: Form, name: 'Form', icon: 'zonghe' }
58
       { path: 'index', component: Form, name: 'Form', icon: 'zonghe' }
59
     ]
59
     ]
60
   },
60
   },
61
+
61
   {
62
   {
62
     path: '/table',
63
     path: '/table',
63
     component: Layout,
64
     component: Layout,
67
     noDropdown: true,
68
     noDropdown: true,
68
     children: [{ path: 'index', component: Table, name: 'Table', meta: { role: ['admin'] } }]
69
     children: [{ path: 'index', component: Table, name: 'Table', meta: { role: ['admin'] } }]
69
   },
70
   },
71
+
70
   { path: '*', redirect: '/404', hidden: true }
72
   { path: '*', redirect: '/404', hidden: true }
71
 ];
73
 ];

+ 0 - 25
src/store/modules/user.js

56
       });
56
       });
57
     },
57
     },
58
 
58
 
59
-    // 第三方验证登录
60
-    LoginByThirdparty({ commit, state }, code) {
61
-      return new Promise((resolve, reject) => {
62
-        commit('SET_CODE', code);
63
-        loginByThirdparty(state.status, state.email, state.code, state.auth_type).then(response => {
64
-          commit('SET_TOKEN', response.data.token);
65
-          Cookies.set('Admin-Token', response.data.token);
66
-          resolve();
67
-        }).catch(error => {
68
-          reject(error);
69
-        });
70
-      });
71
-    },
72
-
73
-
74
     // 登出
59
     // 登出
75
     LogOut({ commit, state }) {
60
     LogOut({ commit, state }) {
76
       return new Promise((resolve, reject) => {
61
       return new Promise((resolve, reject) => {
92
         Cookies.remove('Admin-Token');
77
         Cookies.remove('Admin-Token');
93
         resolve();
78
         resolve();
94
       });
79
       });
95
-    },
96
-
97
-    // 动态修改权限
98
-    ChangeRole({ commit }, role) {
99
-      return new Promise(resolve => {
100
-        commit('SET_ROLES', [role]);
101
-        commit('SET_TOKEN', role);
102
-        Cookies.set('Admin-Token', role);
103
-        resolve();
104
-      })
105
     }
80
     }
106
   }
81
   }
107
 };
82
 };

+ 4 - 5
src/utils/fetch.js

1
 import axios from 'axios';
1
 import axios from 'axios';
2
 import { Message } from 'element-ui';
2
 import { Message } from 'element-ui';
3
 import store from '../store';
3
 import store from '../store';
4
-// import router from '../router';
4
+
5
 
5
 
6
 // 创建axios实例
6
 // 创建axios实例
7
 const service = axios.create({
7
 const service = axios.create({
11
 
11
 
12
 // request拦截器
12
 // request拦截器
13
 service.interceptors.request.use(config => {
13
 service.interceptors.request.use(config => {
14
-  // Do something before request is sent
15
   if (store.getters.token) {
14
   if (store.getters.token) {
16
-    config.headers['X-Token'] = store.getters.token; // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改
15
+    config.headers['X-Token'] = store.getters.token; // 让每个请求携带自定义token 请根据实际情况自行修改
17
   }
16
   }
18
   return config;
17
   return config;
19
 }, error => {
18
 }, error => {
26
 service.interceptors.response.use(
25
 service.interceptors.response.use(
27
   response => {
26
   response => {
28
   /**
27
   /**
29
-  * 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
28
+  * code为非20000是抛错 可结合自己业务进行修改
30
-  * 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中
31
   */
29
   */
32
     const res = response.data;
30
     const res = response.data;
33
     if (res.code !== 20000) {
31
     if (res.code !== 20000) {
36
         type: 'error',
34
         type: 'error',
37
         duration: 5 * 1000
35
         duration: 5 * 1000
38
       });
36
       });
37
+
39
       // 50008:非法的token; 50012:其他客户端登录了;  50014:Token 过期了;
38
       // 50008:非法的token; 50012:其他客户端登录了;  50014:Token 过期了;
40
       if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
39
       if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
41
         MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', {
40
         MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', {

+ 0 - 12
src/utils/index.js

56
      return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
56
      return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
57
    }
57
    }
58
  }
58
  }
59
-
60
- export function scrollTo(element, to, duration) {
61
-   if (duration <= 0) return;
62
-   const difference = to - element.scrollTop;
63
-   const perTick = difference / duration * 10;
64
-   setTimeout(() => {
65
-     console.log(new Date())
66
-     element.scrollTop = element.scrollTop + perTick;
67
-     if (element.scrollTop === to) return;
68
-     scrollTo(element, to, duration - 10);
69
-   }, 10);
70
- }

+ 162 - 161
src/views/404.vue

38
 </script>
38
 </script>
39
 
39
 
40
 <style rel="stylesheet/scss" lang="scss" scoped>
40
 <style rel="stylesheet/scss" lang="scss" scoped>
41
-  .wscn-http404 {
41
+.wscn-http404 {
42
+  position: relative;
43
+  width: 1200px;
44
+  margin: 20px auto 60px;
45
+  padding: 0 100px;
46
+  overflow: hidden;
47
+  .pic-404 {
42
     position: relative;
48
     position: relative;
43
-    width: 1200px;
49
+    float: left;
44
-    margin: 20px auto 60px;
50
+    width: 600px;
45
-    padding: 0 100px;
51
+    padding: 150px 0;
46
     overflow: hidden;
52
     overflow: hidden;
47
-    .pic-404 {
53
+    &__parent {
48
-      position: relative;
54
+      width: 100%;
49
-      float: left;
55
+    }
50
-      width: 600px;
56
+    &__child {
51
-      padding: 150px 0;
57
+      position: absolute;
52
-      overflow: hidden;
58
+      &.left {
53
-      &__parent {
59
+        width: 80px;
54
-        width: 100%;
60
+        top: 17px;
61
+        left: 220px;
62
+        opacity: 0;
63
+        animation-name: cloudLeft;
64
+        animation-duration: 2s;
65
+        animation-timing-function: linear;
66
+        animation-fill-mode: forwards;
67
+        animation-delay: 1s;
55
       }
68
       }
56
-      &__child {
69
+      &.mid {
57
-        position: absolute;
70
+        width: 46px;
58
-        &.left {
71
+        top: 10px;
59
-          width: 80px;
72
+        left: 420px;
73
+        opacity: 0;
74
+        animation-name: cloudMid;
75
+        animation-duration: 2s;
76
+        animation-timing-function: linear;
77
+        animation-fill-mode: forwards;
78
+        animation-delay: 1.2s;
79
+      }
80
+      &.right {
81
+        width: 62px;
82
+        top: 100px;
83
+        left: 500px;
84
+        opacity: 0;
85
+        animation-name: cloudRight;
86
+        animation-duration: 2s;
87
+        animation-timing-function: linear;
88
+        animation-fill-mode: forwards;
89
+        animation-delay: 1s;
90
+      }
91
+      @keyframes cloudLeft {
92
+        0% {
60
           top: 17px;
93
           top: 17px;
61
           left: 220px;
94
           left: 220px;
62
           opacity: 0;
95
           opacity: 0;
63
-          animation-name: cloudLeft;
64
-          animation-duration: 2s;
65
-          animation-timing-function: linear;
66
-          animation-fill-mode: forwards;
67
-          animation-delay: 1s;
68
         }
96
         }
69
-        &.mid {
97
+        20% {
70
-          width: 46px;
98
+          top: 33px;
99
+          left: 188px;
100
+          opacity: 1;
101
+        }
102
+        80% {
103
+          top: 81px;
104
+          left: 92px;
105
+          opacity: 1;
106
+        }
107
+        100% {
108
+          top: 97px;
109
+          left: 60px;
110
+          opacity: 0;
111
+        }
112
+      }
113
+      @keyframes cloudMid {
114
+        0% {
71
           top: 10px;
115
           top: 10px;
72
           left: 420px;
116
           left: 420px;
73
           opacity: 0;
117
           opacity: 0;
74
-          animation-name: cloudMid;
75
-          animation-duration: 2s;
76
-          animation-timing-function: linear;
77
-          animation-fill-mode: forwards;
78
-          animation-delay: 1.2s;
79
         }
118
         }
80
-        &.right {
119
+        20% {
81
-          width: 62px;
120
+          top: 40px;
121
+          left: 360px;
122
+          opacity: 1;
123
+        }
124
+        70% {
125
+          top: 130px;
126
+          left: 180px;
127
+          opacity: 1;
128
+        }
129
+        100% {
130
+          top: 160px;
131
+          left: 120px;
132
+          opacity: 0;
133
+        }
134
+      }
135
+      @keyframes cloudRight {
136
+        0% {
82
           top: 100px;
137
           top: 100px;
83
           left: 500px;
138
           left: 500px;
84
           opacity: 0;
139
           opacity: 0;
85
-          animation-name: cloudRight;
86
-          animation-duration: 2s;
87
-          animation-timing-function: linear;
88
-          animation-fill-mode: forwards;
89
-          animation-delay: 1s;
90
         }
140
         }
91
-        @keyframes cloudLeft {
141
+        20% {
92
-          0% {
142
+          top: 120px;
93
-            top: 17px;
143
+          left: 460px;
94
-            left: 220px;
144
+          opacity: 1;
95
-            opacity: 0;
96
-          }
97
-          20% {
98
-            top: 33px;
99
-            left: 188px;
100
-            opacity: 1;
101
-          }
102
-          80% {
103
-            top: 81px;
104
-            left: 92px;
105
-            opacity: 1;
106
-          }
107
-          100% {
108
-            top: 97px;
109
-            left: 60px;
110
-            opacity: 0;
111
-          }
112
         }
145
         }
113
-        @keyframes cloudMid {
146
+        80% {
114
-          0% {
147
+          top: 180px;
115
-            top: 10px;
148
+          left: 340px;
116
-            left: 420px;
149
+          opacity: 1;
117
-            opacity: 0;
118
-          }
119
-          20% {
120
-            top: 40px;
121
-            left: 360px;
122
-            opacity: 1;
123
-          }
124
-          70% {
125
-            top: 130px;
126
-            left: 180px;
127
-            opacity: 1;
128
-          }
129
-          100% {
130
-            top: 160px;
131
-            left: 120px;
132
-            opacity: 0;
133
-          }
134
         }
150
         }
135
-        @keyframes cloudRight {
151
+        100% {
136
-          0% {
152
+          top: 200px;
137
-            top: 100px;
153
+          left: 300px;
138
-            left: 500px;
154
+          opacity: 0;
139
-            opacity: 0;
140
-          }
141
-          20% {
142
-            top: 120px;
143
-            left: 460px;
144
-            opacity: 1;
145
-          }
146
-          80% {
147
-            top: 180px;
148
-            left: 340px;
149
-            opacity: 1;
150
-          }
151
-          100% {
152
-            top: 200px;
153
-            left: 300px;
154
-            opacity: 0;
155
-          }
156
         }
155
         }
157
       }
156
       }
158
     }
157
     }
159
-    .bullshit {
158
+  }
160
-      position: relative;
159
+  .bullshit {
160
+    position: relative;
161
+    float: left;
162
+    width: 300px;
163
+    padding: 150px 0;
164
+    overflow: hidden;
165
+    &__oops {
166
+      font-size: 32px;
167
+      font-weight: bold;
168
+      line-height: 40px;
169
+      color: #1482f0;
170
+      opacity: 0;
171
+      margin-bottom: 20px;
172
+      animation-name: slideUp;
173
+      animation-duration: 0.5s;
174
+      animation-fill-mode: forwards;
175
+    }
176
+    &__headline {
177
+      font-size: 20px;
178
+      line-height: 24px;
179
+      color: #1482f0;
180
+      opacity: 0;
181
+      margin-bottom: 10px;
182
+      animation-name: slideUp;
183
+      animation-duration: 0.5s;
184
+      animation-delay: 0.1s;
185
+      animation-fill-mode: forwards;
186
+    }
187
+    &__info {
188
+      font-size: 13px;
189
+      line-height: 21px;
190
+      color: grey;
191
+      opacity: 0;
192
+      margin-bottom: 30px;
193
+      animation-name: slideUp;
194
+      animation-duration: 0.5s;
195
+      animation-delay: 0.2s;
196
+      animation-fill-mode: forwards;
197
+    }
198
+    &__return-home {
199
+      display: block;
161
       float: left;
200
       float: left;
162
-      width: 300px;
201
+      width: 110px;
163
-      padding: 150px 0;
202
+      height: 36px;
164
-      overflow: hidden;
203
+      background: #1482f0;
165
-      &__oops {
204
+      border-radius: 100px;
166
-        font-size: 32px;
205
+      text-align: center;
167
-        font-weight: bold;
206
+      color: #ffffff;
168
-        line-height: 40px;
207
+      opacity: 0;
169
-        color: #1482f0;
208
+      font-size: 14px;
170
-        opacity: 0;
209
+      line-height: 36px;
171
-        margin-bottom: 20px;
210
+      cursor: pointer;
172
-        animation-name: slideUp;
211
+      animation-name: slideUp;
173
-        animation-duration: 0.5s;
212
+      animation-duration: 0.5s;
174
-        animation-fill-mode: forwards;
213
+      animation-delay: 0.3s;
175
-      }
214
+      animation-fill-mode: forwards;
176
-      &__headline {
215
+    }
177
-        font-size: 20px;
216
+    @keyframes slideUp {
178
-        line-height: 24px;
217
+      0% {
179
-        color: #1482f0;
218
+        transform: translateY(60px);
180
-        opacity: 0;
181
-        margin-bottom: 10px;
182
-        animation-name: slideUp;
183
-        animation-duration: 0.5s;
184
-        animation-delay: 0.1s;
185
-        animation-fill-mode: forwards;
186
-      }
187
-      &__info {
188
-        font-size: 13px;
189
-        line-height: 21px;
190
-        color: grey;
191
-        opacity: 0;
192
-        margin-bottom: 30px;
193
-        animation-name: slideUp;
194
-        animation-duration: 0.5s;
195
-        animation-delay: 0.2s;
196
-        animation-fill-mode: forwards;
197
-      }
198
-      &__return-home {
199
-        display: block;
200
-        float: left;
201
-        width: 110px;
202
-        height: 36px;
203
-        background: #1482f0;
204
-        border-radius: 100px;
205
-        text-align: center;
206
-        color: #ffffff;
207
         opacity: 0;
219
         opacity: 0;
208
-        font-size: 14px;
209
-        line-height: 36px;
210
-        cursor: pointer;
211
-        animation-name: slideUp;
212
-        animation-duration: 0.5s;
213
-        animation-delay: 0.3s;
214
-        animation-fill-mode: forwards;
215
       }
220
       }
216
-      @keyframes slideUp {
221
+      100% {
217
-        0% {
222
+        transform: translateY(0);
218
-          transform: translateY(60px);
223
+        opacity: 1;
219
-          opacity: 0;
220
-        }
221
-        100% {
222
-          transform: translateY(0);
223
-          opacity: 1;
224
-        }
225
       }
224
       }
226
     }
225
     }
227
   }
226
   }
227
+}
228
+
228
 </style>
229
 </style>

+ 1 - 1
src/views/layout/Layout.vue

48
                     }
48
                     }
49
                 }
49
                 }
50
             }
50
             }
51
-            .main-container{
51
+            .main-container {
52
                 margin-left: 40px;
52
                 margin-left: 40px;
53
             }
53
             }
54
         }
54
         }

+ 8 - 8
src/views/layout/Levelbar.vue

37
 
37
 
38
 <style rel="stylesheet/scss" lang="scss" scoped>
38
 <style rel="stylesheet/scss" lang="scss" scoped>
39
     .app-levelbar.el-breadcrumb {
39
     .app-levelbar.el-breadcrumb {
40
-        display: inline-block;
40
+      display: inline-block;
41
-        font-size: 14px;
41
+      font-size: 14px;
42
-        line-height: 50px;
42
+      line-height: 50px;
43
-        margin-left: 10px;
43
+      margin-left: 10px;
44
-        .no-redirect{
44
+      .no-redirect {
45
-          color: #97a8be;
45
+        color: #97a8be;
46
-          cursor:text;
46
+        cursor: text;
47
-        }
47
+      }
48
     }
48
     }
49
 </style>
49
 </style>

+ 8 - 9
src/views/layout/Navbar.vue

10
             <el-dropdown-menu class="user-dropdown" slot="dropdown">
10
             <el-dropdown-menu class="user-dropdown" slot="dropdown">
11
                 <router-link class='inlineBlock' to="/">
11
                 <router-link class='inlineBlock' to="/">
12
                     <el-dropdown-item>
12
                     <el-dropdown-item>
13
-                        首页
13
+                        Home
14
                     </el-dropdown-item>
14
                     </el-dropdown-item>
15
                 </router-link>
15
                 </router-link>
16
                 <el-dropdown-item divided><span @click="logout" style="display:block;">退出登录</span></el-dropdown-item>
16
                 <el-dropdown-item divided><span @click="logout" style="display:block;">退出登录</span></el-dropdown-item>
32
       computed: {
32
       computed: {
33
         ...mapGetters([
33
         ...mapGetters([
34
           'sidebar',
34
           'sidebar',
35
-          'name',
36
           'avatar'
35
           'avatar'
37
         ])
36
         ])
38
       },
37
       },
42
         },
41
         },
43
         logout() {
42
         logout() {
44
           this.$store.dispatch('LogOut').then(() => {
43
           this.$store.dispatch('LogOut').then(() => {
45
-            location.reload();// 为了重新实例化vue-router对象 避免bug
44
+            location.reload();  // 为了重新实例化vue-router对象 避免bug
46
           });
45
           });
47
         }
46
         }
48
       }
47
       }
65
             position: absolute;
64
             position: absolute;
66
             right: 150px;
65
             right: 150px;
67
         }
66
         }
68
-        .screenfull{
67
+        .screenfull {
69
-             position: absolute;
68
+            position: absolute;
70
-             right: 90px;
69
+            right: 90px;
71
-             top: 16px;
70
+            top: 16px;
72
-             color: red;
71
+            color: red;
73
         }
72
         }
74
         .avatar-container {
73
         .avatar-container {
75
             height: 50px;
74
             height: 50px;
78
             right: 35px;
77
             right: 35px;
79
             .avatar-wrapper {
78
             .avatar-wrapper {
80
                 cursor: pointer;
79
                 cursor: pointer;
81
-                margin-top:5px;
80
+                margin-top: 5px;
82
                 position: relative;
81
                 position: relative;
83
                 .user-avatar {
82
                 .user-avatar {
84
                     width: 40px;
83
                     width: 40px;

+ 4 - 3
src/views/layout/Sidebar.vue

18
 </script>
18
 </script>
19
 
19
 
20
 <style rel="stylesheet/scss" lang="scss" scoped>
20
 <style rel="stylesheet/scss" lang="scss" scoped>
21
-    .el-menu {
21
+.el-menu {
22
-        min-height: 100%;
22
+    min-height: 100%;
23
-    }
23
+}
24
+
24
 </style>
25
 </style>

+ 0 - 1
src/views/layout/SidebarItem.vue

24
 </template>
24
 </template>
25
 
25
 
26
 <script>
26
 <script>
27
-
28
     export default {
27
     export default {
29
       name: 'SidebarItem',
28
       name: 'SidebarItem',
30
       props: {
29
       props: {

+ 75 - 82
src/views/login/index.vue

1
 <template>
1
 <template>
2
-    <div class="login-container">
2
+  <div class="login-container">
3
-        <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left"
3
+    <el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px"
4
-                 label-width="0px"
4
+      class="card-box login-form">
5
-                 class="card-box login-form">
5
+      <h3 class="title">系统登录</h3>
6
-            <h3 class="title">系统登录</h3>
6
+      <el-form-item prop="email">
7
-            <el-form-item prop="email">
7
+        <span class="svg-container">
8
-                <span class="svg-container">
9
                   <icon-svg icon-class="jiedianyoujian"></icon-svg>
8
                   <icon-svg icon-class="jiedianyoujian"></icon-svg>
10
                 </span>
9
                 </span>
11
-                <el-input name="email" type="text" v-model="loginForm.email" autoComplete="on"
10
+        <el-input name="email" type="text" v-model="loginForm.email" autoComplete="on" placeholder="邮箱"></el-input>
12
-                          placeholder="邮箱"></el-input>
11
+      </el-form-item>
13
-            </el-form-item>
12
+      <el-form-item prop="password">
14
-            <el-form-item prop="password">
13
+        <span class="svg-container">
15
-                <span class="svg-container">
16
                   <icon-svg icon-class="mima" ></icon-svg>
14
                   <icon-svg icon-class="mima" ></icon-svg>
17
                 </span>
15
                 </span>
18
-                <el-input name="password" type="password" @keyup.enter.native="handleLogin" v-model="loginForm.password"
16
+        <el-input name="password" type="password" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on"
19
-                          autoComplete="on" placeholder="密码"></el-input>
17
+          placeholder="密码"></el-input>
20
-            </el-form-item>
18
+      </el-form-item>
21
-            <el-form-item>
19
+      <el-form-item>
22
-                <el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
20
+        <el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
23
-                    登录
21
+          登录
24
-                </el-button>
22
+        </el-button>
25
-            </el-form-item>
23
+      </el-form-item>
26
-            <div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div>
24
+      <div class='tips'>admin账号为:admin@wallstreetcn.com 密码随便填</div>
27
-            <div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div>
25
+      <div class='tips'>editor账号:editor@wallstreetcn.com 密码随便填</div>
28
-        </el-form>
26
+    </el-form>
29
-    </div>
27
+  </div>
30
 </template>
28
 </template>
31
 
29
 
32
 <script>
30
 <script>
52
         return {
50
         return {
53
           loginForm: {
51
           loginForm: {
54
             email: 'admin@wallstreetcn.com',
52
             email: 'admin@wallstreetcn.com',
55
-            password: ''
53
+            password: '111111'
56
           },
54
           },
57
           loginRules: {
55
           loginRules: {
58
             email: [
56
             email: [
88
 
86
 
89
 <style rel="stylesheet/scss" lang="scss">
87
 <style rel="stylesheet/scss" lang="scss">
90
     @import "src/styles/mixin.scss";
88
     @import "src/styles/mixin.scss";
91
-    .tips{
89
+    .tips {
92
       font-size: 14px;
90
       font-size: 14px;
93
       color: #fff;
91
       color: #fff;
94
       margin-bottom: 5px;
92
       margin-bottom: 5px;
95
     }
93
     }
96
-    .login-container {
97
-        @include relative;
98
-        height: 100vh;
99
-        background-color: #2d3a4b;
100
-
101
-        input:-webkit-autofill {
102
-            -webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
103
-            -webkit-text-fill-color: #fff !important;
104
-        }
105
-        input {
106
-            background: transparent;
107
-            border: 0px;
108
-            -webkit-appearance: none;
109
-            border-radius: 0px;
110
-            padding: 12px 5px 12px 15px;
111
-            color: #eeeeee;
112
-            height: 47px;
113
-        }
114
-        .el-input {
115
-            display: inline-block;
116
-            height: 47px;
117
-            width: 85%;
118
-        }
119
-        .svg-container {
120
-            padding: 6px 5px 6px 15px;
121
-            color: #889aa4;
122
-        }
123
-
124
-        .title {
125
-            font-size: 26px;
126
-            font-weight: 400;
127
-            color: #eeeeee;
128
-            margin: 0px auto 40px auto;
129
-            text-align: center;
130
-            font-weight: bold;
131
-        }
132
-
133
-        .login-form {
134
-            position: absolute;
135
-            left: 0;
136
-            right: 0;
137
-            width: 400px;
138
-            padding: 35px 35px 15px 35px;
139
-            margin: 120px auto;
140
-        }
141
-
142
-        .el-form-item {
143
-            border: 1px solid rgba(255, 255, 255, 0.1);
144
-            background: rgba(0, 0, 0, 0.1);
145
-            border-radius: 5px;
146
-            color: #454545;
147
-        }
148
 
94
 
149
-        .forget-pwd {
95
+    .login-container {
150
-            color: #fff;
96
+      @include relative;
151
-        }
97
+      height: 100vh;
98
+      background-color: #2d3a4b;
99
+      input:-webkit-autofill {
100
+        -webkit-box-shadow: 0 0 0px 1000px #293444 inset !important;
101
+        -webkit-text-fill-color: #fff !important;
102
+      }
103
+      input {
104
+        background: transparent;
105
+        border: 0px;
106
+        -webkit-appearance: none;
107
+        border-radius: 0px;
108
+        padding: 12px 5px 12px 15px;
109
+        color: #eeeeee;
110
+        height: 47px;
111
+      }
112
+      .el-input {
113
+        display: inline-block;
114
+        height: 47px;
115
+        width: 85%;
116
+      }
117
+      .svg-container {
118
+        padding: 6px 5px 6px 15px;
119
+        color: #889aa4;
120
+      }
121
+      .title {
122
+        font-size: 26px;
123
+        font-weight: 400;
124
+        color: #eeeeee;
125
+        margin: 0px auto 40px auto;
126
+        text-align: center;
127
+        font-weight: bold;
128
+      }
129
+      .login-form {
130
+        position: absolute;
131
+        left: 0;
132
+        right: 0;
133
+        width: 400px;
134
+        padding: 35px 35px 15px 35px;
135
+        margin: 120px auto;
136
+      }
137
+      .el-form-item {
138
+        border: 1px solid rgba(255, 255, 255, 0.1);
139
+        background: rgba(0, 0, 0, 0.1);
140
+        border-radius: 5px;
141
+        color: #454545;
142
+      }
143
+      .forget-pwd {
144
+        color: #fff;
145
+      }
152
     }
146
     }
153
-
154
 </style>
147
 </style>

+ 21 - 20
src/views/table/index.vue

33
 </template>
33
 </template>
34
 
34
 
35
 <script>
35
 <script>
36
-import { getList } from '@/api/table';
36
+  import { getList } from '@/api/table';
37
-export default {
37
+
38
-  data() {
38
+  export default {
39
-    return {
39
+    data() {
40
-      list: null,
40
+      return {
41
-      listLoading: true
41
+        list: null,
42
-    }
42
+        listLoading: true
43
-  },
43
+      }
44
-  created() {
44
+    },
45
-    this.fetchData();
45
+    created() {
46
-  },
46
+      this.fetchData();
47
-  methods: {
47
+    },
48
-    fetchData() {
48
+    methods: {
49
-      this.listLoading = true;
49
+      fetchData() {
50
-      getList(this.listQuery).then(response => {
50
+        this.listLoading = true;
51
-        this.list = response.data.items;
51
+        getList(this.listQuery).then(response => {
52
-        this.listLoading = false;
52
+          this.list = response.data.items;
53
-      })
53
+          this.listLoading = false;
54
+        })
55
+      }
54
     }
56
     }
55
-  }
57
+  };
56
-};
57
 </script>
58
 </script>