import { fetcher } from '~/assets/scripts/fetcher.js'

export const sendEmail = async (email) => {
  const result = await fetcher(`api/common/sendEmail/${email}`, 'GET')
  return result
}

export const register = async (data) => {
  const result = await fetcher('api/member/register', 'POST', data)
  return result
}

export const login = async (data) => {
  const result = await fetcher('api/member/login', 'POST', data)
  return result
}

export const getInfo = async () => {
  const result = await fetcher('api/member/getInfo', 'GET')
  return result
}

export const getBanner = async () => {
  const result = await fetcher('api/banner/list', 'GET')
  return result
}