@eht/egg-wechat

0.1.17 • Public • Published

egg-wechat

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

Install

$ yarn add eht@egg-wechat

Usage

// {app_root}/config/plugin.js
exports.wechat = {
  enable: true,
  package: 'eht@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//:'    //远程同步路径
    }
  }
};

/@eht/egg-wechat/

    Package Sidebar

    Install

    npm i @eht/egg-wechat

    Weekly Downloads

    0

    Version

    0.1.17

    License

    MIT

    Unpacked Size

    33.1 kB

    Total Files

    14

    Last publish

    Collaborators

    • kayorl