YNICTE/FO/Views/Account/GoogleCallback.cshtml

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2020-11-27 09:31:40 +09:00
@{
Layout = null;
var naverClientId = ViewBag.naverClientID;
var kakaoClientId = ViewBag.kakaoClientID;
var googleClientId = ViewBag.googleClientID;
}
<head>
@Html.Partial("./Partial/JS")
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="@googleClientId">
</head>
<div class="g-signin2" data-onsuccess="onGoogleLogIn" style="display:none"></div> @*구글로그인관련*@
<script>
var snsid;
function onGoogleLogIn(googleUser) {
var profile = googleUser.getBasicProfile();
snsid = profile.getId();
capp("/focommon/CheckExistSnsId", { snsid: snsid, jointype: 1 }, "snslogin");
}
function snslogin() {
if (capResult.code > 0) {
capp("/focommon/SnsLogin", { uid: snsid, isSns: true }, "goHome()");
}
else {
if (confirm("SNS 회원정보가 존재하지 않습니다.\r\n회원가입 페이지로 이동하시겠습니까?")) {
goJoin();
}
else {
goIndex();
}
}
}
function goJoin() {
2020-11-27 11:26:19 +09:00
location.href = "https://www.ynicte.com/Account/Join?jointype=1";
2020-11-27 09:31:40 +09:00
}
function goHome() {
location.href = "https://www.ynicte.com";
}
function goIndex() {
location.href = "https://www.ynicte.com/Account/Index";
}
</script>