...
|
...
|
@@ -165,23 +165,6 @@ |
|
|
<script src="__TMPL__/public/assets/js/public.js"></script>
|
|
|
|
|
|
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
|
|
|
|
|
|
<script>
|
|
|
$(function () {
|
|
|
// 分享简介
|
|
|
wx.config({
|
|
|
debug: false,
|
|
|
appId: '{$data.appId}',
|
|
|
timestamp: '{$data.timestamp}',
|
|
|
nonceStr: '{$data.nonceStr}',
|
|
|
signature: '{$data.signature}',
|
|
|
jsApiList: [
|
|
|
'onMenuShareAppMessage',
|
|
|
'onMenuShareTimeline',
|
|
|
]
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
<script>
|
|
|
$('.navImg1 img').click(function() {
|
|
|
if ($(this).attr('src') == "__TMPL__/public/assets/images/xx.png") {
|
...
|
...
|
@@ -436,4 +419,45 @@ |
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<script>
|
|
|
$(function () {
|
|
|
// 分享简介
|
|
|
wx.config({
|
|
|
debug: false,
|
|
|
appId: '{$data.appId}',
|
|
|
timestamp: '{$data.timestamp}',
|
|
|
nonceStr: '{$data.nonceStr}',
|
|
|
signature: '{$data.signature}',
|
|
|
jsApiList: [
|
|
|
'onMenuShareAppMessage',
|
|
|
'onMenuShareTimeline',
|
|
|
]
|
|
|
});
|
|
|
var title_title = $(document).attr('title');
|
|
|
var desc = $('.post_title').text();
|
|
|
var link = $('.video_index_url').val();
|
|
|
wx.ready(function(){
|
|
|
wx.onMenuShareAppMessage({
|
|
|
title: '独角星球-'+title_title, // 分享标题朋友
|
|
|
desc: desc, // 分享描述
|
|
|
link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
imgUrl: 'http://www.starplanet.cn/themes/simpleboot3_mobile/public/assets/images/cicon_01@2x.png', // 分享图标
|
|
|
type: '', // 分享类型,music、video或link,不填默认为link
|
|
|
dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
|
|
|
success: function () {}
|
|
|
});
|
|
|
wx.onMenuShareTimeline({
|
|
|
title: '独角星球-'+title_title, // 分享标题朋友圈
|
|
|
desc: desc,
|
|
|
link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
imgUrl: 'http://www.starplanet.cn/themes/simpleboot3_mobile/public/assets/images/cicon_01@2x.png', // 分享图标
|
|
|
success: function () {}
|
|
|
});
|
|
|
wx.error(function (res) {
|
|
|
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|