修改第三方登录跳转使用新的浏览器窗口
This commit is contained in:
parent
bc80406651
commit
379330ba22
|
|
@ -235,7 +235,17 @@ const thirdLogin = async (type) => {
|
|||
}
|
||||
}, 2000);
|
||||
//新标签页打开登录地址
|
||||
window.open(loginUrl, "_blank");
|
||||
//window.open(loginUrl, "_blank");
|
||||
|
||||
//新的浏览器窗口打开标签页
|
||||
const width = 800;
|
||||
const height = 600;
|
||||
// 计算窗口在屏幕中心的位置
|
||||
const left = (window.screen.width - width) / 2;
|
||||
const top = (window.screen.height - height) / 2;
|
||||
const features = `width=${width},height=${height},left=${left},top=${top}`;
|
||||
// 创建新窗口
|
||||
const newWindow = window.open(loginUrl, '_blank', features);
|
||||
|
||||
|
||||
};
|
||||
|
|
@ -372,13 +382,6 @@ const getMyUserInfo = async (id) => {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.github-btn {
|
||||
background-image: url(../../assets/img/github-logo.png) !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,7 +459,16 @@ const thirdLogin = async (type) => {
|
|||
}
|
||||
}, 2000);
|
||||
//新标签页打开登录地址
|
||||
window.open(loginUrl, "_blank");
|
||||
// window.open(loginUrl, "_blank");
|
||||
//新的浏览器窗口打开标签页
|
||||
const width = 800;
|
||||
const height = 600;
|
||||
// 计算窗口在屏幕中心的位置
|
||||
const left = (window.screen.width - width) / 2;
|
||||
const top = (window.screen.height - height) / 2;
|
||||
const features = `width=${width},height=${height},left=${left},top=${top}`;
|
||||
// 创建新窗口
|
||||
const newWindow = window.open(loginUrl, '_blank', features);
|
||||
};
|
||||
|
||||
//获取绑定的第三方账号信息
|
||||
|
|
|
|||
Loading…
Reference in New Issue