优化管理后台的社交登录

This commit is contained in:
YunaiV
2022-07-05 22:00:23 +08:00
parent 2b9b302368
commit 8751471aa1
11 changed files with 75 additions and 137 deletions

View File

@ -87,6 +87,8 @@ export default {
username: "admin",
password: "admin123",
rememberMe: false,
code: "",
uuid: "",
},
loginRules: {
username: [
@ -170,16 +172,20 @@ export default {
removeUsername()
removePassword()
}
this.$store.dispatch("SocialLogin2", {
code: this.code,
state: this.state,
type: this.type,
this.$store.dispatch("Login", {
socialCode: this.code,
socialState: this.state,
socialType: this.type,
// 账号密码登录
username: this.loginForm.username,
password: this.loginForm.password
password: this.loginForm.password,
code: this.loginForm.code,
uuid: this.loginForm.uuid,
}).then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;
this.getCode()
});
}
});