【文件属性】:
文件名称:koa-wechat:koajs的微信API中间件
文件大小:2KB
文件格式:ZIP
更新时间:2021-07-12 05:42:49
JavaScript
koa-微信
微信公众平台API(微信公众平台API)中间件
用法
var app = require ( 'koa' ) ( )
var wechat = require ( 'koa-wechat' )
app . use ( wechat ( { token : 'wechat_token' } ) )
要将其与weixin-robot :
// Get the robot
app.use(function *(next) {
var media_id = this.path.split('/')[1]
if (!media_id) {
this.throw(404)
}
var webot = yield Webot.get(media_id)
if (!webot) {
this.throw(404)
}
this.webot
【文件预览】:
koa-wechat-master
----index.js(2KB)
----package.json(652B)
----.gitignore(28B)
----README.md(1KB)