style: Optimization of WeCom Scan-to-Login QR Code Interface

This commit is contained in:
fit2cloud-chenyw
2026-01-26 09:38:18 +08:00
committed by fit2cloud-chenyw
parent b9ce9d3ddf
commit 4df0953792
2 changed files with 18 additions and 5 deletions
+1 -1
View File
@@ -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())
+17 -4
View File
@@ -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>
@@ -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 }) {
@@ -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>