mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: include accessToken in WeCom QR code iframe URL
This commit is contained in:
parent
d7127b9caf
commit
10dbda23bc
|
|
@ -6,7 +6,9 @@
|
|||
<script lang="ts" setup>
|
||||
import {ref, nextTick, defineProps} from 'vue'
|
||||
import {getBrowserLang} from '@/locales'
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const route = useRoute()
|
||||
const props = defineProps<{
|
||||
config: {
|
||||
app_secret: string
|
||||
|
|
@ -17,6 +19,10 @@ const props = defineProps<{
|
|||
}
|
||||
}>()
|
||||
|
||||
const {
|
||||
params: {accessToken},
|
||||
} = route as any
|
||||
|
||||
const iframeUrl = ref('')
|
||||
const init = async () => {
|
||||
await nextTick() // 确保DOM已更新
|
||||
|
|
@ -34,7 +40,7 @@ const init = async () => {
|
|||
const redirectUri = encodeURIComponent(data.redirectUri)
|
||||
console.log('redirectUri', data.redirectUri)
|
||||
// 手动构建生成二维码的url
|
||||
iframeUrl.value = `https://login.work.weixin.qq.com/wwlogin/sso/login?login_type=CorpApp&appid=${data.corpId}&agentid=${data.agentId}&redirect_uri=${redirectUri}&state=fit2cloud-wecom-qr&lang=${lang}&lang=${lang}&panel_size=small`
|
||||
iframeUrl.value = `https://login.work.weixin.qq.com/wwlogin/sso/login?login_type=CorpApp&appid=${data.corpId}&agentid=${data.agentId}&redirect_uri=${redirectUri}&accessToken=${accessToken}&state=fit2cloud-wecom-qr&lang=${lang}&lang=${lang}&panel_size=small`
|
||||
}
|
||||
|
||||
init()
|
||||
|
|
|
|||
Loading…
Reference in New Issue