正在显示
2 个修改的文件
包含
17 行增加
和
2 行删除
@@ -173,6 +173,21 @@ $(function() { | @@ -173,6 +173,21 @@ $(function() { | ||
173 | $("#searchForm").submit(); //处理事件 | 173 | $("#searchForm").submit(); //处理事件 |
174 | } | 174 | } |
175 | }); | 175 | }); |
176 | + var share_url = encodeURIComponent(location.href); | ||
177 | + var share_title = encodeURIComponent(document.title); | ||
178 | + //分享到微博 | ||
179 | + $('.weibo').click(function(){ | ||
180 | + var param = { | ||
181 | + url: share_url, | ||
182 | + title: share_title, | ||
183 | + rnd: new Date().valueOf() | ||
184 | + }; | ||
185 | + var temp = []; | ||
186 | + for (var p in param) { | ||
187 | + temp.push(p + '=' + encodeURIComponent(param[p] || '')) | ||
188 | + } | ||
189 | + window.open('http://v.t.sina.com.cn/share/share.php?' + temp.join('&')); | ||
190 | + }); | ||
176 | }); | 191 | }); |
177 | 192 | ||
178 | //弹框 | 193 | //弹框 |
1 | <div class="share"> | 1 | <div class="share"> |
2 | <ul> | 2 | <ul> |
3 | <li class="share1"> | 3 | <li class="share1"> |
4 | - <div class="share1_Img"> | 4 | + <div class="share1_Img weixin"> |
5 | <img src="__TMPL__/public/assets/images/bicon_04.png" alt="" /> | 5 | <img src="__TMPL__/public/assets/images/bicon_04.png" alt="" /> |
6 | </div> | 6 | </div> |
7 | <p class="share1_Txt">3.6k</p> | 7 | <p class="share1_Txt">3.6k</p> |
8 | </li> | 8 | </li> |
9 | <li class="share1"> | 9 | <li class="share1"> |
10 | - <div class="share1_Img"> | 10 | + <div class="share1_Img weibo"> |
11 | <img src="__TMPL__/public/assets/images/bicon_05.png" alt="" /> | 11 | <img src="__TMPL__/public/assets/images/bicon_05.png" alt="" /> |
12 | </div> | 12 | </div> |
13 | <p class="share1_Txt">168</p> | 13 | <p class="share1_Txt">168</p> |
-
请 注册 或 登录 后发表评论