闫增涛
2024-11-28 dce885689d308043450f199981722b5c80360fe7
pages/cart/paymentPage/index.js
@@ -158,10 +158,12 @@
      if (Number(this.data.payPrice) < Number(this.data.price)) {
        this.handleChange()
      }
      console.log(res, "res")
      res.saleMethodLinks.forEach(item => {
        const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product';
        item.type = type; // 将type设置为item对象的属性,而不是使用setData
        item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon)
        item.price = item.orderSaleMethod.price.toFixed(2)
        if (item.orderSaleMethod.product.cmsTypeRefCode == 'jsek_digitalTextbooks') {
          item.typeTxt = '数字教材'
          item.productType = "数字教材"
@@ -171,11 +173,14 @@
        } else {
          item.typeTxt = '电子书'
          item.productType = "图书服务-电子书"
          if (item.orderSaleMethod.type == 'createProductItemSaleMethod') {
            item.typeTxt = '云学习'
            item.productType = "图书服务-云学习"
          }
          if (item.orderSaleMethod.cmsItemList.length && item.orderSaleMethod.cmsItemList[0].type == "questionBankFolder") {
            item.typeTxt = '题库'
            item.productType = "图书服务-云测试"
          }
        }
      })
      this.setData({