ES6 方式 动态创建类的方式module.exports = think.middleware({ middleare.run() return {Promise}middleware 对外的方法入口,调用 middleware 时会自动调用该方法。