作者 景龙
1 个管道 的构建 通过 耗费 0 秒

测试微博分享

... ... @@ -173,6 +173,21 @@ $(function() {
$("#searchForm").submit(); //处理事件
}
});
var share_url = encodeURIComponent(location.href);
var share_title = encodeURIComponent(document.title);
//分享到微博
$('.weibo').click(function(){
var param = {
url: share_url,
title: share_title,
rnd: new Date().valueOf()
};
var temp = [];
for (var p in param) {
temp.push(p + '=' + encodeURIComponent(param[p] || ''))
}
window.open('http://v.t.sina.com.cn/share/share.php?' + temp.join('&'));
});
});
//弹框
... ...
<div class="share">
<ul>
<li class="share1">
<div class="share1_Img">
<div class="share1_Img weixin">
<img src="__TMPL__/public/assets/images/bicon_04.png" alt="" />
</div>
<p class="share1_Txt">3.6k</p>
</li>
<li class="share1">
<div class="share1_Img">
<div class="share1_Img weibo">
<img src="__TMPL__/public/assets/images/bicon_05.png" alt="" />
</div>
<p class="share1_Txt">168</p>
... ...