/*
 * @Author: your name
 * @Date: 2020-11-24 11:24:06
 * @LastEditTime: 2020-12-10 14:07:29
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \tostumi\src\services\housingList.ts
 */
import request from '@/utils/request';

export interface LoginParamsType {
  userName: string;
  password: string;
  mobile: string;
  captcha: string;
}

export async function getAllCommunity(params: LoginParamsType) {
  return request('/tos/tosCommunity/get', {
    method: 'POST',
    data: params,
  });
}

export async function fakeAccountLogin(params: LoginParamsType) {
  return request('/api/tos/user/login/', {
    method: 'POST',
    data: params,
  });
}

export async function logoutAccount() {
  return request('/api/users/logout/', {
    method: 'POST',
  });
}

export async function getFakeCaptcha(mobile: string) {
  return request(`/api/login/captcha?mobile=${mobile}`);
}
