diff --git a/FO/Views/Account/IndexBase.cshtml b/FO/Views/Account/IndexBase.cshtml
index dac676b..a9d36c4 100644
--- a/FO/Views/Account/IndexBase.cshtml
+++ b/FO/Views/Account/IndexBase.cshtml
@@ -21,8 +21,8 @@
+
-
-
네이버 아이디로 로그인
@@ -103,20 +103,20 @@
{
clientId: "fvaj0CdI04awGMEhaICy", //개발자센터에 등록한 ClientID
callbackUrl: "http://www.ynicte.com/Account/Join",//개발자센터에 등록한 callback Url
- isPopup: false, /* 팝업을 통한 연동처리 여부 */
+ isPopup: true, /* 팝업을 통한 연동처리 여부 */
loginButton: { color: "green", type: 3, height: 60 } /* 로그인 버튼의 타입을 지정 */
}
);
- function loginWithKakao() {
- Kakao.Auth.login({
- success: function (authObj) {
- alert(JSON.stringify(authObj))
- },
- fail: function (err) {
- alert(JSON.stringify(err))
- },
- })
+ function loginWithKakao() {
+ Kakao.Auth.login({
+ success: function (authObj) {
+ alert(JSON.stringify(authObj))
+ },
+ fail: function (err) {
+ alert(JSON.stringify(err))
+ },
+ })
}
function loginWithNaver() {
diff --git a/FO/Views/Account/Join.cshtml b/FO/Views/Account/Join.cshtml
index 68e5c64..1ae5366 100644
--- a/FO/Views/Account/Join.cshtml
+++ b/FO/Views/Account/Join.cshtml
@@ -5,6 +5,10 @@
var mainprivate = (menus.Where(w => w.refcode == "main.private").FirstOrDefault() ?? em);
var mainagree = (menus.Where(w => w.refcode == "main.agree").FirstOrDefault() ?? em);
}
+
+
+
+
@if (ViewBag.JoinOK)
{
@@ -53,6 +57,8 @@ else
-
+
+
중복여부 체크
-
@@ -207,5 +213,51 @@ else
mobilechkview('MCHK');
}
}
+
+ /*(1) 네이버 Javscript 설정 정보 및 초기화*/
+ var naverLogin = new naver.LoginWithNaverId(
+ {
+ clientId: "fvaj0CdI04awGMEhaICy", //개발자센터에 등록한 ClientID
+ callbackUrl: "http://www.ynicte.com/Account/Join",//개발자센터에 등록한 callback Url
+ isPopup: false, /* 팝업을 통한 연동처리 여부 */
+ callbackHandle: true
+ /* callback 페이지가 분리되었을 경우에 callback 페이지에서는 callback처리를 해줄수 있도록 설정합니다. */
+ }
+ );
+ /* (2) 네이버 로그인 정보를 초기화하기 위하여 init을 호출 */
+ naverLogin.init();
+
+ /* (3) Callback의 처리. 정상적으로 Callback 처리가 완료될 경우 main page로 redirect(또는 Popup close) */
+ window.addEventListener('load', function () {
+ naverLogin.getLoginStatus(function (status) {
+ if (status) {
+ /* (4) 필수적으로 받아야하는 프로필 정보가 있다면 callback처리 시점에 체크 */
+ var email = naverLogin.user.getEmail();
+ var name = naverLogin.user.getName();
+ var uniqId = naverLogin.user.getId();
+ var profileImage = naverLogin.user.getProfileImage();
+ var birthday = naverLogin.user.getBirthday();
+ var age = naverLogin.user.getAge();
+ if (email == undefined || email == null) {
+ alert("이메일은 필수정보입니다. 정보제공을 동의해주세요.");
+ /* (4-1) 사용자 정보 재동의를 위하여 다시 네이버로그인 동의페이지로 이동함 */
+ naverLogin.reprompt();
+ return;
+ }
+ if (name == undefined || name == null) {
+ alert("이름은 필수정보입니다. 정보제공을 동의해주세요.");
+ naverLogin.reprompt();
+ return;
+ }
+
+ $("#username").val(name);
+ $("#email").val(email);
+ $("#snsid").val(uniqId);
+ $("#jointype").val(2); //0:일반회원가입,1:google,2:naver,3:kakao
+ } else {
+ console.log("callback 처리에 실패하였습니다.");
+ }
+ });
+ });
}
\ No newline at end of file
diff --git a/FO/Views/Account/JoinTSel.cshtml b/FO/Views/Account/JoinTSel.cshtml
index 20e4f82..f7c8f24 100644
--- a/FO/Views/Account/JoinTSel.cshtml
+++ b/FO/Views/Account/JoinTSel.cshtml
@@ -1,11 +1,60 @@
-
+
+
+
+
+
+
+
\ No newline at end of file