Ver código fonte

产品收藏bug处理

yangc 8 anos atrás
pai
commit
ac8e10d094
1 arquivos alterados com 6 adições e 12 exclusões
  1. 6 12
      components/product/component/ComponentDetail.vue

+ 6 - 12
components/product/component/ComponentDetail.vue

@@ -88,21 +88,15 @@
         return this.$store.state.product.common.collectList.data
       },
       collectList () {
-   //     let _this = this
-        if (this.lists.data.properties && this.lists.data.properties.length > 0) {
-          let id = this.lists.data.properties[0].componentId
-          let store = this.colList
-          if (store) {
-            for (let i = 0; i < store.length; i++) {
-              if (store[i].componentid === id) {
-         //       _this.isShow = true
-                return true
-              }
+        let id = this.lists.data.id
+        let store = this.colList
+        if (store) {
+          for (let i = 0; i < store.length; i++) {
+            if (store[i].componentid === id) {
+              return true
             }
           }
         }
-   //     _this.isShow = false
-        return false
       }
     },
     components: {