抖音模板已经改出文件

This commit is contained in:
liufumingren 2026-10-29 15:02:29 +08:00
parent 2a23beebbc
commit 96ec7c0d63
3 changed files with 3 additions and 18 deletions

View File

@ -8,19 +8,6 @@ class TemplateController extends Controller {
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 = `<?xml version="1.0" encoding="UTF-8"?>
<layout id="CUSTOM_AREA" width="97" height="60" left="0" top="111" style="">
<layout width="57" height="30" left="2" top="2" style="">
<text style="fontFamily:宋体;fontSize:9;fontWeight:600"><![CDATA[<%=_data.productInfo%>]]></text>
</layout>
</layout>`;
}
}
module.exports = TemplateController;

View File

@ -1829,8 +1829,8 @@ function applyDouyinExpressFieldMapping(platform, skeleton, orderExpress, orderD
}
const customContent = contents[1];
if (!toTrimmedString(customContent.templateURL)) {
const baseUrl = toTrimmedString(customAreaBaseUrl) || 'http://www.ye4s.com';
customContent.templateURL = baseUrl + '/mb/douyin1.xml';
const baseUrl = toTrimmedString(customAreaBaseUrl) || 'http://qimen.wms.gztbyc.com';
customContent.templateURL = baseUrl + '/mb/douyin.xml';
}
customContent.data = isPlainObject(customContent.data) ? customContent.data : {};
customContent.data.productInfo = customProductInfo || '无拣货信息';

View File

@ -64,8 +64,6 @@ module.exports = app => {
// 打印模板
router.get('/template/xml/:id', controller.template.xml);
// 打印自定义区模板(抖音面单等)
router.get('/mb/douyin1.xml', controller.template.douyinCustomArea);
// 打印台设置
router.get('/auth/printSetting/:code', controller.auth.printerSetting);