// 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 网页版分享的更多相关文章

  1. 分享:计算机图形学期末作业!!利用WebGL的第三方库three.js写一个简单的网页版“我的世界小游戏”

    这几天一直在忙着期末考试,所以一直没有更新我的博客,今天刚把我的期末作业完成了,心情澎湃,所以晚上不管怎么样,我也要写一篇博客纪念一下我上课都没有听,还是通过强大的度娘完成了我的作业的经历.(当然作业 ...

  2. 有图有真相,分享一款网页版HTML5飞机射击游戏

    本飞机射击游戏是使用HTML5代码写的,尝试通过统一开发环境(UDE)将游戏托管在MM应用引擎,直接生成了网页版游戏,游戏简单易上手,非常适合用来当做小休闲打发时间. 游戏地址:http://flyg ...

  3. 基于HTML5的捕鱼达人游戏网页版

    之前给大家分享了html5实现的水果忍者,愤怒的小鸟,中国象棋游戏.今天给大家分享一款捕鱼达人(fishjoy)网页版游戏的源码.可以在线玩也可以下载到本地.它使用html5技术和javascript ...

  4. 基于html5 canvas和js实现的水果忍者网页版

    今天爱编程小编给大家分享一款基于html5 canvas和js实现的水果忍者网页版. <水果忍者>是一款非常受喜欢的手机游戏,刚看到新闻说<水果忍者>四周年新版要上线了.网页版 ...

  5. 网页版仿Excel效果组件--handsontable拓展运用

    引言(祝看官们新年万事大吉) 前段时间项目需要实现网页版的excel表格功能,瞬间就想到了handsontable,为什么呢?理由如下:该UI组件功能齐全多样,展示效果也更贴近bootstrap风格, ...

  6. Facebook的一些基本操作(网页版)

    前期准备 1,注册一次Facebook账号,新建一个应用取到应用id 2,引进Facebook的SDK到页面中: 在js中引进以下代码,初始化 // facebook window.fbAsyncIn ...

  7. 基于jQuery仿QQ音乐播放器网页版代码

    基于jQuery仿QQ音乐播放器网页版代码是一款黑色样式风格的网页QQ音乐播放器样式代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class="m ...

  8. 基于React.js网页版弹窗|react pc端自定义对话框组件RLayer

    基于React.js实现PC桌面端自定义弹窗组件RLayer. 前几天有分享一个Vue网页版弹框组件,今天分享一个最新开发的React PC桌面端自定义对话框组件. RLayer 一款基于react. ...

  9. 如何利用WebSocket实现网页版聊天室

    花了将近一周的时间终于完成了利用WebSocket完成网页版聊天室这个小demo,期间还走过了一段"看似弯曲"的道路,但是我想其实也不算是弯路吧,因为你走过的路必将留下你的足迹.这 ...

随机推荐

  1. shell中利用ftp 上传文件夹功能

    我们知道ftp 只能用来上传或者下载文件,一次单个或者多个,怎么实现将文件夹的上传和下载呢? 可以利用先在remote ip上建立一个相同的文件夹目录,然后将文件放到各自的目录中去 1.循环遍历出要上 ...

  2. Java基础知识之常见关键字(1)

    static 特点: 随着类的加载而加载 优先于对象存在 被所有对象所共享 可以直接被类名调用 注意点: 静态方法只能访问静态方法 但是非静态成员可以直接访问静态成员 静态方法中不可以使用this , ...

  3. usb资料2

    ubuntu linux下如何在启动时就关闭usb接口? https://zhidao.baidu.com/question/548651197.html Linux USB 驱动开发(四)—— 热插 ...

  4. 判断ip地址是否为内网ip或局域网ip

    bool IsLanIp(string& ip) { ,) == ,) == ,) == "192.") { return true; } else { return fa ...

  5. window安装android打包环境

    1.下载jdkhttp://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html下载:jdk-8u1 ...

  6. 获取表单的值js

    获取选中的复选框的值和文本 <from> <input name="sg" type="checkbox" value="苹果0&q ...

  7. css需要注意的地方

    如果一个元素设置了postion:abslute;top:20;botoom:20因为设置了top又设置了botoom所以元素会有高度.

  8. [UE4]用C++如何创建Box Collision

    http://www.dawnarc.com/2016/08/ue4%E7%94%A8c--%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BAbox-collision/ 在蓝图 ...

  9. ps图层混合计算公式

    样式效果 http://www.jb51.net/photoshop/104100.html 注释: 1.混合模式的数学计算公式,另外还介绍了不透明度. 2.这些公式仅适用于RGB图像,对于Lab颜色 ...

  10. codevs1245 最小的N个和

    1245 最小的N个和 题目描述 Description 有两个长度为 N 的序列 A 和 B,在 A 和 B 中各任取一个数可以得到 N^2 个和,求这N^2 个和中最小的 N个.