import request from '@/utils/request';

export function wechatLogin(data) {
  return request({
    url: '/auth/login',
    method: 'post',
    data: {
      ...data,
      clientId: 'e48ac397bff4f031b14d6e671eee49c3',
      grantType: 'wechatApplet'
    }
  });
}

export function getWechatPhone(data) {
  return request({
    url: '/auth/wechat/phone',
    method: 'post',
    data
  });
}

export function wechatRegister(data) {
  return request({
    url: '/auth/wechat/register',
    method: 'post',
    data
  });
}

export function logout() {
  return request({
    url: '/auth/logout',
    method: 'post'
  });
}
