공유 기능 오류 수정

dev_bert
jeongcheewoo 3 years ago
parent d093151e7e
commit bb7e929441

@ -4,6 +4,7 @@
<script src="${URL_STATIC_ROOT}/m/js/swiper.min.js"></script>
<script src="${URL_STATIC_ROOT}/m/js/jquery_popupoverlay.js"></script>
<script src="${URL_STATIC_ROOT}/m/js/design.js"></script>
<script src="http://developers.kakao.com/sdk/js/kakao.js"></script>
<body>
@ -96,7 +97,7 @@
</button>
</li>
<li>
<button type="button" id="" name="" class="c_btn">
<button type="button" id="popup-share" name="" class="share-popup_open c_btn">
<span class="hidden">아이콘</span>공유
</button>
</li>
@ -258,7 +259,14 @@
</div>
<!-- //wrap -->
<div class="popup-wrap z-anim mfp" id="share-popup">
<li class="kakao" id="linkedKakao"><a href="javascript:sendLink();">카카오톡</a></li>
<li class="facebook"><a href="#">페이스북</a></li>
<li class="twitter"><a href="#">트위터</a>
</div>
<form id="frmComment" name="frmComment" method="post" action="insert_bf_growth_review_comment.do">
<input type="hidden" id="gr_no" name="gr_no" value="${model['gr_no']!}" />
<input type="hidden" id="p_grc_id" name="p_grc_id" />
@ -285,6 +293,8 @@
</body>
<script>
// 댓글 삭제 확인창
function del_comment_confirm(grc_id,type){
@ -574,6 +584,14 @@
$("#comment_list_more_"+p_grc_id).append(hide);
}
function setOptionALLSelectEvent() {
var item = $("#subscribeOptions").find(".items");
// item.find("button").on("click",findSelectedALLOptions);
// item.find("select").on("change",findSelectedALLOptions);
}
</script>
<#include "/m/include/index_bottom.ftl">

@ -9,6 +9,96 @@
timer: 2000
});
</#if>
$('#share-popup').popup();
var pageTitle = document.title;
var pageUrl = location.href
var shareUrlFB = "https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(pageUrl)+"&t="+encodeURI(pageTitle);
var shareUrlTWT = "https://twitter.com/intent/tweet?text="+encodeURIComponent(pageTitle)+"&url="+encodeURI(pageUrl);
var shareUrlNaver = "https://share.naver.com/web/shareView.nhn?url="+encodeURI(pageUrl)+"&title="+encodeURI(pageTitle);
$(".facebook").on("click" , function(e) {
e.preventDefault();
window.open(shareUrlFB, '', 'scrollbars=no, width=584, height=635');
});
$(".twitter").on("click" , function(e) {
e.preventDefault();
window.open(shareUrlTWT, '', 'scrollbars=no, width=584, height=635');
});
$(".kakao").on("click" , function(e) {
e.preventDefault();
});
Kakao.init("41afd760326f3eb50892555cd0b16a8e");
Kakao.Link.createDefaultButton({
container: '#linkedKakao',
objectType: 'feed',
content: {
title: pageTitle,
description: '이유식당 전문가 리뷰',
imageUrl:
'http://mud-kage.kakao.co.kr/dn/NTmhS/btqfEUdFAUf/FjKzkZsnoeE4o19klTOVI1/openlink_640x640s.jpg',
link: {
mobileWebUrl: window.location.href,
androidExecutionParams: window.location.href,
},
},
itemContent: {
profileText: 'Kakao',
profileImageUrl: 'http://mud-kage.kakao.co.kr/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',
titleImageUrl: 'http://mud-kage.kakao.co.kr/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',
titleImageText: 'Cheese cake',
titleImageCategory: 'Cake',
items: [
{
item: 'Cake1',
itemOp: '1000원',
},
{
item: 'Cake2',
itemOp: '2000원',
},
{
item: 'Cake3',
itemOp: '3000원',
},
{
item: 'Cake4',
itemOp: '4000원',
},
{
item: 'Cake5',
itemOp: '5000원',
},
],
sum: 'Total',
sumOp: '15000원',
},
social: {
likeCount: 10,
commentCount: 20,
sharedCount: 30,
},
buttons: [
{
title: '웹으로 이동',
link: {
mobileWebUrl: 'https://developers.kakao.com',
},
},
{
title: '앱으로 이동',
link: {
mobileWebUrl: 'https://developers.kakao.com',
},
},
]
});
});
</script>

Loading…
Cancel
Save