weixin-node-jssdk

0.1.0 • Public • Published

功能

生成使用微信JSSDK的页面所需的配置信息。支持多个不同的微信appId同时使用,会自动缓存appId对应的token和ticket直到失效时间。

安装

  npm install weixin-node-jssdk --save

使用

  var weixinJsConfig = require('weixin-node-jssdk');
  
  var options = {};
  options.appId = 'weixin appId';
  options.appSecret = 'weixin appSecret'
  options.url = 'http://www.example.com/test';
  
  weixinJsConfig(options,function(error,config){
  		//config
  });
  
  
  //config example:
  
  /*
  { nonceStr: 'qw9daikerfmexxxd',
  	 timestamp: 1457675573,
    signature: '8beb309515ca4fd6271a32de0e9732004094b07d',
    appId: 'wxec0751e82f5dde2d' 
  }
  */

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    0

Package Sidebar

Install

npm i weixin-node-jssdk

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • feiin