修改第三方登录跳转使用新的浏览器窗口

This commit is contained in:
junleea 2025-05-13 13:58:47 +08:00
parent bc80406651
commit 379330ba22
2 changed files with 21 additions and 9 deletions

View File

@ -235,7 +235,17 @@ const thirdLogin = async (type) => {
} }
}, 2000); }, 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; text-align: center;
} }
.login-btn {
width: 100%;
height: 40px;
line-height: 40px;
border-radius: 5px;
font-size: 16px;
}
.github-btn { .github-btn {
background-image: url(../../assets/img/github-logo.png) !important; background-image: url(../../assets/img/github-logo.png) !important;
} }

View File

@ -459,7 +459,16 @@ const thirdLogin = async (type) => {
} }
}, 2000); }, 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);
}; };
// //