mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 21:40:50 +00:00
fix(订单中台): 修复自定义表单标题映射循环变量覆盖缓存凭证键
This commit is contained in:
parent
0aea3f94c7
commit
61f7006a44
@ -1231,8 +1231,9 @@ class CenterOrderController
|
||||
$detailExtend = $handler->getDetailExtend($productId);
|
||||
$productCustomForm = $detailExtend['custom_form'] ?? [];
|
||||
$fieldTitleMap = [];
|
||||
foreach ($productCustomForm as $key => $item) {
|
||||
$fieldTitleMap['custom_field_' . $key] = $item['title'] ?? ('自定义字段' . ($key + 1));
|
||||
// 循环变量不得使用 $key:外层 $key 是订单确认缓存凭证,覆盖后 consumeOrderCache 会因类型错误崩溃
|
||||
foreach ($productCustomForm as $fieldKey => $fieldItem) {
|
||||
$fieldTitleMap['custom_field_' . $fieldKey] = $fieldItem['title'] ?? ('自定义字段' . ($fieldKey + 1));
|
||||
}
|
||||
$structured = [];
|
||||
foreach ($submittedCustomForm as $field => $value) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user