shareTo 웹 버전 공유
6979 단어 sha
// share --------
var shareTo = function (dest, shareCode) {
var appKey = "1667889534"; // appkey:"3050999700"
var ralateUid = "2248818320"; // ralateUid: "1801487174"
// ;shareCode
var url = location.href + "?shareCode=" + shareCode;
var source = " ";
var sourceUrl = "http://from-my-fundation";
var title = " ~~";
var pic = "http://beauty-face";
//
var shareUrl = "";
switch (dest.toLowerCase()) {
case "sina": //
shareUrl = "http://service.weibo.com/share/share.php?url="+ encodeURIComponent(url) +"&appkey=" + appKey + "&title=" + encodeURIComponent(title) + "&ralateUid=" + ralateUid + "&source=" + encodeURIComponent(source) + "&sourceUrl=" + encodeURIComponent(sourceUrl)+ "&pic=" + encodeURIComponent(pic) + "&searchPic=false";
break;
case "tencent": //
shareUrl = "http://v.t.qq.com/share/share.php?url=" + encodeURIComponent(url) + "&appkey="+ appKey +"&site=http://www.eastmoney.com&title=" + encodeURIComponent(title) + "&pic=" + encodeURIComponent(pic);
break;
case "qzone": // qq
shareUrl = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(source) + "&pics=" + encodeURIComponent(pic) + "&summary=" +encodeURIComponent(title) + "&desc=" +encodeURIComponent(title);
break;
case "renren":
shareUrl = "http://widget.renren.com/dialog/share?resourceUrl=" + encodeURIComponent(url) +'&srcUrl='+ encodeURIComponent(url) +'&images='+ encodeURIComponent(pic) + "&title=" + encodeURIComponent(source) + "&description=" + encodeURIComponent(title);
break;
case "sohu":
shareUrl = "http://t.sohu.com/third/post.jsp?&appkey="+ appKey +"&url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&content=utf-8&pic=" + encodeURIComponent(pic); //
break;
case "msn":
shareUrl = "http://profile.live.com/badge/?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&description=" + encodeURIComponent(title);
break;
case "douban":
shareUrl = "http://www.douban.com/recommend/?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title);
break;
case "kaixin":
shareUrl = "http://www.kaixin001.com/repaste/bshare.php?rtitle=" + encodeURIComponent(title) + "&rurl=" + encodeURIComponent(url) + "&rcontent=" + encodeURIComponent(title);
break;
case "eastmoney": //
shareUrl = "http://t.eastmoney.com/share.aspx?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&r=" + Math.random();
break;
case "guba": //
shareUrl = "http://iguba.eastmoney.com/share?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&r=" + Math.random();
break;
}
window.open(shareUrl);
};
// example:
shareTo("tencent", "fromVia");
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Csharp: 흰색 바탕 이미지 투명 처리텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.