diff --git a/src/components/dialog/AliyunAuthDialog.vue b/src/components/dialog/AliyunAuthDialog.vue index 4b1013bd..b7d9d17f 100644 --- a/src/components/dialog/AliyunAuthDialog.vue +++ b/src/components/dialog/AliyunAuthDialog.vue @@ -48,6 +48,7 @@ async function getQrcode() { qrCodeContent.value = result.data.codeContent ck.value = result.data.ck t.value = result.data.t + timeoutTimer = setTimeout(checkQrcode, 3000) } else { text.value = result.message } @@ -98,7 +99,6 @@ async function savaAliPanConfig() { onMounted(async () => { await getQrcode() - timeoutTimer = setTimeout(checkQrcode, 3000) }) onUnmounted(() => { diff --git a/src/components/dialog/U115AuthDialog.vue b/src/components/dialog/U115AuthDialog.vue index 361bc505..2d5e9eb4 100644 --- a/src/components/dialog/U115AuthDialog.vue +++ b/src/components/dialog/U115AuthDialog.vue @@ -18,7 +18,7 @@ const emit = defineEmits(['done', 'close']) const qrCodeContent = ref('') // 下方的提示信息 -const text = ref('请使用微信或115客户端扫码,或在下方输入Cookie') +const text = ref('请使用微信或115客户端扫码') // 提醒类型 const alertType = ref<'success' | 'info' | 'error' | 'warning' | undefined>('info') @@ -29,7 +29,7 @@ let timeoutTimer: NodeJS.Timeout | undefined = undefined // 完成 async function handleDone() { clearTimeout(timeoutTimer) - if (props.conf?.cookie) { + if (props.conf?.refresh_token) { await savaU115Config() } emit('done') @@ -41,6 +41,7 @@ async function getQrcode() { const result: { [key: string]: any } = await api.get('/storage/qrcode/u115') if (result.success && result.data) { qrCodeContent.value = result.data.codeContent + timeoutTimer = setTimeout(checkQrcode, 3000) } else { text.value = result.message } @@ -95,7 +96,6 @@ async function savaU115Config() { onMounted(async () => { await getQrcode() - timeoutTimer = setTimeout(checkQrcode, 3000) }) onUnmounted(() => { @@ -118,7 +118,7 @@ onUnmounted(() => { - +