From ffe748f8069aeeaf0ffae846f7c09210ce64da4b Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期三, 18 十二月 2024 11:29:00 +0800 Subject: [PATCH] 修改表述文字 --- pages/rechargeMoney/rechargMoney.js | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pages/rechargeMoney/rechargMoney.js b/pages/rechargeMoney/rechargMoney.js index 873f665..1d9d079 100644 --- a/pages/rechargeMoney/rechargMoney.js +++ b/pages/rechargeMoney/rechargMoney.js @@ -23,6 +23,7 @@ pageSize: 20, //鍏呭�艰褰曟瘡椤佃褰曟暟 loading: false, //鏄惁姝e湪鍔犺浇 hasMore: true, + moneyList:[]//鍏呭�奸噾棰� }, /** @@ -38,7 +39,8 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 */ onReady() { - this.getRechargList() + this.getRechargList(); + this. getMorneyList(); }, /** @@ -103,7 +105,7 @@ const data = { sessionId: getApp().globalData.sessionId, vcId: this.data.vcId, //铏氭嫙鍗D - rechargeAmount: 1 //锛堝崟浣嶆槸鍒嗭級 + rechargeAmount: this.data.moneyList[this.data.activeIndex].rechargeAmount//锛堝崟浣嶆槸鍏冿級 }; console.log("postCloseValaue" + data); post({ @@ -198,9 +200,10 @@ this.getRechargList(); } }, + //澶勭悊鍏呭�艰褰曠殑鏁版嵁 updateDisplayText() { const updatedList = this.data.allRechargeList.map(item => { - let morny = item.rechargeAmount / 100 + "鍏�" + let morny = item.rechargeAmount + "鍏�" return { ...item, morny @@ -210,5 +213,23 @@ this.setData({ allRechargeList: updatedList }); + }, + //鑾峰彇閲戦 + getMorneyList(){ + const params = { + url: 'wx/virtual_card/gerRechargeProfiles' + }; + get(params).then(data => { + this.setData({ + moneyList: data.content , + }) + }).catch(err => { + // 閿欒鍥炶皟 + wx.showToast({ + title: err.msg, + icon: 'error', + duration: 3000 + }) + }); } }) \ No newline at end of file -- Gitblit v1.8.0