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 |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/pages/rechargeMoney/rechargMoney.js b/pages/rechargeMoney/rechargMoney.js
index f33ae44..c12738e 100644
--- a/pages/rechargeMoney/rechargMoney.js
+++ b/pages/rechargeMoney/rechargMoney.js
@@ -105,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({
@@ -219,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