shareTo 网页版分享
// 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");
shareTo 网页版分享的更多相关文章
- 分享:计算机图形学期末作业!!利用WebGL的第三方库three.js写一个简单的网页版“我的世界小游戏”
这几天一直在忙着期末考试,所以一直没有更新我的博客,今天刚把我的期末作业完成了,心情澎湃,所以晚上不管怎么样,我也要写一篇博客纪念一下我上课都没有听,还是通过强大的度娘完成了我的作业的经历.(当然作业 ...
- 有图有真相,分享一款网页版HTML5飞机射击游戏
本飞机射击游戏是使用HTML5代码写的,尝试通过统一开发环境(UDE)将游戏托管在MM应用引擎,直接生成了网页版游戏,游戏简单易上手,非常适合用来当做小休闲打发时间. 游戏地址:http://flyg ...
- 基于HTML5的捕鱼达人游戏网页版
之前给大家分享了html5实现的水果忍者,愤怒的小鸟,中国象棋游戏.今天给大家分享一款捕鱼达人(fishjoy)网页版游戏的源码.可以在线玩也可以下载到本地.它使用html5技术和javascript ...
- 基于html5 canvas和js实现的水果忍者网页版
今天爱编程小编给大家分享一款基于html5 canvas和js实现的水果忍者网页版. <水果忍者>是一款非常受喜欢的手机游戏,刚看到新闻说<水果忍者>四周年新版要上线了.网页版 ...
- 网页版仿Excel效果组件--handsontable拓展运用
引言(祝看官们新年万事大吉) 前段时间项目需要实现网页版的excel表格功能,瞬间就想到了handsontable,为什么呢?理由如下:该UI组件功能齐全多样,展示效果也更贴近bootstrap风格, ...
- Facebook的一些基本操作(网页版)
前期准备 1,注册一次Facebook账号,新建一个应用取到应用id 2,引进Facebook的SDK到页面中: 在js中引进以下代码,初始化 // facebook window.fbAsyncIn ...
- 基于jQuery仿QQ音乐播放器网页版代码
基于jQuery仿QQ音乐播放器网页版代码是一款黑色样式风格的网页QQ音乐播放器样式代码.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="m ...
- 基于React.js网页版弹窗|react pc端自定义对话框组件RLayer
基于React.js实现PC桌面端自定义弹窗组件RLayer. 前几天有分享一个Vue网页版弹框组件,今天分享一个最新开发的React PC桌面端自定义对话框组件. RLayer 一款基于react. ...
- 如何利用WebSocket实现网页版聊天室
花了将近一周的时间终于完成了利用WebSocket完成网页版聊天室这个小demo,期间还走过了一段"看似弯曲"的道路,但是我想其实也不算是弯路吧,因为你走过的路必将留下你的足迹.这 ...
随机推荐
- 创建maven parent project & module project
1.命令方式: 1)Create the top-level root: mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo.arc ...
- [hdu1269]迷宫城堡(SCC)
题意:求一张图的强连通分量,若为1,则输出yes,否则输出no. 解题关键:targin算法模板题. #include<iostream> #include<cstring> ...
- Robot FrameWork基础学习(四) 元素定位
元素定位 对于web自动化测试来说,就是操作页面的各种元素,在操作元素之间需要先找到元素,换句话说就是定位元素. Selenium2Library提供了非常丰富的定位器: 虽然提供了这么多种定位方式, ...
- Linux安装JDK1.7 prm
[转]Linux安装JDK1.7 prm 一.卸载JDK Linux会自带JDK,如果不使用自带版本的话需要卸载. 1.卸载系统自带的jdk版本 查看自带的jdk #rpm -qa | ...
- phpcms后台栏目权限修改无效的原因和解决方法
现象:在phpcms后台中,新建角色,然后修改角色对应栏目权限,结果一直只能选择一半数量的栏目.剩下的栏目怎么修改都不生效. 对比: step1:再另一个phpcms后台做同样操作,依旧是这个结果.跟 ...
- js用"."和"[]"获取属性的区别
在JavaScript中通常使用”."运算符来存取对象的属性的值.或者使用[]作为一个关联数组来存取对象的属性. 对象的属性和方法统称为对象的成员. 访问对象的属性 在JavaScript中 ...
- uva12186 Another Crisis
题目大意: 世界危机发生了,工人们请求加薪.一个老板和n个员工组成树状结构,每个员工都有自己的唯一上司,Boss的编号为0,员工1~n,工人们打算签署一个志愿书给老板,但无法跨级,当一个中级员工(非是 ...
- Codevs 2765 隐形的翅膀
2765 隐形的翅膀 题目描述 Description 天使告诉小杉,每只翅膀都有长度,两只翅膀的长度之比越接近黄金分割比例(黄金分割比= 0.6180339887498949),就越完美. 现在 ...
- jzoj6002. 【PKUWC2019模拟2019.1.15】Permutation (组合数)
题面 题解 设\(lim=(n-1)/2\)(这里是下取整),那么\(x\)位置的值最大不能超过\(lim\),而\(y\)处的值不能小于\(y\),于是有\[Ans=\sum_{i=1}^{lim} ...
- 封装MySQL的单例,连接数据库并对数据进行增删改查操作
单例: 一个类只能有一个对象 应用场景:多次请求数据库只需要一个连接对象. 实现:三私一公 1.私有的静态属性用来保存对象的单例2.私有的构造方法用来阻止在类的外部实例化3.私有的__clone阻止在 ...