web/assets/libs/common/social-share.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
define(function(require, exports, module) {
function SocialShare(config) {
this.config = config;
}
SocialShare.prototype.share = function(type, params) {
var url = '';
switch(type) {
case 'weibo':
url = weibo(this.config.weibo, params);
break;
case 'qq':
url = qq(this.config.qq, params);
break;
case 'renren':
url = renren(this.config.renren, params);
break;
case 'douban':
url = douban(this.config.douban, params);
break;
}
if (url) {
window.open(url, 'Share', 'height=400, width=600');
}
};
function weibo(config, params)
{
var query = {};
query.appKey = config.key;
query.url = params.url;
query.title = params.title;
query.pic = params.picture;
return 'http://service.weibo.com/share/share.php?' + buildUrlQuery(query);
}
function qq(config, params)
{
var query = {};
query.appKey = config.key;
query.url = params.url;
query.title = params.title;
query.pics = params.picture;
return 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?' + buildUrlQuery(query);
}
function renren(config, params)
{
var query = {};
query.appKey = config.key;
query.url = params.url;
query.title = params.title;
query.pic = params.picture;
return 'http://www.connect.renren.com/share/sharer?' + buildUrlQuery(query);
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。