transport.js 535 B

12345678910111213141516171819202122
  1. 'use strict';
  2. // const _ = require('lodash');
  3. const meta = require('./.transport.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 运输
  7. class TransportController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.order.transport;
  11. }
  12. async sign() {
  13. const res = await this.service.sign(this.ctx.request.body);
  14. this.ctx.ok(res);
  15. }
  16. }
  17. module.exports = CrudController(TransportController, meta);