setProductArray(index) { const that = this; let data = that.productList[that.menuSelect].child_product_list[index]; if (that.productArray.length) { let isSetIndex = that.productArray.findIndex(item => item.id === data.id); if(isSetIndex == -1){ hat.productArray.push(data); }else{ that.productArray[isSetIndex].number++; } else { that.productArray.push(data); } },
发表评论 取消回复