// Mock login
export async function sendSms(phone: string) {
  console.log(`[Mock] Sending SMS to ${phone}`)
  return Promise.resolve({ code: 0, data: null })
}

export async function login(phone: string, code: string) {
  console.log(`[Mock] Login with ${phone}, code: ${code}`)
  return Promise.resolve({
    code: 0,
    data: {
      token: 'mock_token_' + Date.now(),
      nickname: '用户' + phone.slice(-4),
      phone,
      avatarUrl: '',
    },
  })
}
