File tree 4 files changed +29
-4
lines changed
4 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ export default {
79
79
password : 'Password' ,
80
80
any : 'any' ,
81
81
thirdparty : 'Or connect with' ,
82
- thirdpartyTips : 'Can not be simulated on local, so please combine you own business simulation! ! !'
82
+ thirdpartyTips : 'Can not be simulated on local, so please combine you own business simulation! ! !' ,
83
+ register : 'register'
83
84
} ,
84
85
documentation : {
85
86
documentation : 'Documentation' ,
Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ export default {
79
79
password : 'Contraseña' ,
80
80
any : 'nada' ,
81
81
thirdparty : 'Conectar con' ,
82
- thirdpartyTips : 'No se puede simular en local, así que combine su propia simulación de negocios. ! !'
82
+ thirdpartyTips : 'No se puede simular en local, así que combine su propia simulación de negocios. ! !' ,
83
+ register : 'registro'
83
84
} ,
84
85
documentation : {
85
86
documentation : 'Documentación' ,
Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ export default {
79
79
password : '密码' ,
80
80
any : '随便填' ,
81
81
thirdparty : '第三方登录' ,
82
- thirdpartyTips : '本地不能模拟,请结合自己业务进行模拟!!!'
82
+ thirdpartyTips : '本地不能模拟,请结合自己业务进行模拟!!!' ,
83
+ register : '注册'
83
84
} ,
84
85
documentation : {
85
86
documentation : '文档' ,
Original file line number Diff line number Diff line change 42
42
</span >
43
43
</el-form-item >
44
44
45
- <el-button :loading =" loading" type =" primary" style =" width :100 % ;margin-bottom :30px ;" @click.native.prevent =" handleLogin" >
45
+ <el-button :loading =" loading" type =" primary" style =" width :50 % ;margin-bottom :30px ;" @click.native.prevent =" handleLogin" >
46
46
{{ $t('login.logIn') }}
47
47
</el-button >
48
48
49
+ <el-button :loading =" loading" type =" primary" style =" width :50% ;margin-bottom :30px ;" @click.native.prevent =" register" >
50
+ {{ $t('login.register') }}
51
+ </el-button >
52
+
49
53
<div style =" position :relative " >
50
54
<div class =" tips" >
51
55
<span >{{ $t('login.username') }} : admin</span >
@@ -161,6 +165,24 @@ export default {
161
165
return false
162
166
}
163
167
})
168
+ },
169
+ register () {
170
+ this .$refs .loginForm .validate (valid => {
171
+ if (valid) {
172
+ this .loading = true
173
+ this .$store .dispatch (' user/login' , this .loginForm )
174
+ .then (() => {
175
+ this .$router .push ({ path: this .redirect || ' /' })
176
+ this .loading = false
177
+ })
178
+ .catch (() => {
179
+ this .loading = false
180
+ })
181
+ } else {
182
+ console .log (' error submit!!' )
183
+ return false
184
+ }
185
+ })
164
186
}
165
187
// afterQRScan() {
166
188
// if (e.key === 'x-admin-oauth-code') {
You can’t perform that action at this time.
0 commit comments