iseber-wx

1.0.2 • Public • Published

iseberWx 是广州石贝网络的公众号开发的微信方法集合.

Decoding

npm install

var iseberWx = require('iseber-wx');
/***  
    params: appid:微信公众号AppID,
            secret:微信公众号secret,
            cacheIp:memcached的主机Ip,
            cachePort:memcached的使用端口号
***/
var wx = new iseberWx(appid,secret,cacheIp,cachePort);

/***  
    params: 
    ASSII排列
***/
wx.raw();

/***  
    params: 
    获取网页权限
***/
wx.getAccessToken().done(function(result){
    console.log(result);
});

/***  
    params: code  // 微信网页授权的返回code值
    获取授权用户的openid
***/
wx.getWeixinOpenId(code).done(function(result){
    console.log(result);
});

/***  
    params: code  // wx.getWeixinOpenId得到的用户的openid
    获取授权用户的个人信息openid
***/
wx.getWeixinUserInfo(openid).done(function(result){
    console.log(result);
});

/***  
    params: param  // param={
        "openid":openid,// 被推送人的openid
        "template_id":template_id,// 推送的消息的模版ID
        "url":url, // 点击推送消息要跳转的连接         
        "data":data // 推送消息的详细数据
    }
    向关注公众号指定用户推送消息    
***/
wx.pushModelMsg(param).done(function(result){
    console.log(result);
});

Encoding

更多npm包 关注angaoju

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i iseber-wx

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • angaoju