1. 优化前端的社交登陆的枚举

2. 将三方登陆,统一改成社交登陆
This commit is contained in:
YunaiV
2021-10-05 00:36:04 +08:00
parent 7b3a283074
commit a0a5d3a357
9 changed files with 63 additions and 75 deletions

View File

@ -51,24 +51,27 @@ export default {
},
loading: false,
redirect: undefined,
// 三方登陆相关
// 社交登陆相关
type: undefined,
code: undefined,
state: undefined,
};
},
watch: {
$route: {
handler: function(route) {
this.redirect = route.query && route.query.redirect;
},
immediate: true
}
},
// watch: {
// $route: {
// handler: function(route) {
// this.redirect = route.query && route.query.redirect;
// },
// immediate: true
// }
// },
created() {
this.getCookie();
// 三方登陆相关
this.type = 10; // TODO 芋艿:需要改
// 重定向地址
this.redirect = this.$route.query.redirect;
debugger
// 社交登陆相关
this.type = this.$route.query.type;
this.code = this.$route.query.code;
this.state = this.$route.query.state;
this.$store.dispatch("SocialLogin", {