12345678910111213141516171819202122 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
- // 微信
- class WeixinController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.system.weixin;
- }
- async appAuth() {
- const data = await this.service.appAuth(this.ctx.query, this.ctx.tenant);
- this.ctx.ok({ data });
- }
- async decrypt() {
- const data = await this.service.getSecret(this.ctx.request.body);
- this.ctx.ok({ data });
- }
- }
- module.exports = CrudController(WeixinController, {});
|