fix: keep tenant option list request
This commit is contained in:
@@ -32,8 +32,13 @@ export async function loadImTenantOptions(
|
||||
// 登录用户已绑定商户租户:仅返回自己商户选项(与后端 resolveImAdminScope 强制范围一致)
|
||||
if (boundTenantId > 0) {
|
||||
const info = readCurrentUserInfo();
|
||||
const tenant = { id: boundTenantId, name: info?.tenantName, code: info?.tenantCode };
|
||||
target.value = [toTenantOption(tenant)];
|
||||
try {
|
||||
const res = await TenantList(params);
|
||||
target.value = (res?.list || []).map(toTenantOption);
|
||||
} catch {
|
||||
const tenant = { id: boundTenantId, name: info?.tenantName, code: info?.tenantCode };
|
||||
target.value = [toTenantOption(tenant)];
|
||||
}
|
||||
return target.value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user