import request from '@/utils/request';
import type { ApiResult } from '@/api';
import type { Customer } from './model';

/**
 * 申请免费体验
 */
export async function apply(data: Customer) {
  const res = await request.post<ApiResult<unknown>>('/customer-apply', data);
  if (res.data.code === 0) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
