From 753ccc61382b674ee4f7a907d03470bfc377fc39 Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期一, 04 十一月 2024 10:28:25 +0800 Subject: [PATCH] 修复支付时传入的金额 --- pages/rechargeMoney/rechargMoney.js | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pages/rechargeMoney/rechargMoney.js b/pages/rechargeMoney/rechargMoney.js index 497a378..c12738e 100644 --- a/pages/rechargeMoney/rechargMoney.js +++ b/pages/rechargeMoney/rechargMoney.js @@ -39,7 +39,8 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 */ onReady() { - this.getRechargList() + this.getRechargList(); + this. getMorneyList(); }, /** @@ -104,7 +105,7 @@ const data = { sessionId: getApp().globalData.sessionId, vcId: this.data.vcId, //铏氭嫙鍗D - rechargeAmount: this.data.moneyList[this.data.activeIndex]//锛堝崟浣嶆槸鍒嗭級 + rechargeAmount: this.data.moneyList[this.data.activeIndex].rechargeAmount//锛堝崟浣嶆槸鍒嗭級 }; console.log("postCloseValaue" + data); post({ @@ -218,10 +219,16 @@ url: 'wx/virtual_card/gerRechargeProfiles' }; get(params).then(data => { - this.setData({ - moneyList: data.content , + const updatedList= data.content.map(item=>{ + let money=item.rechargeAmount/100; + return { + ...item, + money + }; }) - this.updateDisplayText(); + this.setData({ + moneyList: updatedList , + }) }).catch(err => { // 閿欒鍥炶皟 wx.showToast({ -- Gitblit v1.8.0