'use strict'; const _ = require("lodash"); const Controller = require('egg').Controller; class HubMotorController extends Controller { //初始化轮毂电机 async init() { let { ctx } = this; let params = ctx.request.body let res = await ctx.service.hubMotor.init(params); ctx.body = res ctx.status = 200 } //保存轮毂电机数据 async save() { let { ctx } = this; let params = ctx.request.body let res = await ctx.service.hubMotor.save(params); ctx.body = res ctx.status = 200 } } module.exports = HubMotorController;