1234567891011121314151617181920212223242526272829 |
- import { Controller, Get, Inject, Param } from '@midwayjs/core';
- import { RF } from '../response/CustomerResponse';
- import { PartsService } from '../service/parts.service';
- @Controller('/common')
- export class CommonController {
- @Inject()
- service: PartsService
- /**
- * 查询channel
- * @param channel_id
- */
- @Get('/channel/:channel_id')
- async channelDetail(@Param('channel_id') channel_id: string) {
- const data = await this.service.channelDetail(channel_id)
- return RF.success(data)
- }
- /**
- * 查询content
- * @param content_id
- */
- @Get('/content/:content_id')
- async contentDetail(@Param('content_id') content_id: string) {
- const data = await this.service.contentDetail(content_id)
- return RF.success(data)
- }
- }
|