From 1cbd51eccc1061765034fd34bce2c24e9c9443e4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 Mar 2023 00:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E5=85=A5=E5=85=85?= =?UTF-8?q?=E7=94=B5=E6=A1=A9=20=E8=AE=A2=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/account/account.vue | 70 +++++++++++++++ components/my/my-menu.vue | 4 + pages.json | 9 ++ pages/account/preStoreAccount.vue | 29 ++++++ pages/machine/chargeMachineOrder.vue | 21 +++++ pages/machine/chargeMachineOrders.vue | 123 ++++++++++++++++++++++++++ pages/machine/machineToCharge.vue | 10 ++- 7 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 components/account/account.vue create mode 100644 pages/machine/chargeMachineOrders.vue diff --git a/components/account/account.vue b/components/account/account.vue new file mode 100644 index 0000000..39dc132 --- /dev/null +++ b/components/account/account.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/components/my/my-menu.vue b/components/my/my-menu.vue index 56ee1ed..f14a869 100644 --- a/components/my/my-menu.vue +++ b/components/my/my-menu.vue @@ -120,6 +120,10 @@ name: '放行记录', src: this.imgUrl+'/h5/images/serve/my8.png', href: '/pages/itemRelease/myItemReleaseList' + },{ + name: '充电订单', + src: this.imgUrl+'/h5/images/serve/11.png', + href: '/pages/machine/chargeMachineOrders' }, ] }; diff --git a/pages.json b/pages.json index c8d0963..580217a 100755 --- a/pages.json +++ b/pages.json @@ -829,6 +829,15 @@ } } + ,{ + "path" : "pages/machine/chargeMachineOrders", + "style" : + { + "navigationBarTitleText": "充电订单", + "enablePullDownRefresh": false + } + + } ], "tabBar": { "color": "#272636", diff --git a/pages/account/preStoreAccount.vue b/pages/account/preStoreAccount.vue index ebe8a80..a558453 100644 --- a/pages/account/preStoreAccount.vue +++ b/pages/account/preStoreAccount.vue @@ -94,6 +94,13 @@ }); }, _payWxApp: function(_data) { + if(!this.amount){ + uni.showToast({ + icon:'none', + title:'未填写金额' + }); + return ; + } let _receivedAmount = this.amount; let _tradeType = 'APP'; payFeeApp(this,{ @@ -107,6 +114,13 @@ }, onPayFee: function() { + if(!this.amount){ + uni.showToast({ + icon:'none', + title:'未填写金额' + }); + return ; + } let _receivedAmount = this.amount; let _tradeType = 'JSAPI'; @@ -136,4 +150,19 @@ .button_up_blank { height: 40rpx; } + + .cu-btn.lgplus { + padding: 0 20px; + font-size: 18px; + height: 100upx; + + } + + .cu-btn.sharp { + border-radius: 0upx; + } + + .line-height { + line-height: 100upx; + } diff --git a/pages/machine/chargeMachineOrder.vue b/pages/machine/chargeMachineOrder.vue index 2681ef1..c0bd9e3 100644 --- a/pages/machine/chargeMachineOrder.vue +++ b/pages/machine/chargeMachineOrder.vue @@ -10,6 +10,14 @@ {{startTime || 0}} + + + 结束时间 + + + {{endTime || 0}} + + 充电时间 @@ -18,6 +26,14 @@ {{chargeHours || 0}} + + + 充电桩 + + + {{machineName || 0}} + + 充电插槽 @@ -68,7 +84,9 @@ machineId:'', portId:'', startTime: '', + endTime:'', chargeHours: '', + machineName:'', portName: '', durationPrice: '', state: '', @@ -91,12 +109,15 @@ _that.machineId = _data[0].machineId; _that.portId= _data[0].portId; _that.startTime= _data[0].startTime; + _that.endTime= _data[0].endTime; if(parseInt(_data[0].chargeHours) == 999){ _that.chargeHours = '充满自停'; }else{ _that.chargeHours = parseInt(_data[0].chargeHours)+"小时"; } _that.portName= _data[0].portName; + _that.machineName= _data[0].machineName; + _that.durationPrice= _data[0].durationPrice; _that.state= _data[0].state; _that.stateName= _data[0].stateName; diff --git a/pages/machine/chargeMachineOrders.vue b/pages/machine/chargeMachineOrders.vue new file mode 100644 index 0000000..b08b62c --- /dev/null +++ b/pages/machine/chargeMachineOrders.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/pages/machine/machineToCharge.vue b/pages/machine/machineToCharge.vue index e06e180..14fbd77 100644 --- a/pages/machine/machineToCharge.vue +++ b/pages/machine/machineToCharge.vue @@ -28,7 +28,7 @@ - + @@ -39,6 +39,9 @@ {{couponCount+ '张' }} + + + @@ -55,6 +58,7 @@ getChargeMachinePort } from '../../api/machine/machineApi.js'; import context from '../../lib/java110/Java110Context.js'; + import account from '@/components/account/account.vue'; export default { data() { return { @@ -90,6 +94,9 @@ }] } }, + components:{ + account, + }, onLoad(options) { context.onLoad(options); this.machineId = options.machineId; @@ -99,6 +106,7 @@ }, onShow: function(options) { this._dealChargeCoupons(); + this.$refs.accRef.loadOwnerAccount(); }, methods: { _loadChargeMachines: function() {