'use strict'; /** * @param {Egg.Application} app - egg application */ module.exports = app => { const { router, controller } = app; // 用户表 router.resources('company', '/api/servicetest/company', controller.company); // index、create、show、destroy router.post('company', '/api/servicetest/company/update/:id', controller.company.update); // 产品表 router.resources('product', '/api/servicetest/product', controller.product); // index、create、show、destroy router.post('product', '/api/servicetest/product/update/:id', controller.product.update); };