优化充电桩自登陆

This commit is contained in:
wuxw 2023-10-30 13:30:17 +08:00
parent 986608d6a8
commit 20789ae7c8

View File

@ -39,10 +39,10 @@
<view v-else>{{couponCount+ '' }}</view> <view v-else>{{couponCount+ '' }}</view>
</view> </view>
</view> </view>
<view class="margin-sm" v-if="login"> <view class="margin-sm" v-show="login">
<account ref="accRef"></account> <account ref="accRef"></account>
</view> </view>
<view class="margin-sm" v-if="login"> <view class="margin-sm" v-show="login">
<charge ref="chargeRef"></charge> <charge ref="chargeRef"></charge>
</view> </view>
@ -113,11 +113,12 @@
autoLogin(options); autoLogin(options);
this.machineId = options.machineId; this.machineId = options.machineId;
this.communityId = options.communityId; this.communityId = options.communityId;
this.login= context.checkLoginStatus();
this._loadChargeMachines(); this._loadChargeMachines();
this._loadChargeMachinePorts(); this._loadChargeMachinePorts();
let _that = this; let _that = this;
setTimeout(function(){ setTimeout(function(){
_that.login= context.checkLoginStatus();
_that.$refs.accRef.loadOwnerAccount(_that.communityId); _that.$refs.accRef.loadOwnerAccount(_that.communityId);
_that.$refs.chargeRef.loadChargeMonthOrder(_that.communityId); _that.$refs.chargeRef.loadChargeMonthOrder(_that.communityId);
},1000); },1000);