From e3f638d52864bce07a024b11846b8a59cf725660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?= <15778543+xufeiyang6017@user.noreply.gitee.com> Date: Fri, 2 Jan 2026 15:36:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=9A=E6=94=AF=E6=8C=81specification=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=92=8Cyolk=E5=AD=97=E6=AE=B5=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E5=8D=87=E6=90=9C=E7=B4=A2=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 6 ++++-- pages/index/index.wxml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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 + '件' : '暂无'}}