【修复】钉钉登录时,重定向后 type 丢失导致报错的问题

This commit is contained in:
YunaiV
2022-11-12 13:27:46 +08:00
parent 3cd256f7f2
commit 7093ed3997
2 changed files with 11 additions and 11 deletions

View File

@@ -258,7 +258,8 @@ export default {
// 设置登录中
this.loading = true;
// 计算 redirectUri
const redirectUri = location.origin + '/social-login?type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/"); // 重定向不能丢
const redirectUri = location.origin + '/social-login?'
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
// 进行跳转