Browse Source

修改搜索数据的问题

shenjj 7 years ago
parent
commit
33573ef2b9
1 changed files with 2 additions and 4 deletions
  1. 2 4
      pages/mobile/search/newkeycode.vue

+ 2 - 4
pages/mobile/search/newkeycode.vue

@@ -408,7 +408,7 @@
       } else {
         // 其他情况
         allTotal = stockallTotal + futuresallTotal
-        allPage = Math.ceil(data.stock.total / 10)
+        allPage = data.stock && Math.ceil(data.stock.total / 10) || 0
       }
       return {
         ChooseTop: ChooseTop,
@@ -555,10 +555,8 @@
             pbranden: product.brand,
             brand: product.brand,
             spec: product.spec,
-            kind: product.cmpCode
+            kind: product.kind
           }
-          console.log(item)
-          console.log(product)
           this.currentProduct = item
           this.showPublishBox = true
         } else {