const { Controller, } = require('egg'); class TemplateController extends Controller { async xml() { const { service, ctx } = this; const result = await service.systems.setting.printTemplate.getXmlByTemplate(ctx.params.id); ctx.body = result; } /** * 输出抖音面单自定义区模板 XML(douyin1.xml) */ async douyinCustomArea() { const { ctx } = this; ctx.type = 'application/xml'; ctx.body = ` ]]> `; } } module.exports = TemplateController;