bug修复,及体验优化

This commit is contained in:
Dev
2026-10-09 16:59:09 +08:00
parent a35f78e03b
commit 8a9102ab47
11 changed files with 93 additions and 10 deletions
@@ -75,10 +75,12 @@ class MessageService
$lines[] = $name . ':' . $values[$key];
}
}
// 各发送点已把 remark 作为最后一个 value 传入(对应 valueNames 末位的「备注」字段),
// 此处仅在正文尚未包含 remark 时才追加,避免出现两行重复的「备注」
// 备注处理:避免正文出现两行「备注」或语义冲突
// 1) 模板字段里已含「备注」时,发送方自定义了备注文案,不再追加模板默认 remark
// 2) 否则仅在正文尚未包含 remark 时追加,避免重复
$remark = $template['remark'] ?? '';
if ($remark !== '') {
$hasRemarkField = in_array('备注', $valueNames, true);
if ($remark !== '' && !$hasRemarkField) {
$content = implode("\n", $lines);
if (mb_strpos($content, $remark) === false) {
$lines[] = '备注:' . $remark;