联系官方销售客服
1835022288
028-61286886
微信公众号分享文章到朋友圈或微信好友不显示小图标
已认证服务号 , 后台调用了相关的数据 ,使用的是论坛友友发布的JS 请各位大神给指点指点
{php \Phpcmf\Service::C()->init_file('weixin');$signPackage = \Phpcmf\Service::L('jssdk', 'weixin')->GetSignPackage();} <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script type="text/javascript"> wx.config({ appId: '<?php echo $signPackage["appId"];?>', timestamp: <?php echo $signPackage["timestamp"];?>, nonceStr: '<?php echo $signPackage["nonceStr"];?>', signature: '<?php echo $signPackage["signature"];?>', jsApiList: [ 'checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem', 'translateVoice', 'startRecord', 'stopRecord', 'onRecordEnd', 'playVoice', 'pauseVoice', 'stopVoice', 'uploadVoice', 'downloadVoice', 'chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'getNetworkType', 'openLocation', 'getLocation', 'hideOptionMenu', 'showOptionMenu', 'closeWindow', 'scanQRCode', 'chooseWXPay', 'openProductSpecificView', 'addCard', 'chooseCard', 'openCard' ] }); wx.ready(function () { var shareData = { title: '{$title}', desc: '{$description}', link: "{dr_now_url()}", imgUrl: '{dr_get_file($thumb)}', }; //分享朋友 wx.onMenuShareAppMessage({ title: shareData.title, desc: shareData.desc, link: shareData.link, imgUrl:shareData.imgUrl, trigger: function (res) { }, success: function (res) { _window.location.href =adurl; }, cancel: function (res) { }, fail: function (res) { alert(JSON.stringify(res)); } }); //朋友圈 wx.onMenuShareTimeline({ title: shareData.title+"---"+shareData.desc, link: shareData.link, imgUrl:shareData.imgUrl, trigger: function (res) { }, success: function (res) { _window.location.href =adurl; }, cancel: function (res) { }, fail: function (res) { alert(JSON.stringify(res)); } }); }); </script>