From 6a76ee8e81dde51ee2b92501c4b80106ca850f87 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 19 Mar 2023 02:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/account/account.vue | 11 ++++++++--- pages/account/preStoreAccount.vue | 9 +++++++-- pages/machine/chargeConfirm.vue | 17 +++++++++++------ pages/machine/machineToCharge.vue | 2 +- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/components/account/account.vue b/components/account/account.vue index 39dc132..ddbf007 100644 --- a/components/account/account.vue +++ b/components/account/account.vue @@ -29,22 +29,27 @@ data() { return { account:{}, + communityId:'' }; }, created() { this.loadOwnerAccount(); }, methods: { - loadOwnerAccount: function() { + loadOwnerAccount: function(_communityId) { + this.communityId = _communityId; let _that = this; context.getOwner(function(_ownerInfo) { if (_ownerInfo) { + if(!_that.communityId){ + _that.communityId = _ownerInfo.communityId + } queryOwnerAccount({ page: 1, row: 20, idCard: _ownerInfo.idCard, link: _ownerInfo.link, - communityId: _ownerInfo.communityId, + communityId: _communityId, acctType:'2003' }).then((data) => { if (!data) { @@ -58,7 +63,7 @@ }, _toPrestoreAccount:function(){ uni.navigateTo({ - url:'/pages/account/preStoreAccount' + url:'/pages/account/preStoreAccount?communityId='+this.communityId }) } } diff --git a/pages/account/preStoreAccount.vue b/pages/account/preStoreAccount.vue index a558453..10e0e4c 100644 --- a/pages/account/preStoreAccount.vue +++ b/pages/account/preStoreAccount.vue @@ -59,10 +59,12 @@ return { account:{}, amount:'', - appId:'' + appId:'', + communityId:'', } }, onLoad(options) { + this.communityId = options.communityId; this.loadOwnerAccount(); // #ifdef MP-WEIXIN let accountInfo = uni.getAccountInfoSync(); @@ -77,12 +79,15 @@ let _that = this; context.getOwner(function(_ownerInfo) { if (_ownerInfo) { + if(!_that.communityId){ + _that.communityId = _ownerInfo.communityId; + } queryOwnerAccount({ page: 1, row: 20, idCard: _ownerInfo.idCard, link: _ownerInfo.link, - communityId: _ownerInfo.communityId + communityId: _that.communityId }).then((data) => { if (!data) { _that.account = {}; diff --git a/pages/machine/chargeConfirm.vue b/pages/machine/chargeConfirm.vue index a2e1480..ec11fb1 100644 --- a/pages/machine/chargeConfirm.vue +++ b/pages/machine/chargeConfirm.vue @@ -10,11 +10,14 @@ - 收费规则: 按时间收费(最小1小时) - 充电价格: {{durationPrice}}元/小时, 1小时起 - 规则说明: - 1、充电时间不满1小时按1小时结算 - 2、充电自满最长充电时间为10小时 + 收费规则: 按时间收费(最小1小时); + 充电价格: + + {{index+1}}、{{item.minEnergyPrice}}~{{item.maxEnergyPrice}}功率,{{item.durationPrice}}元/小时; + + 规则说明: + 1、充电时间不满1小时按1小时结算; + 2、充电自满最长充电时间为10小时; @@ -44,6 +47,7 @@ machineName: '', durationPrice: '', couponIds:'', + fees:[] } }, @@ -68,12 +72,13 @@ _that.machineCode = _data.data[0].machineCode; _that.machineName = _data.data[0].machineName; _that.durationPrice = _data.data[0].durationPrice; + _that.fees = _data.data[0].fees; }) }, _toChargeConfirm:function(){ startCharge({ - communityId:getCommunityId(), + communityId:this.communityId, machineId:this.machineId, portId:this.portId, duration:this.duration, diff --git a/pages/machine/machineToCharge.vue b/pages/machine/machineToCharge.vue index 0e7f455..391691b 100644 --- a/pages/machine/machineToCharge.vue +++ b/pages/machine/machineToCharge.vue @@ -106,7 +106,7 @@ }, onShow: function(options) { this._dealChargeCoupons(); - this.$refs.accRef.loadOwnerAccount(); + this.$refs.accRef.loadOwnerAccount(this.communityId); }, methods: { _loadChargeMachines: function() {