Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/views/login/xpack/Handler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const third_party_authentication = (state?: string) => {
return null
}
const urlParams = getUrlParams()
const urlFlag = findKey && findKey > 6 ? 'platform' : 'authentication'
const urlFlag = findKey && findKey > 5 ? 'platform' : 'authentication'
const ssoUrl = `/system/${urlFlag}/sso/${findKey}`
if (!urlParams?.redirect_uri) {
urlParams['redirect_uri'] = encodeURIComponent(getSQLBotAddr())
Expand Down
21 changes: 17 additions & 4 deletions frontend/src/views/login/xpack/WecomQr.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<div id="sqlbot-wecom-qr" :class="isBind ? 'sqlbot-wecom-bind-qr' : 'sqlbot-wecom-qr'" />
<div class="sqlbot-wecom-qr-div">
<div id="sqlbot-wecom-qr" :class="isBind ? 'sqlbot-wecom-bind-qr' : 'sqlbot-wecom-qr'" />
</div>
</template>

<script lang="ts" setup>
Expand Down Expand Up @@ -62,6 +64,7 @@ const loadQr = (CORP_ID: string, AGENT_ID: string, STATE: string, REDIRECT_URI:
redirect_uri: REDIRECT_URI,
state: STATE,
redirect_type: 'callback',
panel_size: 'small',
lang: getLocale() === 'en' ? 'en' : 'zh',
},
onCheckWeComLogin({ isWeComLogin }: { isWeComLogin: boolean }) {
Expand All @@ -84,10 +87,20 @@ onUnmounted(() => {
init()
</script>
<style lang="less" scoped>
.sqlbot-wecom-qr {
margin-top: -55px;
}
.sqlbot-wecom-bind-qr {
margin-top: -20px;
}

.sqlbot-wecom-qr-div {
width: 234px;
height: 234px;
.sqlbot-wecom-qr {
width: 234px;
height: 234px;
transform: scale(0.92);
transform-origin: top left;
margin-top: -94px;
margin-left: -30px;
}
}
</style>