yiming
2024-03-29 4c472f6bbf82e5ef95b60ac8e417760d89a7ba36
pages/cart/index.js
@@ -78,9 +78,13 @@
        // console.log(item, 'item456');
        item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160');
        this.setData({
          type: item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'
        })
        // this.setData({
        //   type: item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'
        // })
        const type = item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product';
        item.type = type; // 将type设置为item对象的属性,而不是使用setData
        // debugger
      });