fix(auth): 解决微信小程序appid 未找到匹配项,报错问题

This commit is contained in:
fhysy 2025-03-03 16:02:41 +08:00
parent cf51e86ba6
commit 38b17951cf
1 changed files with 12 additions and 1 deletions

View File

@ -374,14 +374,24 @@
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
if(this.appid){ if(this.appid){
let isAppid = true;
data.voList.forEach((item) => { data.voList.forEach((item) => {
if (item.appId === this.appid) { if (item.appId === this.appid) {
console.log("appId",item)
this.form.tenantId = item.tenantId; this.form.tenantId = item.tenantId;
logo = item.logo; logo = item.logo;
title = item.companyName; title = item.companyName;
isAppid = false;
} }
}); });
this.isTenant = false; if(isAppid){
this.form.tenantId = data.voList[0].tenantId;
this.activeTenantObj = data.voList[0] ;
logo = data.voList[0].logo;
title = data.voList[0].companyName;
}else{
this.isTenant = false;
}
}else if (data.voList != null && data.voList.length !== 0) { }else if (data.voList != null && data.voList.length !== 0) {
this.form.tenantId = data.voList[0].tenantId; this.form.tenantId = data.voList[0].tenantId;
this.activeTenantObj = data.voList[0] ; this.activeTenantObj = data.voList[0] ;
@ -389,6 +399,7 @@
title = data.voList[0].companyName; title = data.voList[0].companyName;
} }
// #endif // #endif
console.log("title",title,logo)
if(title){ if(title){
this.appConfig.logo = logo; this.appConfig.logo = logo;
this.appConfig.name = title; this.appConfig.name = title;