diff --git a/common/common.js b/common/common.js index 011473a..55a9747 100644 --- a/common/common.js +++ b/common/common.js @@ -29,14 +29,17 @@ const userLoginout = serverUrl + "/business/h5/index/logout"; const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; // 商户账户余额信息 -const walletAccount = serverUrl + "/business/h5/wallet/account"; +const walletAccount = serverUrl + "/business/h5/wallet/account"; + +// 商户充值金额列表 +const rechargeList = serverUrl + "/business/h5/wallet/rechargeList"; // const requestSign = function(inputData) { var jsonList = inputData || {}; - // jsonList.orgId = public_orgId; + jsonList.orgId = public_orgId; jsonList.sign_type = "md5"; jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; jsonList.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; @@ -44,7 +47,7 @@ const requestSign = function(inputData) { jsonList.terminalSource = "11"; jsonList.token = getGlobalUser("globalUser").token; // jsonList.token = getGlobalUser("globalUser").token; - // jsonList.token = 'eb1538c4c2ee45d7b2610cf071c4a27f'; + // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; var arrData = []; for (var key in jsonList) { @@ -135,6 +138,7 @@ export default { userLoginout, useraboutUs, walletAccount, + rechargeList, // 通过商户ID查询停车记录信息 getBusinessParkOrderByBusIdForPage:serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage", } diff --git a/common/filters.js b/common/filters.js index 13c812e..563b008 100644 --- a/common/filters.js +++ b/common/filters.js @@ -36,6 +36,13 @@ const toFixed2 = num => { return isNaN(num) ? 0.00 : parseFloat((num/100).toFixed(2)); } +// 钱保留两位小数+其他 +const ortherToFixed = num => { + if(num === -1) return '其他'; + return isNaN(num) ? 0.00 : parseFloat((num/100).toFixed(2)); +} + + // 数字每三位加个逗号 const toThousands =(num)=> { var result = [], @@ -66,6 +73,7 @@ export default { RMB, cutString, toFixed2, + ortherToFixed, toThousands, sexFilter, } diff --git a/pages/moneyRecharge/moneyRecharge.vue b/pages/moneyRecharge/moneyRecharge.vue index 07289f7..6342279 100644 --- a/pages/moneyRecharge/moneyRecharge.vue +++ b/pages/moneyRecharge/moneyRecharge.vue @@ -10,10 +10,16 @@ - {{item.text}} + + {{item.rechargeCode | ortherToFixed}} + + + + @@ -40,39 +46,23 @@