

import { $api } from '@/composables/fetch'
import type { UserInfo } from '@/stores/use-user-store'

export interface LoginParams {
  loginName: string
  password: string
  emailCode: string
}
export interface TokenInfo {
  data: string
}

export interface RegisterParams extends LoginParams {
  email: string
  phone: string
}

export interface ResetPasswordParams {
  email: string
  code: string
  newPassword: string
}

export const uploadApi = {
  // 登录
  uploadFile: (file: File) => {
    return $api.uploadFile<string>('/ucard/api/upload/file', file)
  }
}
