export const useCaptcha = () => {
  const codeUrl = ref('')
  const refreshCode = () => {
    const baseUrl = import.meta.env.VITE_SERVER_BASEURL
    codeUrl.value = baseUrl + '/api/v1/getCaptcha?t=' + Date.now()
  }
  onMounted(() => {
    refreshCode()
  })
  return { codeUrl, refreshCode }
}
