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,期间还走过了一段"看似弯曲"的道路,但是我想其实也不算是弯路吧,因为你走过的路必将留下你的足迹.这 ...
随机推荐
- JAVA操作cassandra数据库
如果是maven项目,在pom.xml里加入依赖.不是的话下载相应的jar包放到lib目录下.这里驱动包的版本要和你cassandra的大版本一致.我这里cassandra的版本是最新的3.9,驱动是 ...
- webSocket 简单介绍
WebSocket :WebSocket协议支持(在受控环境中运行不受信任的代码的)客户端与(选择加入该代码的通信的)远程主机之间进行全双工通信. 简单的说 ...
- day1 java基础回顾-IO流
IO流的分类 注:这几个类都是抽象类. IO解决问题: 解决设备与设备之间 的数据传输问题. 比如: 硬盘--->内存 内存----->硬盘 字节流: 输入字节流:---------| I ...
- centos6.5安装gmime-2.6
安装gmime库所需要的依赖库: 1 libffi库安装 简介:glib安装时依赖的库 解压: tar xf libffi-3.0.0.tar.gz 进入目录: cd libffi-3.0.0 安装: ...
- linux c二级指针的内存分配和使用
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h> ...
- sql中的高级编程(函数,存储过程,视图)
一.函数:用sql写一个函数,调用这个函数,返回一张数据表table CREATE FUNCTION FunName ( ) RETURNS @TempTable table ( roleid int ...
- IntelliJ IDEA 中使用region代码折叠
我使用的版本为2018.3,如下图: 选中要折叠的代码,使用快捷键:Ctrl+Alt+T,打开Surround With菜单,点击region...endregion Comments项(红框),如下 ...
- angular实现表格的全选、单选、部分删除以及全部删除
昨天自己写了一小段js,在全选的时候有点儿小坑,然后,整理了一下.今天把它贴出来,希望以后还记得. 大家也可以去github上查看或下载:https://github.com/dreamITGirl/ ...
- php对数组操作的函数
array_reverse 以相反的顺序返回数组 array_unique 数组元素去重(只对一维数组有效) array_intersect两个或多个数组取交集 implode和explode也 ...
- Jmeter跨线程组传参
我们知道,同一线程组中可以通过“正则表达式提取器”获取其中一个取样器的响应结果中的参数,直接传给线程组中的其他取样器.但其他线程组中的取样器也想使用同样的参数时,无法直接获取.举个例子: 提取“登 ...