Skip to content

doerme/wechatshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

wechatshare

使用例子

seajs RequireJS 写法

页面先引入

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
var wechatShare = require('wechatshare.pure');
    wechatShare({
		title: '标题',
		desc: '描述',
		link:'分享点击连接', /*默认值是当前页面连接*/
		img:'分享封面',
		request_share_url:'签名接口地址', /*默认值是h5.yy.com*/
		success_callback:function(){},	/*分享成功回调*/
		cancel_callback:function(){},	/*分享失败回调*/
		debug:false	/*是否启用调试*/
    })

普通引入写法

页面先引入

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="wechatshare.pure.js"></script>
wechatShare({
        title: '标题',
        desc: '描述',
        success_callback: function () {
            alert('success');
        },
        cancel_callback: function () {
            alert('cancel');
        },
        debug: true
    })

About

微信jssdk分享二次封装

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published