Skip to content

Commit

Permalink
feat: 非定制登录跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
brookylin committed Nov 21, 2023
1 parent 1ee5c3c commit 5db0f5b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/bk-login/pages/bk.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
client: {
overlay: false,
},
https: true,
},
};
},
Expand Down
2 changes: 1 addition & 1 deletion src/bk-login/pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"@blueking/babel-preset-bk": "^2.1.0-beta7",
"@blueking/cli-service-webpack": "0.0.0-beta.91",
"@blueking/cli-service-webpack": "0.0.0-beta.92",
"@blueking/eslint-config-bk": "2.1.0-beta.12",
"@blueking/stylelint-config-bk": "^2.1.0-beta.9",
"@types/js-cookie": "^3.0.4",
Expand Down
12 changes: 10 additions & 2 deletions src/bk-login/pages/src/views/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@
<div class="tenant-tab">
<div
class="tab-item"
v-for="item in idps.slice(0, 1)"
v-for="item in idps"
:class="activeIdp.id === item.id ? 'active' : ''"
:key="item.id"
@click="activeIdp = item">
@click="handleChangeIdp(item)">
{{ item.name }}登录
</div>
</div>
Expand Down Expand Up @@ -221,6 +221,14 @@ const handleChange = (item: Tenant) => {
confirmTenant();
};
const handleChangeIdp = (idp: Idp) => {
const customPlugins = ['local'];
activeIdp.value = idp;
if (!customPlugins.includes(idp.plugin.id)) {
window.location.href = `/auth/idps/${idp.id}/actions/login/`;
}
}
const protocolVisible = ref(false);
watch(
Expand Down

0 comments on commit 5db0f5b

Please sign in to comment.