@i-orz/egg-wechat

0.0.3 • Public • Published

egg-wechat

集成了小程序、公众号的常规 api, 以及实现进程间、不同开发环境下的 token 同步

Install

$ yarn add i-orz@egg-wechat

Usage

// {app_root}/config/plugin.js
exports.wechat = {
  enable: true,
  package: 'i-orz@egg-wechat',
};

Configuration

// {app_root}/config/config.default.js

exports.wechatMiniprogram = {
  client: {
    c1: {
      appid: 1,
      secret: secret1,
      sync_uri: 'https//:'    //远程同步路径
    }
  }
};

// 或者

exports.wechatMiniprogram = {
  clients: {
    c1: {
      appid: 1,
      secret: secret1,
      sync_uri: 'https//:'    //远程同步路径
    },
    c2: {
      appid: 2,
      secret: secret2,
      sync_uri: 'https//:'    //远程同步路径
    }
  }
};

Package Sidebar

Install

npm i @i-orz/egg-wechat

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

35.1 kB

Total Files

15

Last publish

Collaborators

  • kayorl