diff --git a/common/common.js b/common/common.js index c243734..4a441eb 100644 --- a/common/common.js +++ b/common/common.js @@ -53,7 +53,7 @@ const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnified // 钱包-根据订单ID获取购买优惠券信息 const couponInfo = serverUrl + "/business/h5/wallet/detail/couponInfo"; // const couponInfo = "http://127.0.0.1:8075/business/h5/wallet/detail/couponInfo"; - +const queryParkingRecordByCarNumbers ="https://pay.jycrtc.com/queryParkOrder/queryParkingRecordPageByCarNumbersForBusiness"; @@ -226,5 +226,5 @@ export default { walletDetailsPage, publicUnifiedOrder, couponInfo, - + queryParkingRecordByCarNumbers, } diff --git a/common/filters.js b/common/filters.js index 9ac25da..f57c60d 100644 --- a/common/filters.js +++ b/common/filters.js @@ -68,14 +68,35 @@ const toThousands = (num) => { return result.join(''); } -// 根据身份证号码判断男女 -const sexFilter = value => { - if (!value) { - return '' - } else { - let data = value.substr(16, 1) % 2 === 1 ? '男' : '女' - return data +// 1天1小时1分钟1秒 +const timeFormatter = value => { + let time = ''; + if (null != value && "" != value) { + let timer = parseInt(value); + if (timer == 0) { + return '0秒'; + } + let days = parseInt(timer / (60 * 60 * 24)); + let hours = parseInt((timer % (60 * 60 * 24)) / (60 * 60)); + let minutes = parseInt((timer % (60 * 60)) / (60)) + let seconds = parseInt(timer % (60)); + if (days > 0) { + time = time + days +'天'; + } + if (hours > 0) { + time = time + hours +'小时'; + } + if (minutes > 0) { + time = time + minutes +'分钟'; + } + if (seconds > 0) { + time = time + seconds +'秒'; + } + return time; + }else{ + return '-' } + } // 商户卡券类型 @@ -111,6 +132,6 @@ export default { toFixed2, ortherToFixed, toThousands, - sexFilter, + timeFormatter, cardTypeFormate } diff --git a/pages.json b/pages.json index 22d7618..81fa8db 100644 --- a/pages.json +++ b/pages.json @@ -13,6 +13,13 @@ }, "pages": [ // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "商户管理" + } + }, { "path": "pages/businessCard/provideCard", "style": { @@ -43,12 +50,6 @@ }, { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "商户管理" - } - }, - { "path": "pages/parkRecordList/parkRecordList", "style": { "navigationBarTitleText": "停车记录" @@ -265,7 +266,8 @@ } } - ], + + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "江阴慧停车", diff --git a/pages/index/index.vue b/pages/index/index.vue index 4f79b5f..7123b9f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -42,7 +42,7 @@ - + @@ -199,8 +199,12 @@ }); }, - - + toCarNumberPage() { + uni.navigateTo({ + url: '../inputCarNumber/inputCarNumber' + + }); + }, } } diff --git a/pages/inputCarNumber/inputCarNumber.vue b/pages/inputCarNumber/inputCarNumber.vue index 9473aa2..370dae9 100644 --- a/pages/inputCarNumber/inputCarNumber.vue +++ b/pages/inputCarNumber/inputCarNumber.vue @@ -242,13 +242,13 @@ export default { } if(err) return uni.showToast({ title:'请输入完整的车牌号码', - icon:'none' + icon:'error' }) console.log(plate) uni.navigateTo({ - url: '../parkRecord/parkRecord?carNumber='+plate + url: '../parkPay/parkPay?carNumber='+plate }) }, changeKeyboardHeight(){ diff --git a/pages/parkPay/parkPay.vue b/pages/parkPay/parkPay.vue index d2391f2..6cff815 100644 --- a/pages/parkPay/parkPay.vue +++ b/pages/parkPay/parkPay.vue @@ -1,920 +1,226 @@