yiming
2024-04-02 312fd09aaf90c0e52ab61bde22d0edbf105baa5e
pages/cart/paymentPage/index.js
@@ -94,6 +94,7 @@
  getOrderByOrderNumData() {
    console.log(this.data.orderNumber, 'this.data.orderNumber');
    let query = {
      orderNum: this.data.orderNumber,
      fields: {
@@ -115,14 +116,12 @@
        payPrice: res.payPrice.toFixed(2)
      })
      res.saleMethodLinks.forEach(item => {
        console.log(item.type, 'item.type');
        const type = item.type == 'createProductItemSaleMethod' ? 'item' : 'product';
        const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product';
        item.type = type; // 将type设置为item对象的属性,而不是使用setData
        item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon)
        console.log(item.type, 'item');
      })
      this.setData({
        productList: res.saleMethodLinks,