All Projects → unclexiao → Egg Mp

unclexiao / Egg Mp

Licence: mit
EggJS插件:微信公众平台基本服务

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Egg Mp

egg-rbac
Role Based Access Control for eggjs
Stars: ✭ 32 (-79.08%)
Mutual labels:  egg-plugin, eggjs
egg-logger-sls
Logger transport for aliyun sls.
Stars: ✭ 14 (-90.85%)
Mutual labels:  egg-plugin, eggjs
egg-sentry
Sentry Plugin For Egg.js
Stars: ✭ 18 (-88.24%)
Mutual labels:  egg-plugin, eggjs
egg-cache
💾 Cache plugin for eggjs
Stars: ✭ 60 (-60.78%)
Mutual labels:  egg-plugin, eggjs
Egg Authz
egg-authz is an authorization middleware for Egg.js based on Casbin
Stars: ✭ 50 (-67.32%)
Mutual labels:  eggjs, egg-plugin
Cool Admin Api
cool-admin-api 是基于egg.js、typeorm、jwt等封装的api开发脚手架、快速开发api接口
Stars: ✭ 188 (+22.88%)
Mutual labels:  eggjs, egg-plugin
egg-parameters
Merge all parameters (ctx.params, ctx.request.query, ctx.request.body) into ctx.params like Rails application.
Stars: ✭ 24 (-84.31%)
Mutual labels:  egg-plugin, eggjs
Egg Oauth2 Server
🌟 OAuth2 server plugin for egg.js based on node-oauth2-server
Stars: ✭ 174 (+13.73%)
Mutual labels:  eggjs, egg-plugin
Egg Cancan
cancancan like authorization plugin for Egg.js
Stars: ✭ 47 (-69.28%)
Mutual labels:  eggjs, egg-plugin
Egg 24time
A Twitter-like news and social server for Egg. 微信小程序社区全栈解决方案
Stars: ✭ 493 (+222.22%)
Mutual labels:  eggjs, egg-plugin
Egg Graphql
Stars: ✭ 345 (+125.49%)
Mutual labels:  eggjs, egg-plugin
Egg Sofa Rpc
SOFARPC plugin for egg
Stars: ✭ 71 (-53.59%)
Mutual labels:  eggjs, egg-plugin
Egg Mongo Native
MongoDB egg.js plugin using native driver.
Stars: ✭ 69 (-54.9%)
Mutual labels:  eggjs, egg-plugin
Egg Router Plus
The missing router feature for eggjs
Stars: ✭ 117 (-23.53%)
Mutual labels:  eggjs, egg-plugin
Wechat Django
WeChat-Django旨在为接入微信公众平台的django开发者提供便捷的微信功能封装及最基本的后台管理支持
Stars: ✭ 143 (-6.54%)
Mutual labels:  wechat
Vue Shopping
vue电商 基于Vue2.5+Koa2+Mongodb+Vant的移动电商webapp
Stars: ✭ 148 (-3.27%)
Mutual labels:  eggjs
Gochat
🔥 微信 Go SDK 🚀🚀🚀
Stars: ✭ 141 (-7.84%)
Mutual labels:  wechat
Sofa Bolt Node
The Node.js implementation of the SOFABolt protocol
Stars: ✭ 142 (-7.19%)
Mutual labels:  eggjs
Magento Chatbot
Magento Chatbot Integration with Telegram, Messenger, Whatsapp, WeChat, Skype and wit.ai.
Stars: ✭ 149 (-2.61%)
Mutual labels:  wechat
Wechat Playground
🐳 WeChat Playground - 开源微信调试工具
Stars: ✭ 147 (-3.92%)
Mutual labels:  wechat

egg-mp

npm version

微信公众平台常规的后端服务,献给了不起的EggJS

特性

微信小程序

  • [X] 小程序登录
  • [X] 小程序授权
  • [X] 小程序支付
  • [X] 推送模板消息
  • [X] 检测是否含有敏感词
  • [ ] 生成二维码/小程序码
  • [ ] 接入在线客服消息

微信服务号

  • [X] 网页授权
  • [X] 发送模板消息
  • [X] 获取用户基础信息
  • [X] 获取用户列表
  • [X] 服务号网页支付
  • [X] 前端调用JSSDK

安装

$ npm i egg-mp --save

启用插件

// {app_root}/config/plugin.js
exports.mp = {
  enable: true,
  package: 'egg-mp',
};

应用配置

// {app_root}/config/config.default.js
exports.mp = {
  appId: '', // 公众平台应用编号
  appSecret: '', // 公众平台应用密钥
  mchId: '', // 商户平台商家编号
  apiKey: '', // 商户支付密钥
  notifyUrl: '' // 支付结果回调地址
};

请查看官网的 config/config.default.js 获取更详细说明.

简单实例

async login() {
    const { ctx, service } = this;
    const { code } = ctx.request.query;
    let res = await service.mp.login(code);
    // {
    //   session_key: "Sop9yRVgqnCFjsqANnNE2Q==",
    //   openid: "oo17M4gnwK3iQd6dxcA5mLDkoHA8"
    // };
}

基础教程

  • 配置项如何找到?
  • 如何搭建环境?
  • 如何本地调试?
  • 登录与授权(获取用户信息)
  • 微信支付(小程序、服务号)
  • 推送消息(服务通知、模板消息)
  • 生成二维码(或小程序码)

问题与建议

请在这里向我提出问题

开源协议

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].