feat: 对接完接口

This commit is contained in:
anonymous
2025-01-09 15:47:16 +08:00
parent e70ca852d8
commit ffb887f3bf
12 changed files with 416 additions and 255 deletions
+8 -4
View File
@@ -1,11 +1,15 @@
const baseUrl = import.meta.env.VITE_SERVER_BASEURL
export const useCaptcha = () => {
const codeUrl = ref('')
const t = ref(Date.now())
const codeUrl = computed(() => {
return baseUrl + '/captcha.html?t=' + t.value
})
const refreshCode = () => {
const baseUrl = import.meta.env.VITE_SERVER_BASEURL
codeUrl.value = baseUrl + '/captcha.html?t=' + Date.now()
t.value = Date.now()
}
onMounted(() => {
refreshCode()
})
return { codeUrl, refreshCode }
return { codeUrl, t, refreshCode }
}