This commit is contained in:
hyunho 2020-11-30 07:24:53 +00:00
parent a33033de02
commit 438ac6765e
3 changed files with 20 additions and 11 deletions

View File

@ -391,10 +391,14 @@ namespace NP.FO.Controllers
ViewBag.kakaoClientID = kakaoClientID;
ViewBag.googleClientID = googleClientID;
//인증키 확인
if (vm.intval < 1 || Dao.Get<int>("users.usercheckconfirm", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "checkkey", vm.intval } }).First() < 1)
string referrerURL = Request.UrlReferrer.ToString();
if (!referrerURL.ToLower().Contains("myinfocheck") && !referrerURL.ToLower().Contains("snslinkcallback"))
{
return Redirect("/My/MyInfo");
//인증키 확인
if (vm.intval < 1 || Dao.Get<int>("users.usercheckconfirm", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "checkkey", vm.intval } }).First() < 1)
{
return Redirect("/My/MyInfo");
}
}
vm.User = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
vm.ComCodes = GetComCodes("jobposition,job", true);

View File

@ -89,21 +89,21 @@
//공통
function snslink() {
if (capResult.code > 0) {
msg("SNS 연동하였습니다.");
alert("연동하였습니다.");
goRefresh();
}
else {
msg("SNS 연동에 실패하였습니다. \r\n관리자에게 문의하세요.");
alert("SNS 연동에 실패하였습니다. \r\n관리자에게 문의하세요.");
return;
}
}
function goRefresh() {
if (@jointype == 2) {
opener.location.href = "https://www.ynicte.com/My/MyinfoCheck";
opener.location.href = "/My/MyinfoCheck";
self.close();
}
else {
location.href = "https://www.ynicte.com/My/MyinfoCheck";
location.href = "/My/MyinfoCheck";
}
}

View File

@ -10,7 +10,6 @@
<head>
<script type="text/javascript" src="/js/naveridlogin_js_sdk_2.0.0.js"></script>
<script type="text/javascript" src="/js/kakao.js"></script>
<script src="https://apis.google.com/js/platform.js?onload=googleInit" async defer></script>
</head>
<form id="mform" method="post" enctype="multipart/form-data">
<div id="naverIdLogin" style="display:none"></div>
@ -207,6 +206,12 @@
});
snsInit();
var referrer = document.referrer;
if (referrer.toLowerCase().indexOf('myinfocheck') > 0 || referrer.toLowerCase().indexOf('snslinkcallback') > 0) {
selectTab("sns");
}
});
function setemail2() {
setv("email2", val("email3"));
@ -292,8 +297,8 @@
}
function afterSnsLink() {
if (capResult.code > 0) {
msg("SNS 연동을 해제하였습니다.");
return;
alert("SNS 연동을 해제하였습니다.");
location.href = "/My/MyinfoCheck";
}
else {
msg("SNS 연동해제에 실패하였습니다. \r\n관리자에게 문의하세요.");
@ -315,7 +320,6 @@
function googleInit() {
gapi.load('auth2', function () {var gauth = gapi.auth2.init({client_id: "@googleClientId", scope: 'profile'});gauth.then(function () {console.log('google init success');}, function () {console.error('google init fail');})});
}
var naverLogin = new naver.LoginWithNaverId({ clientId: "@naverClientId", callbackUrl: "https://www.ynicte.com/Account/SNSLinkCallback?jointype=2",isPopup: true,loginButton: { color: "green", type: 3, height: 60 }});
function loginWithKakao() {
@ -349,4 +353,5 @@
Kakao.init("@kakaoClientId");
}
</script>
<script src="https://apis.google.com/js/platform.js?onload=googleInit" async defer></script> @*header가 아니라 하단에 위치해야 읽어올수있음*@
}