Skip to content

Commit 4df0953

Browse files
style: Optimization of WeCom Scan-to-Login QR Code Interface
1 parent b9ce9d3 commit 4df0953

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

frontend/src/views/login/xpack/Handler.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const third_party_authentication = (state?: string) => {
308308
return null
309309
}
310310
const urlParams = getUrlParams()
311-
const urlFlag = findKey && findKey > 6 ? 'platform' : 'authentication'
311+
const urlFlag = findKey && findKey > 5 ? 'platform' : 'authentication'
312312
const ssoUrl = `/system/${urlFlag}/sso/${findKey}`
313313
if (!urlParams?.redirect_uri) {
314314
urlParams['redirect_uri'] = encodeURIComponent(getSQLBotAddr())

frontend/src/views/login/xpack/WecomQr.vue

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2-
<div id="sqlbot-wecom-qr" :class="isBind ? 'sqlbot-wecom-bind-qr' : 'sqlbot-wecom-qr'" />
2+
<div class="sqlbot-wecom-qr-div">
3+
<div id="sqlbot-wecom-qr" :class="isBind ? 'sqlbot-wecom-bind-qr' : 'sqlbot-wecom-qr'" />
4+
</div>
35
</template>
46

57
<script lang="ts" setup>
@@ -62,6 +64,7 @@ const loadQr = (CORP_ID: string, AGENT_ID: string, STATE: string, REDIRECT_URI:
6264
redirect_uri: REDIRECT_URI,
6365
state: STATE,
6466
redirect_type: 'callback',
67+
panel_size: 'small',
6568
lang: getLocale() === 'en' ? 'en' : 'zh',
6669
},
6770
onCheckWeComLogin({ isWeComLogin }: { isWeComLogin: boolean }) {
@@ -84,10 +87,20 @@ onUnmounted(() => {
8487
init()
8588
</script>
8689
<style lang="less" scoped>
87-
.sqlbot-wecom-qr {
88-
margin-top: -55px;
89-
}
9090
.sqlbot-wecom-bind-qr {
9191
margin-top: -20px;
9292
}
93+
94+
.sqlbot-wecom-qr-div {
95+
width: 234px;
96+
height: 234px;
97+
.sqlbot-wecom-qr {
98+
width: 234px;
99+
height: 234px;
100+
transform: scale(0.92);
101+
transform-origin: top left;
102+
margin-top: -94px;
103+
margin-left: -30px;
104+
}
105+
}
93106
</style>

0 commit comments

Comments
 (0)