feat:参数类型调整

This commit is contained in:
2026-08-08 15:17:03 +08:00
parent 74d3c6f382
commit 531033c066
+7 -4
View File
@@ -194,12 +194,15 @@
const way = formData.way === '20' ? 2 : 1; const way = formData.way === '20' ? 2 : 1;
const applyReason = String(formData.applyReason); const applyReason = String(formData.applyReason);
const applyDescription = String(formData.applyDescription || ''); const applyDescription = String(formData.applyDescription || '');
// applyPicUrls:数组 → 逗号拼接字符串(按用户最新给的示例) // applyPicUrls:类型应该是数组或 null(用户最新要求);有值传数组,没值传 null(不传空字符串)
let applyPicUrls = ''; let applyPicUrls = null;
if (Array.isArray(formData.applyPicUrls)) { if (Array.isArray(formData.applyPicUrls)) {
applyPicUrls = formData.applyPicUrls.filter(Boolean).join(','); const list = formData.applyPicUrls.filter(Boolean);
applyPicUrls = list.length ? list : null;
} else if (formData.applyPicUrls) { } else if (formData.applyPicUrls) {
applyPicUrls = String(formData.applyPicUrls); applyPicUrls = [String(formData.applyPicUrls)];
} else {
applyPicUrls = null;
} }
// 选择要提交的订单项列表 // 选择要提交的订单项列表