<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script> wx.config({ debug: false,// 本地开发为true,上线后改为false appId: 'wxf1fd1ea144944fca', timestamp:'1445840389', nonceStr: "XFZ6hCPvqDlLjk0H", signature: "72685b51957b413b0b7de57a97b8a67338e85147", jsApiList: [ 'onMenuShareTimeline', 'onMenuShareAppMessage' ] }); wx.ready(function () { var gTitle = $('title').text(); var gDesc = $('meta[name=description]').attr('content'); var gLink = window.location.href; var gImgUrl = 'http://m.ajrice.com/Public/Mobile/img/logo.png'; // 分享给朋友 wx.onMenuShareAppMessage({ title: gTitle, // 分享标题 desc: gDesc, // 分享描述 link: gLink, // 分享链接 imgUrl: gImgUrl, // 分享图标 success: function () {}, cancel: function () {} }); // 分享到朋友圈 wx.onMenuShareTimeline({ title: gTitle, // 分享标题 desc: gDesc, // 分享描述 link: gLink, // 分享链接 imgUrl: gImgUrl, // 分享图标 success: function () {}, cancel: function () {} }); }); </script>
2015-10-26 3555