//分享QQ好友
function qq(title,url,pic)
{
var p = {
url: 'http://test.qicheyitiao.com',
desc: '来自汽车氪的分享',
title : title,
summary : title,
pics : pic,
flash : '',
//commonClient : true,
site: '汽车氪'
};
var s = [];
for (var i in p) {
s.push(i + '=' + encodeURIComponent(p[i] || ''));
}
var target_url = "http://connect.qq.com/widget/shareqq/iframe_index.html?" + s.join('&') ;
window.open(target_url, 'qq',
'height=520, width=720');
}
//分享到QQ空间
function qZone(title,pic){
var p = {
url: '',
showcount: '1',
desc: '这篇文章不错,分享一下~~',
summary: '',
title: title,
site: '汽车氪',
pics: pic,
style: '101',
width: 199,
height: 30
};
var s = [];
for (var i in p) {
s.push(i + '=' + encodeURIComponent(p[i] || ''));
}
var target_url =
"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?"+s.join('&');
window.open(target_url, 'qZone',
'height=430, width=400');
}
//微信分享
function weixin(){
var target_url =
"http://qr.liantu.com/api.php?text=http://test.qicheyitiao.com";
window.open(target_url, 'weixin',
'height=320, width=320');
}
// 分享新浪微博
function sinaWeiBo(title,url,pic){
var
param = {
url:url,
type:'3',
count:'1',
appkey:'汽车氪',
title:title,
pic:pic, ralateUid:'',
rnd:new Date().valueOf()
}
var temp = [];
for( var p in param ){
temp.push(p + '=' +encodeURIComponent( param[p ] || '' ) )
}
var target_url =
"http://service.weibo.com/share/share.php?"+temp.join('&');
window.open(target_url, 'sinaweibo',
'height=430, width=400');
}