1234567891011121314151617181920212223242526 |
- 'use strict';
- const Controller = require('../extend/baseController');
- class WelcomeMessageController extends Controller {
- tag() {
- return this.ctx.service.welcomeMessageService;
- }
- async listForPage() {
- const { ctx } = this;
- ctx.query.sort = { createTime: -1 };
- if (!ctx.query.searchtitle) {
- delete ctx.query.searchtitle;
- }else{
- ctx.query.title = ctx.query.searchtitle;
- delete ctx.query.searchtitle;
- }
- const result = await this.tag().listForPage(ctx.query);
- ctx.success(result);
- }
- }
- module.exports = WelcomeMessageController;
|