Skip to content

Commit

Permalink
feat: 只有一个租户保存到localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
brookylin committed Nov 27, 2023
1 parent 090a27e commit c8b4068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bk-login/pages/src/views/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const idps: Ref<Idp[]> = ref([]);
const activeIdp: Ref<Idp> = ref();
// 确认登录租户
const confirmTenant = async () => {
const confirmTenant = () => {
if (trust.value) {
localStorage.setItem('tenantId', tenantId.value);
if (!tenantIdList.value.includes(tenantId.value)) {
Expand Down Expand Up @@ -267,7 +267,7 @@ onBeforeMount(() => {
hasStorage.value = true;
tenant.value = res.only_enabled_auth_tenant;
tenantId.value = res.only_enabled_auth_tenant.id;
signInAndFetchIdp();
confirmTenant();
} else if (res.tenant_visible) { // 如果租户可见,改为选择租户
getAllTenantList().then((res) => {
allTenantList.value = res;
Expand Down

0 comments on commit c8b4068

Please sign in to comment.