feat: 对接完接口
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user