dock.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. 'use strict';
  2. // const _ = require('lodash');
  3. const meta = require('./.dock.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 公共聊天表管理
  7. class DockController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.dock;
  11. }
  12. // GET
  13. // 查询
  14. async myapply() {
  15. const res = await this.service.myapply(this.ctx.query);
  16. this.ctx.ok({ ...res });
  17. }
  18. async updatevipuser() {
  19. const res = await this.service.updatevipuser(this.ctx.params, this.ctx.request.body);
  20. this.ctx.ok({ ...res });
  21. }
  22. async createvipuser() {
  23. const res = await this.service.createvipuser(this.ctx.params, this.ctx.request.body);
  24. this.ctx.ok({ ...res });
  25. }
  26. async dockfetch() {
  27. const res = await this.service.dockfetch(this.ctx.params);
  28. this.ctx.ok({ ...res });
  29. }
  30. async getdock() {
  31. const res = await this.service.getdock(this.ctx.params);
  32. this.ctx.ok({ res });
  33. }
  34. async getapply() {
  35. const res = await this.service.getapply(this.ctx.request.body);
  36. this.ctx.ok({ res });
  37. }
  38. async getdockByopenid() {
  39. const res = await this.service.getdockByopenid(this.ctx.query);
  40. this.ctx.ok({ res });
  41. }
  42. async getgoodslist() {
  43. const data = await this.service.getgoodslist(this.ctx.query);
  44. this.ctx.ok({ data });
  45. }
  46. }
  47. module.exports = CrudController(DockController, meta);