Prechádzať zdrojové kódy

기획공유 하기 앱 일 때 처리

yujung 4 rokov pred
rodič
commit
174c81570f
1 zmenil súbory, kde vykonal 5 pridanie a 2 odobranie
  1. 5 2
      src/main/webapp/ux/style24_link.js

+ 5 - 2
src/main/webapp/ux/style24_link.js

@@ -1576,15 +1576,18 @@ function sendSns(sns, url, txt, media, description)
 	var _description = encodeURIComponent(description);
 	
 	// _url = location.protocol + _url.replaceAll('#enp_mbris','') + '&share=Y'
+
 	_url = location.protocol + encodeURIComponent(url);
 
 	switch(sns)
 	{
 		case 'facebook':
-			window.open('http://www.facebook.com/sharer/sharer.php?u=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
+			var faceUrl = _isApp == 'true' ? 'public://?link=http://www.facebook.com/sharer/sharer.php?u=' : 'http://www.facebook.com/sharer/sharer.php?u=';
+			window.open(faceUrl + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
 			break;
 		case 'twitter':
-			window.open('http://twitter.com/intent/tweet?text=' + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
+			var twitUrl = _isApp == 'true' ? 'public://?link=http://twitter.com/intent/tweet?text=' : 'http://twitter.com/intent/tweet?text=';
+			window.open(twitUrl + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
 			break;
 		default:
 			mcxDialog.alert('지원하지 않는 SNS입니다.');