From be017e684f9b4bd2784b02ffced49f4685c7beb2 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Wed, 13 Jul 2022 17:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=B9=E7=AB=99=E9=AB=98=E4=BA=AE=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=99=BB=E5=BD=95=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/login/login.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index b582dd8..9c69e7d 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -97,11 +97,12 @@ export class LoginComponent implements OnInit { ] init3D async getGasStationBaseInfo() { - new Promise((resolve, reject) => { + await new Promise((resolve, reject) => { let params = { organizationUnitId: (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization.id } this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any) => { resolve(data.result) this.init3D = data.result.hasBuildingInfo + }) }) } @@ -145,10 +146,8 @@ export class LoginComponent implements OnInit { sessionStorage.setItem('isDefaultPassword', JSON.stringify(data.result.user.isDefaultPassword)) sessionStorage.setItem('isPasswordExpired', JSON.stringify(data.result.user.isPasswordExpired)) this.isLoading = false; - if (data.result.user.organization.isGasStation) { - + if (data.result.user.organization.isGasStation) { await this.getGasStationBaseInfo() - if (data.result.user.menus[0].name == "数字油站" && data.result.user.menus.length == 1 && !this.init3D) { this.message.create('error', `当前用户油站未开通3D且仅分配油站菜单`); return