const path=require("path");module.exports=class{constructor(){this.name="base"}get service(){const e=path.resolve(this.ctx.servePath,`service/${this.name}/${this.ctx.service}.js`);let t;try{t=require(e)}catch(e){console.error(e),"MODULE_NOT_FOUND"===e.code&&this.ctx.throw("访问地址不正确","NOT_FOUND"),this.ctx.throw(e.message,e.code)}const s=new t;return s.ctx=this.ctx,s}async exec(){return this.service.exec(this.ctx.data)}};