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;