From c96612e8a63ecef9590be0f8b5199277ec94e5b9 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 18 九月 2024 18:43:12 +0800 Subject: [PATCH] 云学习购买目录,修改bug --- pages/cart/paymentPage/index.js | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pages/cart/paymentPage/index.js b/pages/cart/paymentPage/index.js index 818666c..8bece7c 100644 --- a/pages/cart/paymentPage/index.js +++ b/pages/cart/paymentPage/index.js @@ -161,11 +161,29 @@ payPrice: res.payPrice.toFixed(2), ImmediatelyReceive: res.payPrice }) + console.log(1, res.saleMethodLinks); res.saleMethodLinks.forEach(item => { const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; item.type = type; // 灏唗ype璁剧疆涓篿tem瀵硅薄鐨勫睘鎬э紝鑰屼笉鏄娇鐢╯etData item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon) item.payPrice = this.numFormat(item.payPrice) + item.orderSaleMethod.price = this.numFormat(item.orderSaleMethod.price) + // + if (item.orderSaleMethod.product.cmsTypeRefCode == 'jsek_digitalTextbooks') { + item.typeTxt = '鏁板瓧鏁欐潗' + item.productType = "鏁板瓧鏁欐潗" + } else if (item.orderSaleMethod.product.cmsTypeRefCode == 'jsek_digitalCourses') { + item.typeTxt = '鏁板瓧璇剧▼' + item.productType = "鏁板瓧璇剧▼" + } else { + item.typeTxt = '鐢靛瓙涔�' + item.productType = "鍥句功鏈嶅姟-鐢靛瓙涔�" + + if (item.orderSaleMethod.type == 'createProductItemSaleMethod') { + item.typeTxt = '浜戝涔�' + item.productType = "鍥句功鏈嶅姟-浜戝涔�" + } + } }) this.setData({ productList: res.saleMethodLinks, @@ -223,7 +241,7 @@ if (res) { this.setData({ payId: res.payList[0].id, - payPrice: res.payPrice, + payPrice: res.payPrice.toFixed(2), deduct: (this.data.currentBalance / 100).toFixed(2), integral: this.data.integral - this.data.currentBalance, showIntegral: true @@ -240,7 +258,7 @@ console.log(res, "鍙栨秷鐢ㄧН鍒�") if (res) { this.setData({ - payPrice: res.payPrice, + payPrice: res.payPrice.toFixed(2), showIntegral: false }); this.getIntegral() -- Gitblit v1.9.1