import { http } from '@/utils/http'

const pre = import.meta.env.VITE_API_SECONDARY_URL_PREFIX
/**
 * 获取验证码
 * @param phone 手机号
 * @returns ICaptcha 验证码
 */
export function getCode(phoneNo?: string) {
  return http.get<any>(`${pre}/api/user/getCode`, { phoneNo })
}

/**
 * 用户注册
 * @param registerForm 注册表单
 */
export function register(registerForm: any) {
  return http.post<any>(`${pre}/api/user/register`, registerForm)
}
