|
|
@@ -80,7 +80,7 @@
|
|
|
<div class="short--login--wrap">
|
|
|
<v-btn class="btn--google" @click.stop="onGoogleLogin"></v-btn>
|
|
|
<v-btn class="btn--kakao" @click.stop="onKakaoLogin"></v-btn>
|
|
|
- <v-btn class="btn--naver"></v-btn>
|
|
|
+ <v-btn class="btn--naver" @click.stop="onNaverLogin"></v-btn>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -347,7 +347,8 @@
|
|
|
// 개발환경이면 아래처럼 확인
|
|
|
if (
|
|
|
event.origin === "http://0.0.0.0:3000" || //배포시 도메인 변경
|
|
|
- event.origin === "http://localhost:3000" //배포시 도메인 변경
|
|
|
+ event.origin === "http://localhost:3000" || //배포시 도메인 변경
|
|
|
+ event.origin === "https://shopdeli.mycafe24.com"
|
|
|
) {
|
|
|
const { accessToken, refreshToken, user } = event.data;
|
|
|
|
|
|
@@ -369,7 +370,7 @@
|
|
|
useAuthStore().setTempData(result);
|
|
|
useAuthStore().setAccessToken(accessToken);
|
|
|
useAuthStore().setRefreshToken(refreshToken);
|
|
|
- localStorage.setItem("tempAccess", result.user.NICK_NAME);
|
|
|
+ localStorage.setItem("tempAccess", result.user);
|
|
|
useUtil.setPageMove("/view/item");
|
|
|
useStore.menuInfo.menuIndex = "0";
|
|
|
useStore.menuInfo.menuId = "menu02";
|
|
|
@@ -507,6 +508,38 @@
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ function onNaverLogin() {
|
|
|
+ const naverAuthUrl = "https://shopdeli.mycafe24.com/auth/naverLogin"; // 실제 리디렉션 URI로 교체
|
|
|
+
|
|
|
+ const width = 500;
|
|
|
+ const height = 600;
|
|
|
+ const dualScreenLeft =
|
|
|
+ window.screenLeft !== undefined ? window.screenLeft : window.screenX;
|
|
|
+ const dualScreenTop =
|
|
|
+ window.screenTop !== undefined ? window.screenTop : window.screenY;
|
|
|
+
|
|
|
+ const currentWidth = window.innerWidth
|
|
|
+ ? window.innerWidth
|
|
|
+ : document.documentElement.clientWidth
|
|
|
+ ? document.documentElement.clientWidth
|
|
|
+ : screen.width;
|
|
|
+
|
|
|
+ const currentHeight = window.innerHeight
|
|
|
+ ? window.innerHeight
|
|
|
+ : document.documentElement.clientHeight
|
|
|
+ ? document.documentElement.clientHeight
|
|
|
+ : screen.height;
|
|
|
+
|
|
|
+ const left = dualScreenLeft + (currentWidth - width) / 2;
|
|
|
+ const top = dualScreenTop + (currentHeight - height) / 2;
|
|
|
+
|
|
|
+ window.open(
|
|
|
+ naverAuthUrl,
|
|
|
+ "naverLogin",
|
|
|
+ `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes`
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @API
|
|
|
* 최종 로그인 버튼 클릭 시 API
|