From cf51e86ba67fe4789ed7fac7fb049464d877d98d Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Wed, 19 Feb 2025 17:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20feat(compiler):=20-=20=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E5=B0=8F=E7=A8=8B=E5=BA=8Fappid=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=80=89=E6=8B=A9=E4=BC=81=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/auth/passwordLogin.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pages/auth/passwordLogin.vue b/pages/auth/passwordLogin.vue index 0bf8f49..3bd3f6c 100644 --- a/pages/auth/passwordLogin.vue +++ b/pages/auth/passwordLogin.vue @@ -260,6 +260,7 @@ tenantEnabled:true, query:{}, isTenant: true, + appid:'', } }, computed: { @@ -268,6 +269,10 @@ }, }, onLoad(e) { + // #ifdef MP-WEIXIN + const accountInfo = uni.getAccountInfoSync(); + this.appid = accountInfo.miniProgram.appId; + // #endif if(e){ this.query = e; } @@ -368,7 +373,16 @@ } // #endif // #ifdef MP-WEIXIN - if (data.voList != null && data.voList.length !== 0) { + if(this.appid){ + data.voList.forEach((item) => { + if (item.appId === this.appid) { + this.form.tenantId = item.tenantId; + logo = item.logo; + title = item.companyName; + } + }); + this.isTenant = false; + }else if (data.voList != null && data.voList.length !== 0) { this.form.tenantId = data.voList[0].tenantId; this.activeTenantObj = data.voList[0] ; logo = data.voList[0].logo;