This repository was archived by the owner on May 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import App from './App'
66// Including Vue prototype functions (eg. this.$_plugins_messageBox())
77import './plugins/element.js'
88
9- // Shouldn't use Router instance directly without 'PERMISSION /index' processing.
10- import router from './permission '
9+ // Shouldn't use Router instance directly without 'access /index' processing.
10+ import router from './access '
1111import store from './store'
1212
1313import 'STYLE/transition/index.scss'
Original file line number Diff line number Diff line change 1- <template functional >
2- <div class =" home" >
3- <h3 >{{ parent. $t('pages.withoutVerification') }}</h3 >
1+ <template >
2+ <div class =" home" v-if = " isCompleted " >
3+ <h3 >{{ $t('pages.withoutVerification') }}</h3 >
44 <p >
5- {{ parent. $t('pages.currentRoute') }}
6- <strong >{{ parent. $route.path }}</strong >
5+ {{ $t('pages.currentRoute') }}
6+ <strong >{{ $route.path }}</strong >
77 </p >
88 </div >
99</template >
1010
1111<script >
1212export default {
13- name: ' home'
13+ name: ' home' ,
14+
15+ data () {
16+ return {
17+ isCompleted: false
18+ }
19+ },
20+
21+ created () {
22+ // simulate data fetching
23+ setTimeout (() => {
24+ this .isCompleted = true
25+ }, 2000 )
26+ }
1427}
1528 </script >
1629
Original file line number Diff line number Diff line change 4040 >{{ $t('submitButton') }}</el-button
4141 >
4242 </el-form-item >
43+
44+ <div class =" login__way" >
45+ <el-button
46+ class =" login__way__item"
47+ size =" mini"
48+ type =" text"
49+ @click =" asDefault('admin')"
50+ >as admin</el-button
51+ >
52+ <el-button
53+ class =" login__way__item"
54+ size =" mini"
55+ type =" text"
56+ @click =" asDefault('user')"
57+ >as user</el-button
58+ >
59+ </div >
4360 </el-form >
4461 </div >
4562 <el-footer class =" login__footer" >
@@ -85,6 +102,10 @@ export default {
85102 switchLoading (state ) {
86103 this .isLoading = state
87104 },
105+ asDefault (type = ' admin' ) {
106+ this .userInfo .username = type
107+ this .userInfo .password = type
108+ },
88109 ... mapActions (' login' , [' userLogout' ])
89110 },
90111
@@ -162,6 +183,10 @@ export default {
162183 & __submit
163184 width : 100%
164185
186+ & __way
187+ & __item
188+ text-transform : uppercase
189+
165190 & __footer
166191 .author__info
167192 margin : 0
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ export function resetRouter() {
2525/**
2626 * ! NOTICE
2727 * This router instance should not be added directly without
28- * `PERMISSION /index` processing.
28+ * `ACCESS /index` processing.
2929 */
3030export default router
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ function aliasCreator(chainConfig) {
8484 . set ( 'STORE' , path . resolve ( PATH . SOURCE_PATH , './store' ) )
8585 . set ( 'UTILS' , path . resolve ( PATH . SOURCE_PATH , './utils' ) )
8686 . set ( 'API' , path . resolve ( PATH . SOURCE_PATH , './api' ) )
87- . set ( 'PERMISSION ' , path . resolve ( PATH . SOURCE_PATH , './permission ' ) )
87+ . set ( 'ACCESS ' , path . resolve ( PATH . SOURCE_PATH , './access ' ) )
8888 . set ( 'ASSETS' , path . resolve ( PATH . SOURCE_PATH , './assets' ) )
8989 . set ( 'LANG' , path . resolve ( PATH . SOURCE_PATH , './lang' ) )
9090}
You can’t perform that action at this time.
0 commit comments