美文网首页
js分享,qq分享,qq空间分享,微信分享

js分享,qq分享,qq空间分享,微信分享

作者: mindy1031 | 来源:发表于2018-12-11 11:20 被阅读0次
image.png
//          qq空间分享
<script src="//open.mobile.qq.com/sdk/qqapi.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            const share = {
                title: '分享标题',
                desc: '分享内容',
                image_url: ['分享图片地址'],
                share_url: '分享url'
            };
            let image_urls = share.image_url.map(function(image) {
                return encodeURIComponent(image);
            });
            location.replace('https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(share.share_url) + '&site=掌上理工大&title=' + share.title + '&pics=' + image_urls.join('|') + '&summary=' + share.desc);
        </script>

相关文章

网友评论

      本文标题:js分享,qq分享,qq空间分享,微信分享

      本文链接:https://www.haomeiwen.com/subject/oxeshqtx.html