diff --git a/app.js b/app.js index 8b6c74a..fbbfad8 100644 --- a/app.js +++ b/app.js @@ -119,6 +119,9 @@ App({ _id: item?._id ? String(item._id) : '', name: String(item?.name || '').trim(), entityName: String(item?.entityName || '').trim(), + nicknames: Array.isArray(item?.nicknames) + ? item.nicknames.map((name) => String(name || '').trim()).filter(Boolean) + : [], pinyin: String(item?.pinyin || '').trim(), pinyinFL: String(item?.pinyinFL || '').trim(), province: String(item?.province || '').trim(), diff --git a/components/hospital-select/index.js b/components/hospital-select/index.js index 33214e2..270fbfd 100644 --- a/components/hospital-select/index.js +++ b/components/hospital-select/index.js @@ -14,6 +14,7 @@ function filterHospitals(options, keyword) { item.entityName, item.pinyin, item.pinyinFL, + ...(Array.isArray(item.nicknames) ? item.nicknames : []), ].some((field) => normalizeKeyword(field).includes(kw))) }