From 83c494796243558da567e3679a9b65d46b5785fa Mon Sep 17 00:00:00 2001 From: chenbiao Date: Tue, 26 Jul 2022 16:13:41 +0800 Subject: [PATCH] add 7月需求 --- common/common.js | 14 +++++++++++--- common/filters.js | 31 +++++++++++++++++++++++++++++-- pages/businessCard/buyCard.vue | 2 +- pages/index/index.vue | 2 +- pages/moneyRecharge/moneyRecharge.vue | 2 +- pages/parkPay/parkPay.vue | 478 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/parkRecordList/parkRecordList.vue | 335 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------- pages/rechargeDetail/outDetail.vue | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- pages/rechargeDetail/rechargeDetail.vue | 2 +- 9 files changed, 553 insertions(+), 378 deletions(-) diff --git a/common/common.js b/common/common.js index afc9c8c..42faa9e 100644 --- a/common/common.js +++ b/common/common.js @@ -1,6 +1,8 @@ import md5 from './md5.min.js'; // 江阴正式环境 var serverUrl = "https://bus.jycrtc.com"; +// 测试环境 +// var serverUrl = "http://test.jycrtc.com:8096"; //江阴微信小程序appid const hs_wxPay_appId = 'wxfdc1af620d3ab750'; // 江阴慧停车orgId @@ -67,13 +69,17 @@ const walletDetailsPage = serverUrl + "/business/h5/wallet/detailsPage"; // 钱包充值-微信 const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnifiedOrder"; +// 根据商户支出停车费订单ID获取订单信息 +const getParkingInfoByOrderId = serverUrl + "/business/h5/wallet/detail/getParkingInfoByOrderId"; + // 钱包-根据订单ID获取购买优惠券信息 const couponInfo = serverUrl + "/business/h5/wallet/detail/couponInfo"; // 根据车牌号查询车牌号订单支付详情 const queryParkingRecordByCarNumbers ="https://pay.jycrtc.com/queryParkOrder/queryParkingRecordPageByCarNumbersForBusiness"; - -const getOpenIdByCode = "https://pay.jycrtc.com/weixinPublicPay/getSmallRoutineOpenIdByCode" - +// 根据商户支出 购买卡券订单ID获取订单信息 +const getOpenIdByCode = "https://pay.jycrtc.com/weixinPublicPay/getSmallRoutineOpenIdByCode" +// 停车记录明细总览 +const parkingCouponSummary = serverUrl +"/business/h5/order/parkingCouponSummary" const requestSign = function (inputData) { var jsonList = inputData || {}; @@ -257,4 +263,6 @@ export default { couponInfo, queryParkingRecordByCarNumbers, getOpenIdByCode, + getParkingInfoByOrderId, + parkingCouponSummary, } diff --git a/common/filters.js b/common/filters.js index f57c60d..c7e52fb 100644 --- a/common/filters.js +++ b/common/filters.js @@ -3,7 +3,11 @@ const tranNull = value => { if (value === null || value === undefined || value === '') return '-' return value } - +// 为空处理 return ‘’ +const tranStrNull = value => { + if (value === null || value === undefined || value === '') return '' + return value +} /* @切割字符串 @@ -124,14 +128,37 @@ const cardTypeFormate = num => { } +function formatDateYMD(value) { + if (value === null || value === undefined || value === ''){ + return '-' + } else{ + var date = new Date(value); + var y = date.getFullYear(), + m = date.getMonth() + 1, + d = date.getDate(), + h = date.getHours(), + i = date.getMinutes(), + s = date.getSeconds(); + if (m < 10) { m = '0' + m; } + if (d < 10) { d = '0' + d; } + if (h < 10) { h = '0' + h; } + if (i < 10) { i = '0' + i; } + if (s < 10) { s = '0' + s; } + var t = y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s; + return t; + } + +} export default { tranNull, + tranStrNull, RMB, cutString, toFixed2, ortherToFixed, toThousands, timeFormatter, - cardTypeFormate + cardTypeFormate, + formatDateYMD, } diff --git a/pages/businessCard/buyCard.vue b/pages/businessCard/buyCard.vue index ac82670..5d777b9 100644 --- a/pages/businessCard/buyCard.vue +++ b/pages/businessCard/buyCard.vue @@ -174,7 +174,7 @@ export default { let that = this let paramsData = { buyNum: this.vModelValue.toString(), - totalPrice: this.needPay.toString(), + totalPrice: (this.needPay * 100).toString(), cardRelParkNo: this.cardRelParkNo, cardRuleNo: this.cardRuleNo } diff --git a/pages/index/index.vue b/pages/index/index.vue index 807503c..565050a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -21,7 +21,7 @@ - 点击”登录“,即表示你同意《商户用户协议》 + 点击”登录“,即表示你同意《商户用户协议》 diff --git a/pages/moneyRecharge/moneyRecharge.vue b/pages/moneyRecharge/moneyRecharge.vue index 82a258f..8c32820 100644 --- a/pages/moneyRecharge/moneyRecharge.vue +++ b/pages/moneyRecharge/moneyRecharge.vue @@ -3,7 +3,7 @@ 明细 > - ¥{{acctBalance | toFixed2 }} + ¥{{acctBalance | toFixed2 }}元 diff --git a/pages/parkPay/parkPay.vue b/pages/parkPay/parkPay.vue index 37ffe89..5d95f1e 100644 --- a/pages/parkPay/parkPay.vue +++ b/pages/parkPay/parkPay.vue @@ -1,226 +1,276 @@ diff --git a/pages/parkRecordList/parkRecordList.vue b/pages/parkRecordList/parkRecordList.vue index 1599d13..993b31b 100644 --- a/pages/parkRecordList/parkRecordList.vue +++ b/pages/parkRecordList/parkRecordList.vue @@ -1,173 +1,200 @@ diff --git a/pages/rechargeDetail/outDetail.vue b/pages/rechargeDetail/outDetail.vue index f8a79e9..8b6cf9d 100644 --- a/pages/rechargeDetail/outDetail.vue +++ b/pages/rechargeDetail/outDetail.vue @@ -1,7 +1,7 @@