fix: No error message prompted after QR code failure

--bug=1052150 --user=王孝刚 【系统设置】钉钉二维码失效后,点击刷新,使用非当前组织的用户扫码登录,没有弹错误提示 https://www.tapd.cn/57709429/s/1653901
This commit is contained in:
wxg0103 2025-02-13 10:26:22 +08:00
parent f4f47a8f33
commit d8170c3897

View File

@ -75,16 +75,13 @@ const router = useRouter()
const { user } = useStore() const { user } = useStore()
const { load } = useScriptTag('https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js') const { load } = useScriptTag('https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js')
const isConfigReady = ref(false) const isConfigReady = ref(false)
const errorShown = ref(false)
const initActive = async () => { const initActive = async () => {
try { try {
await load(true) await load(true)
errorShown.value = false
if (!isConfigReady.value) { if (!isConfigReady.value) {
return return
} }
console.log(props.config)
const data = { const data = {
appKey: props.config.app_key, appKey: props.config.app_key,
@ -115,10 +112,7 @@ const initActive = async () => {
}) })
}, },
(errorMsg: string) => { (errorMsg: string) => {
if (!errorShown.value) { MsgError(errorMsg)
MsgError(errorMsg)
errorShown.value = true
}
} }
) )
} catch (error) { } catch (error) {