1234567891011121314151617181920 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose/lib/controller');
- // 微信支付部分
- class WxpayController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.wxpay;
- }
- async toAuth() {
- const res = await this.service.toAuth(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async cash() {
- const res = await this.service.cash(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- }
- module.exports = CrudController(WxpayController, {});
|