From 6a7e1f5b8a08728860140652d442209f810d58e1 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 01 四月 2024 16:12:21 +0800 Subject: [PATCH] 问题修改 --- pages/cart/paymentPage/index.js | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pages/cart/paymentPage/index.js b/pages/cart/paymentPage/index.js index 37b34e9..de51373 100644 --- a/pages/cart/paymentPage/index.js +++ b/pages/cart/paymentPage/index.js @@ -1,6 +1,8 @@ // pages/cart/paymentPage/index.js const app = getApp() -import { getPublicImage } from '../../../assets/js/middleGround/tool'; +import { + getPublicImage +} from '../../../assets/js/middleGround/tool'; import drawQrcode from './js/weapp.qrcode' Page({ @@ -18,6 +20,7 @@ orderGoods: '', isPaySuccess: false, isPayComplete: false, + type: '' }, /** @@ -113,14 +116,17 @@ }) res.saleMethodLinks.forEach(item => { + const type = item.type == 'createProductItemSaleMethod' ? 'item' : 'product'; + item.type = type; // 灏唗ype璁剧疆涓篿tem瀵硅薄鐨勫睘鎬э紝鑰屼笉鏄娇鐢╯etData item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon) - console.log(item.orderSaleMethod.type); - this.setData({ - productList: res.saleMethodLinks, - type: item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product' - }) + console.log(item.type, 'item'); + + }) + this.setData({ + productList: res.saleMethodLinks, + // type: item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product' }) }) }, @@ -134,6 +140,7 @@ if (res.orderNumber) { let resOrderNum = { orderNum: res.orderNumber, + platform: "WeChatAppCustom" }; console.log(resOrderNum, 'resOrderNum'); // 鐢ㄦ埛鏈粦瀹氬井淇� 鎶�500 -- Gitblit v1.9.1