21,887
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
wx.config({
debug: false,
appId: '{$appid}', // 必填,公众号的唯一标识
timestamp: '{$timestamp}', // 必填,生成签名的时间戳
nonceStr: '{$noncestr}', // 必填,生成签名的随机串
signature: '{$signature}',// 必填,签名,见附录1
jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareQZone']
});
wx.ready(function(){
wx.onMenuShareQQ({
title: 'yes', // 分享标题
desc: 'yes', // 分享描述
link: 'http://m.xxxxxx.com/forum.php', // 分享链接
imgUrl: 'http://m.xxxxxx.com/logo.png', // 分享图标
success: function () {
// 用户确认分享后执行的回调函数
alert('success');
},
cancel: function () {
// 用户取消分享后执行的回调函数
alert('cancel');
}
});