中间件通用格式
function xxxxPlugin(options){ return async (ctx,next)=>{ ....操作 await next(); }}module.exports = xxxxPlugin;使用中间件
const xxxPlugin = require('./xxxPlugin');const Koa = require('koa');const app = new Koa();app.use(xxxPlugin({}));...app.listen(1234);


