diff --git a/pages/index/index.js b/pages/index/index.js index dc781e0..557ff8a 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -961,9 +961,11 @@ Page({ filtered = filtered.filter(item => { const nameMatch = (item.name || '').toLowerCase().includes(keyword); const productNameMatch = (item.productName || '').toLowerCase().includes(keyword); - const specMatch = (item.spec || '').toLowerCase().includes(keyword); + const specMatch = (item.specification || item.spec || '').toLowerCase().includes(keyword); const regionMatch = (item.region || '').toLowerCase().includes(keyword); - const match = item.isAd || nameMatch || productNameMatch || specMatch || regionMatch; + const grossWeightMatch = (item.grossWeight || '').toLowerCase().includes(keyword); + const yolkMatch = (item.yolk || '').toLowerCase().includes(keyword); + const match = item.isAd || nameMatch || productNameMatch || specMatch || regionMatch || grossWeightMatch || yolkMatch; if (!match && originalLength <= 5) { // 只为小数据集打印详细信息 console.log('商品未匹配:', item.name, '| name:', item.name, '| productName:', item.productName, '| spec:', item.spec, '| region:', item.region); diff --git a/pages/index/index.wxml b/pages/index/index.wxml index fc5c592..6c54b29 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -161,9 +161,9 @@ {{item.name}} {{item.specification || '无'}} | {{item.yolk}} - + {{item.sourceType || ''}} - {{item.negotiateStatus}} + {{item.negotiateStatus}} 库存:{{item.totalStock > 0 ? item.totalStock + '件' : '暂无'}}