提交 0f015c76 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 默认登录方式无效

上级 70e0fc9b
......@@ -147,10 +147,12 @@ export default {
localStorage.setItem('publicKey', res.data)
}
})
defaultLoginType().then(res => {
Promise.all([p1, p2, p3]).then(() => {
if (res.success && res.data && this.loginTypes.includes(res.data)) {
this.loginForm.loginType = res.data
defaultLoginType().then(res => {
const result = res
console.log('default login type is :' + res.data)
if (result.success && result.data && this.loginTypes.includes(result.data)) {
this.loginForm.loginType = result.data
this.$nextTick(() => {
this.changeLoginType(this.loginForm.loginType)
})
......@@ -218,7 +220,6 @@ export default {
password: encrypt(this.loginForm.password),
loginType: this.loginForm.loginType
}
const publicKey = localStorage.getItem('publicKey')
this.$store.dispatch('user/login', user).then(() => {
this.$router.push({ path: this.redirect || '/' })
this.loading = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论