'use strict'; const Controller = require('egg').Controller; const { BusinessError, ErrorCode } = require('naf-core').Error; const { CrudController } = require('naf-framework-mongoose-free/lib/controller'); // 微信接口 class WxController extends Controller { constructor(ctx) { super(ctx); this.params = this.ctx.params; this.queryObject = this.ctx.request.query; this.reqBody = this.ctx.request.body; this.service = this.ctx.service.wx; } async getOpenid() { const data = await this.service.appAuth(this.ctx.query); this.ctx.ok(data); } } module.exports = CrudController(WxController, {});