qrcode.js 454 B

12345678910111213141516
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  4. // 二维码
  5. class QrcodeController extends Controller {
  6. constructor(ctx) {
  7. super(ctx);
  8. this.service = this.ctx.service.qrcode;
  9. }
  10. async index() {
  11. const res = await this.service.initQRCode(this.ctx.query);
  12. this.ctx.ok({ data: res });
  13. }
  14. }
  15. module.exports = CrudController(QrcodeController, {});