import request from '../utils/request'

export const sendSmsCode = (mobile: string, platform: 'pc' | 'mobile') => {
  return request({
    url: '/auth/sms/send-code',
    method: 'post',
    data: {
      mobile,
      platform
    }
  })
}

export const loginWithSms = (data: {
  mobile: string
  code: string
  platform: 'pc' | 'mobile'
  remember_me?: boolean
}) => {
  return request({
    url: '/auth/sms/login',
    method: 'post',
    data
  })
}

