Last active
August 29, 2015 14:00
-
-
Save naoyeye/e1857e89d1201df49df2 to your computer and use it in GitHub Desktop.
wechat share QR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="/components/fancybox/source/jquery.fancybox.css"> | |
<script src="/components/fancybox/source/jquery.fancybox.js"></script> | |
<style> | |
#panel-weixin { | |
display: none; | |
text-align: center; | |
} | |
#panel-weixin .weixin-section { | |
line-height: 1; | |
margin:20px; | |
} | |
#panel-weixin .weixin-section-tip { | |
margin-top: 20px; | |
text-align: left; | |
line-height: 1.4; | |
} | |
#panel-weixin .weixin-share-icon { | |
display: inline-block; | |
padding: 7px 10px 3px 10px; | |
border-radius: 5px; | |
background: #333; | |
color: #fff; | |
} | |
#tip-web { | |
@include respond-to(small-screens) { | |
display: none; | |
} | |
display: block; | |
} | |
#tip-mobi { | |
@include respond-to(small-screens) { | |
display: block; | |
} | |
display: none; | |
} | |
</style> | |
<ul class="share"> | |
<li class="share-item fancybox" id="s-wechat" title="分享到微信" href="#panel-weixin"> | |
<i class="icon-wechat"></i><span class="tip">分享到微信</span> | |
</li> | |
</ul> | |
<div id="panel-weixin"> | |
<h3>分享到微信</h3> | |
<div class="weixin-section"> | |
<img src="http://www.wandoujia.com/qr?c=http%3A%2F%2Fwww.wandoujia.com%2Fcampaign%2Fremixme%2Fstatic%3Futm_source%3Dwechat%26utm_medium%3Dsns%26utm_campaign%3Dremixme" alt=""> | |
<p id="tip-web" class="weixin-section-tip"> | |
1. 打开微信“扫一扫”,扫描二维码。<br><br> | |
2. 等待微信打开网页,然后点击屏幕右上角的“分享”按钮 <span class="weixin-share-icon"><i class="fa fa-share-square-o"></i></span>。 | |
</p> | |
<p id="tip-mobi" class="weixin-section-tip"> | |
1. 将本页面截屏 <br><br> | |
2. 在微信「扫一扫」界面的右上角菜单中选择「从相册选择二维码」<br><br> | |
3. 选择刚刚保存的截屏即可分享。 | |
</p> | |
</div> | |
</div> | |
<script> | |
$(document).on("click", ".share li", function() { | |
var t = $(this); | |
switch (t[0].id) { | |
////// | |
case 's-wechat': | |
$.fancybox.open($('#panel-weixin')); | |
trackEvent(null, 'wechat_static_sharing', false); | |
break; | |
case "s-q-zone": | |
trackEvent(null, 'qzone_static_sharing', false); | |
window.open(qzone); | |
break; | |
case "s-tencent": | |
trackEvent(null, 'tencentweibo_static_sharing', false); | |
window.open(tencent); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment