Browse Source

fix: 信息价显示空数据匹配总表,兼容总表数据存在无名称无规格的情况

vian 2 days ago
parent
commit
2177cc56eb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      modules/price_info_lib/facade/index.js

+ 2 - 1
modules/price_info_lib/facade/index.js

@@ -661,7 +661,8 @@ const getMatchPrice = (allInfoPrice, nameArray, needHandleLongWord = true) => {
 
     for (const info of allInfoPrice) {
         // specs
-        const matchString = alias(info.name + info.specs); // 组合名称和规格型号
+        if (!info.name && !info.specs) continue;
+        const matchString = alias((info.name || '') + (info.specs || '')); // 组合名称和规格型号
         info.matchString = matchString;
         let matchCount = 0;
         for (const na of nameArray) {